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:
Marcel
2026-03-31 17:13:09 +02:00
parent 527d174e9c
commit fb636e4152
2 changed files with 2 additions and 2 deletions

View File

@@ -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()}