Skip to content

Commit 1f6f395

Browse files
authored
Fix label on cognito login button (#1644)
The cognito login button varies from one instance to another, but it has the same label.
1 parent 3c2d328 commit 1f6f395

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/internal-playwright-helpers/src/pages

packages/internal-playwright-helpers/src/pages/cognito.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ export class CognitoPage {
4242
.getByRole("textbox", { name: "Username" })
4343
.fill(username, options);
4444
await this.page.getByRole("textbox", { name: "Password" }).fill(password);
45-
return this.page.getByRole("button", { name: "submit" }).click();
45+
// Depending on the target instance, the cognito button changes aria name.
46+
return this.page
47+
.getByRole("button", { name: "Sign in" })
48+
.or(this.page.getByRole("button", { name: "submit" }))
49+
.click();
4650
}
4751
}

0 commit comments

Comments
 (0)