From f7674b4ca89cd4f43b27b5bc59cbdfdbc20a367f Mon Sep 17 00:00:00 2001 From: Nicolas Seydoux Date: Mon, 12 Dec 2022 18:17:36 +0100 Subject: [PATCH 1/2] Remove test for cognito domain Actually the cognito login is served on the app's domain, so that check fails on PodSpaces for instance --- packages/internal-playwright-helpers/src/pages/cognito.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/internal-playwright-helpers/src/pages/cognito.ts b/packages/internal-playwright-helpers/src/pages/cognito.ts index a0ebfe77..f2cc5543 100644 --- a/packages/internal-playwright-helpers/src/pages/cognito.ts +++ b/packages/internal-playwright-helpers/src/pages/cognito.ts @@ -35,12 +35,6 @@ export class CognitoPage { } 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([ From 661e0058e0d82d0ce6792bd744e63aedbb84570a Mon Sep 17 00:00:00 2001 From: Nicolas Seydoux Date: Mon, 12 Dec 2022 18:21:04 +0100 Subject: [PATCH 2/2] fixup! Remove test for cognito domain --- packages/internal-playwright-helpers/src/pages/cognito.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/internal-playwright-helpers/src/pages/cognito.ts b/packages/internal-playwright-helpers/src/pages/cognito.ts index f2cc5543..510729d9 100644 --- a/packages/internal-playwright-helpers/src/pages/cognito.ts +++ b/packages/internal-playwright-helpers/src/pages/cognito.ts @@ -28,8 +28,6 @@ import { Page } from "@playwright/test"; export class CognitoPage { page: Page; - static COGNITO_DOMAIN = "amazoncognito.com "; - constructor(page: Page) { this.page = page; }