Skip to content

Commit

Permalink
fix(repo): Fix failing integration tests (#4724)
Browse files Browse the repository at this point in the history
  • Loading branch information
brkalow authored Dec 6, 2024
1 parent 550c7e9 commit 10c447d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .changeset/funny-fishes-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 2 additions & 1 deletion integration/testUtils/commonPageObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const common = ({ page }: TestArgs) => {
},
enterOtpCode: async (code: string) => {
await page.getByRole('textbox', { name: /digit 1/i }).click();
await page.keyboard.type(code, { delay: 50 });
// We've got a delay here to ensure the prepare call is triggered before the OTP is auto-submitted.
await page.keyboard.type(code, { delay: 100 });
},
enterTestOtpCode: async () => {
return self.enterOtpCode('424242');
Expand Down
4 changes: 2 additions & 2 deletions integration/tests/combined-sign-in-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withCombinedFlow] })('combine
await u.po.signIn.continue();
await u.po.signIn.setPassword('wrong-password');
await u.po.signIn.continue();
await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible();
await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible();

await u.po.expect.toBeSignedOut();
});
Expand All @@ -138,7 +138,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withCombinedFlow] })('combine
await u.po.signIn.setPassword('wrong-password');
await u.po.signIn.continue();

await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible();
await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible();

await u.po.signIn.getUseAnotherMethodLink().click();
await u.po.signIn.getAltMethodsEmailCodeButton().click();
Expand Down
4 changes: 2 additions & 2 deletions integration/tests/sign-in-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f
await u.po.signIn.continue();
await u.po.signIn.setPassword('wrong-password');
await u.po.signIn.continue();
await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible();
await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible();

await u.po.expect.toBeSignedOut();
});
Expand All @@ -132,7 +132,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f
await u.po.signIn.setPassword('wrong-password');
await u.po.signIn.continue();

await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible();
await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible();

await u.po.signIn.getUseAnotherMethodLink().click();
await u.po.signIn.getAltMethodsEmailCodeButton().click();
Expand Down
2 changes: 1 addition & 1 deletion packages/localizations/src/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const enUS: LocalizationResource = {
formFieldHintText__optional: 'Optional',
formFieldHintText__slug: 'A slug is a human-readable ID that must be unique. It’s often used in URLs.',
formFieldInputPlaceholder__backupCode: 'Enter backup code',
formFieldInputPlaceholder__confirmDeletionUserAccount: 'Confirm account deletion',
formFieldInputPlaceholder__confirmDeletionUserAccount: 'Delete account',
formFieldInputPlaceholder__emailAddress: 'Enter your email address',
formFieldInputPlaceholder__emailAddress_username: 'Enter email or username',
formFieldInputPlaceholder__emailAddresses: 'example@email.com, example2@email.com',
Expand Down

0 comments on commit 10c447d

Please sign in to comment.