Skip to content

Commit 387f762

Browse files
committed
fix(e2e): Grab the correct error message
1 parent ccce693 commit 387f762

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

integration/tests/session-tasks-sign-in-reset-password.test.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasksResetPassword
2828
await u.po.signIn.setPassword(user.password);
2929
await u.po.signIn.continue();
3030

31-
await expect(u.page.getByTestId('form-feedback-error')).toBeVisible();
32-
await u.po.signIn.getUseAnotherMethodLink().click();
31+
await expect(
32+
u.page.getByText(
33+
"Your password appears to have been compromised or it's no longer trusted and cannot be used. Please use another method to continue.",
34+
),
35+
).toBeVisible();
3336
await u.po.signIn.getAltMethodsEmailCodeButton().click();
3437

3538
await u.page.getByRole('textbox', { name: 'code' }).click();
@@ -78,10 +81,11 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasksResetPassword
7881
await u.po.signIn.setPassword(user.password);
7982
await u.po.signIn.continue();
8083

81-
await expect(u.page.getByTestId('form-feedback-error')).toBeVisible();
82-
83-
await u.po.signIn.getUseAnotherMethodLink().click();
84-
84+
await expect(
85+
u.page.getByText(
86+
"Your password appears to have been compromised or it's no longer trusted and cannot be used. Please use another method to continue.",
87+
),
88+
).toBeVisible();
8589
await u.po.signIn.getAltMethodsEmailCodeButton().click();
8690

8791
await u.page.getByRole('textbox', { name: 'code' }).click();

0 commit comments

Comments
 (0)