Skip to content

Commit

Permalink
fix(repo): Fix expectation in sign in page objects to be more resilient
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl committed Nov 28, 2023
1 parent 644811a commit 7f1a039
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions integration/testUtils/signInPageObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const createSignInComponentPageObject = (testArgs: TestArgs) => {
},
setInstantPassword: async (val: string) => {
const passField = self.getPasswordInput();
await passField.fill(val, { force: true });
await expect(passField).toBeVisible();
await passField.fill(val, { force: true });
},
getGoToSignUp: () => {
return page.getByRole('link', { name: /sign up/i });
Expand All @@ -42,7 +42,10 @@ export const createSignInComponentPageObject = (testArgs: TestArgs) => {
return page.getByRole('button', { name: new RegExp(`continue with ${provider}`, 'gi') });
},
signInWithEmailAndInstantPassword: async (opts: { email: string; password: string }) => {
await self.getIdentifierInput().fill(opts.email);
const identifierField = self.getIdentifierInput();
await expect(identifierField).toBeVisible();

await identifierField.fill(opts.email);
await self.setInstantPassword(opts.password);
await self.continue();
},
Expand Down

0 comments on commit 7f1a039

Please sign in to comment.