feat: update gitea vendor
runner nix smoke / nix label and flake smoke (push) Failing after 1m28s

This commit is contained in:
2026-09-26 21:18:24 +00:00
parent c439c1b948
commit d9b2a4e787
3538 changed files with 116131 additions and 44340 deletions
@@ -4,9 +4,11 @@
package integration
import (
"bytes"
"io"
"testing"
"gitea.dev/modules/test"
"github.com/PuerkitoBio/goquery"
"github.com/stretchr/testify/assert"
)
@@ -17,7 +19,7 @@ type HTMLDoc struct {
}
// NewHTMLParser parse html file
func NewHTMLParser(t testing.TB, body *bytes.Buffer) *HTMLDoc {
func NewHTMLParser(t testing.TB, body io.Reader) *HTMLDoc {
t.Helper()
doc, err := goquery.NewDocumentFromReader(body)
assert.NoError(t, err)
@@ -39,6 +41,7 @@ func (doc *HTMLDoc) Find(selector string) *goquery.Selection {
// AssertHTMLElement check if the element by selector exists or does not exist depending on checkExists
func AssertHTMLElement[T int | bool](t testing.TB, doc *HTMLDoc, selector string, checkExists T) {
t.Helper()
sel := doc.doc.Find(selector)
switch v := any(checkExists).(type) {
case bool:
@@ -47,3 +50,13 @@ func AssertHTMLElement[T int | bool](t testing.TB, doc *HTMLDoc, selector string
assert.Equal(t, v, sel.Length())
}
}
func assertHTMLEq(t testing.TB, expected, actual string) {
t.Helper()
if expected == actual { // fast path
return
}
exp := test.NormalizeHTMLAttributes(t, expected)
act := test.NormalizeHTMLAttributes(t, actual)
assert.Equal(t, exp, act)
}