diff --git a/tests/integration/html_helper.go b/tests/integration/html_helper.go index fc900e5a3d..506881af25 100644 --- a/tests/integration/html_helper.go +++ b/tests/integration/html_helper.go @@ -41,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: diff --git a/tests/integration/user_settings_test.go b/tests/integration/user_settings_test.go index 3ccb6d9522..d837da71cd 100644 --- a/tests/integration/user_settings_test.go +++ b/tests/integration/user_settings_test.go @@ -70,7 +70,7 @@ func TestUserSettingsAccount(t *testing.T) { AssertHTMLElement(t, doc, "#password", true) AssertHTMLElement(t, doc, "#email", true) - AssertHTMLElement(t, doc, "#delete-form", true) + AssertHTMLElement(t, doc, `form[action="/user/settings/account/delete"]`, true) }) t.Run("credentials disabled", func(t *testing.T) { @@ -87,7 +87,7 @@ func TestUserSettingsAccount(t *testing.T) { AssertHTMLElement(t, doc, "#password", false) AssertHTMLElement(t, doc, "#email", false) - AssertHTMLElement(t, doc, "#delete-form", true) + AssertHTMLElement(t, doc, `form[action="/user/settings/account/delete"]`, true) }) t.Run("deletion disabled", func(t *testing.T) {