diff --git a/e2e-tests/admin/tests/auth-method-ldap.spec.js b/e2e-tests/admin/tests/auth-method-ldap.spec.js index b7561f437..ce9c7a0b2 100644 --- a/e2e-tests/admin/tests/auth-method-ldap.spec.js +++ b/e2e-tests/admin/tests/auth-method-ldap.spec.js @@ -55,7 +55,10 @@ test( .getByRole('navigation', { name: 'Application local navigation' }) .getByRole('link', { name: 'Auth Methods' }) .click(); - await page.getByRole('button', { name: 'New' }).click(); + await expect( + page.getByRole('heading', { name: 'Auth Methods' }), + ).toBeVisible(); + await page.getByRole('button', { name: 'New', exact: true }).click(); await page.getByRole('link', { name: 'LDAP' }).click(); const ldapAuthMethodName = 'LDAP ' + nanoid();