From 36ede7fdeefd2913c25c7bc95125a20229e04093 Mon Sep 17 00:00:00 2001 From: Zwifi Date: Mon, 12 Dec 2022 21:02:13 +0100 Subject: [PATCH] Remove test for cognito domain (#102) 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 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/internal-playwright-helpers/src/pages/cognito.ts b/packages/internal-playwright-helpers/src/pages/cognito.ts index a0ebfe77..510729d9 100644 --- a/packages/internal-playwright-helpers/src/pages/cognito.ts +++ b/packages/internal-playwright-helpers/src/pages/cognito.ts @@ -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([