fix(e2e): replace fragile .last() selector with data-testid on password form submit
The password-reset E2E test was using button[type="submit"].last() to target the password change button on the profile page. The profile page has two submit buttons with identical text, so .last() is layout-order-dependent and breaks if the form order ever changes. Add data-testid="submit-password" to PasswordChangeForm and use getByTestId() in the test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,7 @@ let {
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
data-testid="submit-password"
|
||||
class="mt-5 rounded-sm bg-primary px-5 py-2 font-sans text-xs font-bold tracking-widest text-primary-fg uppercase transition-opacity hover:opacity-80"
|
||||
>
|
||||
{m.btn_save()}
|
||||
|
||||
Reference in New Issue
Block a user