Skip to content

Commit 10c447d

Browse files
authored
fix(repo): Fix failing integration tests (#4724)
1 parent 550c7e9 commit 10c447d

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.changeset/funny-fishes-learn.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

integration/testUtils/commonPageObject.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export const common = ({ page }: TestArgs) => {
1616
},
1717
enterOtpCode: async (code: string) => {
1818
await page.getByRole('textbox', { name: /digit 1/i }).click();
19-
await page.keyboard.type(code, { delay: 50 });
19+
// We've got a delay here to ensure the prepare call is triggered before the OTP is auto-submitted.
20+
await page.keyboard.type(code, { delay: 100 });
2021
},
2122
enterTestOtpCode: async () => {
2223
return self.enterOtpCode('424242');

integration/tests/combined-sign-in-flow.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withCombinedFlow] })('combine
124124
await u.po.signIn.continue();
125125
await u.po.signIn.setPassword('wrong-password');
126126
await u.po.signIn.continue();
127-
await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible();
127+
await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible();
128128

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

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

143143
await u.po.signIn.getUseAnotherMethodLink().click();
144144
await u.po.signIn.getAltMethodsEmailCodeButton().click();

integration/tests/sign-in-flow.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f
118118
await u.po.signIn.continue();
119119
await u.po.signIn.setPassword('wrong-password');
120120
await u.po.signIn.continue();
121-
await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible();
121+
await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible();
122122

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

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

137137
await u.po.signIn.getUseAnotherMethodLink().click();
138138
await u.po.signIn.getAltMethodsEmailCodeButton().click();

packages/localizations/src/en-US.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const enUS: LocalizationResource = {
4040
formFieldHintText__optional: 'Optional',
4141
formFieldHintText__slug: 'A slug is a human-readable ID that must be unique. It’s often used in URLs.',
4242
formFieldInputPlaceholder__backupCode: 'Enter backup code',
43-
formFieldInputPlaceholder__confirmDeletionUserAccount: 'Confirm account deletion',
43+
formFieldInputPlaceholder__confirmDeletionUserAccount: 'Delete account',
4444
formFieldInputPlaceholder__emailAddress: 'Enter your email address',
4545
formFieldInputPlaceholder__emailAddress_username: 'Enter email or username',
4646
formFieldInputPlaceholder__emailAddresses: 'example@email.com, example2@email.com',

0 commit comments

Comments
 (0)