From 10c447d1a8788db825a1f8db2cefed036a167308 Mon Sep 17 00:00:00 2001 From: Bryce Kalow Date: Thu, 5 Dec 2024 23:14:48 -0600 Subject: [PATCH] fix(repo): Fix failing integration tests (#4724) --- .changeset/funny-fishes-learn.md | 2 ++ integration/testUtils/commonPageObject.ts | 3 ++- integration/tests/combined-sign-in-flow.test.ts | 4 ++-- integration/tests/sign-in-flow.test.ts | 4 ++-- packages/localizations/src/en-US.ts | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .changeset/funny-fishes-learn.md diff --git a/.changeset/funny-fishes-learn.md b/.changeset/funny-fishes-learn.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/funny-fishes-learn.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/integration/testUtils/commonPageObject.ts b/integration/testUtils/commonPageObject.ts index db778b1cf91..b0fe8463606 100644 --- a/integration/testUtils/commonPageObject.ts +++ b/integration/testUtils/commonPageObject.ts @@ -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'); diff --git a/integration/tests/combined-sign-in-flow.test.ts b/integration/tests/combined-sign-in-flow.test.ts index 548ea47ef63..f0afacb4c4e 100644 --- a/integration/tests/combined-sign-in-flow.test.ts +++ b/integration/tests/combined-sign-in-flow.test.ts @@ -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(); }); @@ -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(); diff --git a/integration/tests/sign-in-flow.test.ts b/integration/tests/sign-in-flow.test.ts index e04b5e00120..29243df5c45 100644 --- a/integration/tests/sign-in-flow.test.ts +++ b/integration/tests/sign-in-flow.test.ts @@ -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(); }); @@ -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(); diff --git a/packages/localizations/src/en-US.ts b/packages/localizations/src/en-US.ts index 77cb7d69382..fdde7665812 100644 --- a/packages/localizations/src/en-US.ts +++ b/packages/localizations/src/en-US.ts @@ -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',