From c1ecc4b8ad43a91933c4c7659f3d04697b0db696 Mon Sep 17 00:00:00 2001 From: Tristina Date: Thu, 13 Jun 2024 17:38:37 +0700 Subject: [PATCH] update path --- e2e/feebback.spec.ts | 6 +++--- e2e/helpers/constants.ts | 2 +- e2e/smokeTest.spec.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/feebback.spec.ts b/e2e/feebback.spec.ts index d6874b40..e165f33f 100644 --- a/e2e/feebback.spec.ts +++ b/e2e/feebback.spec.ts @@ -51,7 +51,7 @@ test.describe('Feedback', () => { contentSystem2 = "Hi friend message 2"; contentUser1 = "Can you help me on message 1"; contentUser2 = "Can you help me on message 2"; - await login.openUrl("/"); + await login.openUrl(config.BASE_URL+''); await homePage.clickSignUpBtn(); await signUpPage.signUpAccountStep1(email, UserInfo.password, userName); await signUpPage.signUpAccountStep2("TESTPROJECT","TESTORG", UserInfo.companySize, UserInfo.option); @@ -110,7 +110,7 @@ test.describe('Feedback', () => { const logsPage = new LogsPage(page); const loginPage = new LoginPage(page); - await loginPage.openUrl("/"); + await loginPage.openUrl(config.BASE_URL+''); await loginPage.login(email, UserInfo.password); await commonPage.clickMenu('Logs'); @@ -135,7 +135,7 @@ test.describe('Feedback', () => { const logsPage = new LogsPage(page); const loginPage = new LoginPage(page); - await loginPage.openUrl("/"); + await loginPage.openUrl(config.BASE_URL+''); await loginPage.login(email, UserInfo.password); await commonPage.clickMenu('Logs'); diff --git a/e2e/helpers/constants.ts b/e2e/helpers/constants.ts index ed8bfb20..bd73da4c 100644 --- a/e2e/helpers/constants.ts +++ b/e2e/helpers/constants.ts @@ -1,5 +1,5 @@ export const config = { - BASE_URL: process.env.APP_URL, + BASE_URL: process.env.APP_URL || 'http://127.0.0.1:8080', OPENAI_API_KEY : process.env.OPENAI_API_KEY, API_URL: process.env.LUNARY_API_URL }; diff --git a/e2e/smokeTest.spec.ts b/e2e/smokeTest.spec.ts index c50c684a..27ed8654 100644 --- a/e2e/smokeTest.spec.ts +++ b/e2e/smokeTest.spec.ts @@ -24,7 +24,7 @@ test.describe('Smoke test', () => { const login = new LoginPage(page); userName =uniqueStr('test'); email = uniqueStr('test') + '@example.com'; - await login.openUrl("/"); + await login.openUrl(config.BASE_URL+''); }); test("Verify search user", async () => {