Skip to content

Commit

Permalink
Remove test for cognito domain (#102)
Browse files Browse the repository at this point in the history
Actually the cognito login is served on the app's domain, so that check fails on PodSpaces for instance.
  • Loading branch information
NSeydoux authored Dec 12, 2022
1 parent 999fe1c commit 36ede7f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/internal-playwright-helpers/src/pages/cognito.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,11 @@ import { Page } from "@playwright/test";
export class CognitoPage {
page: Page;

static COGNITO_DOMAIN = "amazoncognito.com ";

constructor(page: Page) {
this.page = page;
}

async login(username: string, password: string) {
const pageUrl = new URL(this.page.url());
if(!pageUrl.hostname.includes(CognitoPage.COGNITO_DOMAIN)) {
throw new Error(
`Expected domain ${CognitoPage.COGNITO_DOMAIN} for login, found ${pageUrl.href}`
);
}
await this.page.fill(".visible-lg [type=text]", username);
await this.page.fill(".visible-lg [type=password]", password);
await Promise.all([
Expand Down

0 comments on commit 36ede7f

Please sign in to comment.