From 783c95f074ffd2248fc5a77640dce789c9ae5a0b Mon Sep 17 00:00:00 2001 From: wojteknowacki Date: Mon, 20 Nov 2023 14:33:26 +0100 Subject: [PATCH] fix dashboard path --- playwright/pages/loginPage.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/playwright/pages/loginPage.ts b/playwright/pages/loginPage.ts index 3b4509ce23f..68a7e6b71de 100644 --- a/playwright/pages/loginPage.ts +++ b/playwright/pages/loginPage.ts @@ -37,7 +37,7 @@ export class LoginPage { page: Page, path: string, ) { - await this.goto(); + await this.page.goto(process.env.BASE_URL!); await this.typeEmail(userEmail); await this.typePassword(userPassword); await this.clickSignInButton(); @@ -45,13 +45,7 @@ export class LoginPage { // End of authentication steps. await page.context().storageState({ path }); } - async basicUiLogin(userEmail: string, userPassword: string) { - await this.goto(); - await this.typeEmail(userEmail); - await this.typePassword(userPassword); - await this.clickSignInButton(); - await expect(this.homePage.welcomeMessage).toContainText("Hello there,"); - } + async typeEmail(email: string) { await this.emailInput.fill(email); } @@ -61,12 +55,4 @@ export class LoginPage { async clickSignInButton() { await this.signInButton.click(); } - async goto() { - const BASE_URL = process.env.BASE_URL!; - const loginPageUrl = - BASE_URL === "http://localhost:9000/" - ? "http://localhost:9000/" - : "/dashboard"; - await this.page.goto(loginPageUrl); - } }