We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 999fe1c commit 36ede7fCopy full SHA for 36ede7f
packages/internal-playwright-helpers/src/pages/cognito.ts
@@ -28,19 +28,11 @@ import { Page } from "@playwright/test";
28
export class CognitoPage {
29
page: Page;
30
31
- static COGNITO_DOMAIN = "amazoncognito.com ";
32
-
33
constructor(page: Page) {
34
this.page = page;
35
}
36
37
async login(username: string, password: string) {
38
- const pageUrl = new URL(this.page.url());
39
- if(!pageUrl.hostname.includes(CognitoPage.COGNITO_DOMAIN)) {
40
- throw new Error(
41
- `Expected domain ${CognitoPage.COGNITO_DOMAIN} for login, found ${pageUrl.href}`
42
- );
43
- }
44
await this.page.fill(".visible-lg [type=text]", username);
45
await this.page.fill(".visible-lg [type=password]", password);
46
await Promise.all([
0 commit comments