From 546667849fb33a15f0aab31051561f4c46c7695b Mon Sep 17 00:00:00 2001 From: kdaud Date: Mon, 20 Nov 2023 12:22:24 +0300 Subject: [PATCH] Renamed variable names for QA, DEMO and DEV URLS --- .env | 30 +++---- .github/workflows/foss.yml | 6 +- ...yml => runOzoneProTestsOnSpecifiedEnv.yml} | 2 +- e2e/tests/testAnalyticsIntegration.spec.ts | 84 +++++++++---------- e2e/tests/testKeycloakIntegration.spec.ts | 38 ++++----- e2e/tests/testOdooIntegration.spec.ts | 48 +++++------ e2e/tests/testSenaiteIntegration.spec.ts | 36 ++++---- e2e/utils/configs/globalSetup.ts | 4 +- e2e/utils/functions/testBase.ts | 54 ++++++------ playwright.config.ts | 2 +- 10 files changed, 152 insertions(+), 152 deletions(-) rename .github/workflows/{runOzoneProTestsOnProvidedEnv.yml => runOzoneProTestsOnSpecifiedEnv.yml} (96%) diff --git a/.env b/.env index 0b47b093..84304209 100644 --- a/.env +++ b/.env @@ -1,19 +1,19 @@ # Global configuration for Ozone HIS -E2E_BASE_DEMO_URL=https://demo.ozone-his.com -E2E_BASE_URL=https://ozone-dev.mekomsolutions.net -E2E_BASE_QA_URL=https://ozone-qa.mekomsolutions.net -E2E_ODOO_DEMO_URL=https://erp.demo.ozone-his.com -E2E_ODOO_URL=https://erp.ozone-dev.mekomsolutions.net -E2E_ODOO_QA_URL=https://erp.ozone-qa.mekomsolutions.net -E2E_SENAITE_DEMO_URL=https://lims.demo.ozone-his.com -E2E_SENAITE_URL=https://lims.ozone-dev.mekomsolutions.net -E2E_SENAITE_QA_URL=https://lims.ozone-qa.mekomsolutions.net -E2E_KEYCLOAK_DEMO_URL=https://auth.demo.ozone-his.com -E2E_KEYCLOAK_URL=https://auth.ozone-dev.mekomsolutions.net -E2E_KEYCLOAK_QA_URL=https://auth.ozone-qa.mekomsolutions.net -E2E_ANALYTICS_DEMO_URL=https://analytics.demo.ozone-his.com -E2E_ANALYTICS_URL=https://analytics.ozone-dev.mekomsolutions.net -E2E_ANALYTICS_QA_URL=https://analytics.ozone-qa.mekomsolutions.net +E2E_BASE_URL_DEMO=https://demo.ozone-his.com +E2E_BASE_URL_DEV=https://ozone-dev.mekomsolutions.net +E2E_BASE_URL_QA=https://ozone-qa.mekomsolutions.net +E2E_ODOO_URL_DEMO=https://erp.demo.ozone-his.com +E2E_ODOO_URL_DEV=https://erp.ozone-dev.mekomsolutions.net +E2E_ODOO_URL_QA=https://erp.ozone-qa.mekomsolutions.net +E2E_SENAITE_URL_DEMO=https://lims.demo.ozone-his.com +E2E_SENAITE_URL_DEV=https://lims.ozone-dev.mekomsolutions.net +E2E_SENAITE_URL_QA=https://lims.ozone-qa.mekomsolutions.net +E2E_KEYCLOAK_URL_DEMO=https://auth.demo.ozone-his.com +E2E_KEYCLOAK_URL_DEV=https://auth.ozone-dev.mekomsolutions.net +E2E_KEYCLOAK_URL_QA=https://auth.ozone-qa.mekomsolutions.net +E2E_ANALYTICS_URL_DEMO=https://analytics.demo.ozone-his.com +E2E_ANALYTICS_URL_DEV=https://analytics.ozone-dev.mekomsolutions.net +E2E_ANALYTICS_URL_QA=https://analytics.ozone-qa.mekomsolutions.net E2E_USER_ADMIN_USERNAME=jdoe E2E_USER_ADMIN_PASSWORD=password FOSS_E2E_USER_ADMIN_USERNAME=admin diff --git a/.github/workflows/foss.yml b/.github/workflows/foss.yml index cf678091..8ffc6209 100644 --- a/.github/workflows/foss.yml +++ b/.github/workflows/foss.yml @@ -42,9 +42,9 @@ jobs: - name: Run E2E tests env: - E2E_BASE_URL: '${{ github.event.inputs.e2e_base_url_input }}' - E2E_ODOO_URL: '${{ github.event.inputs.e2e_odoo_url_input }}' - E2E_SENAITE_URL: '${{ github.event.inputs.e2e_senaite_url_input }}' + E2E_BASE_URL_DEV: '${{ github.event.inputs.e2e_base_url_input }}' + E2E_ODOO_URL_DEV: '${{ github.event.inputs.e2e_odoo_url_input }}' + E2E_SENAITE_URL_DEV: '${{ github.event.inputs.e2e_senaite_url_input }}' E2E_RUNNING_ON_OZONE_PRO: 'false' run: npm run fossE2ETests diff --git a/.github/workflows/runOzoneProTestsOnProvidedEnv.yml b/.github/workflows/runOzoneProTestsOnSpecifiedEnv.yml similarity index 96% rename from .github/workflows/runOzoneProTestsOnProvidedEnv.yml rename to .github/workflows/runOzoneProTestsOnSpecifiedEnv.yml index 7e241bd6..4f0e34ae 100644 --- a/.github/workflows/runOzoneProTestsOnProvidedEnv.yml +++ b/.github/workflows/runOzoneProTestsOnSpecifiedEnv.yml @@ -1,4 +1,4 @@ -name: Ozone PRO E2E Test Environment +name: Ozone PRO E2E Tests On Specified Environment on: diff --git a/e2e/tests/testAnalyticsIntegration.spec.ts b/e2e/tests/testAnalyticsIntegration.spec.ts index ed9878d6..67c5c579 100644 --- a/e2e/tests/testAnalyticsIntegration.spec.ts +++ b/e2e/tests/testAnalyticsIntegration.spec.ts @@ -29,13 +29,13 @@ test('Adding an OpenMRS patient syncs patient into patients table in Superset', // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.createPatient(); await homePage.searchOpenMRSPatientID(); @@ -44,13 +44,13 @@ test('Adding an OpenMRS patient syncs patient into patients table in Superset', // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_QA}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(patientsCountQuery); @@ -98,26 +98,26 @@ test('Starting an OpenMRS visit syncs visit into visits table in Superset', asyn // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.startPatientVisit(); // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_URL}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(visitsCountQuery); @@ -178,13 +178,13 @@ test('Creating an OpenMRS order syncs order into orders table in Superset', asyn // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.goToLabOrderForm(); @@ -195,13 +195,13 @@ test('Creating an OpenMRS order syncs order into orders table in Superset', asyn // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_QA}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(ordersCountQuery); @@ -262,13 +262,13 @@ test('Adding an OpenMRS encounter syncs encounter into encounters table in Super // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.goToLabOrderForm(); @@ -279,13 +279,13 @@ test('Adding an OpenMRS encounter syncs encounter into encounters table in Super // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_QA}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(encountersCountQuery); @@ -383,13 +383,13 @@ test('Adding an OpenMRS condition syncs condition into conditions table in Super // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.addPatientCondition(); @@ -397,13 +397,13 @@ test('Adding an OpenMRS condition syncs condition into conditions table in Super // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_QA}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(conditionsCountQuery); @@ -460,13 +460,13 @@ test('Adding an OpenMRS observation syncs observation into observations table in // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.addPatientBiometrics(); @@ -474,13 +474,13 @@ test('Adding an OpenMRS observation syncs observation into observations table in // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_QA}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(observationsCountQuery); @@ -568,13 +568,13 @@ test('Adding an OpenMRS appointment syncs appointment into appointments table in // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.addPatientAppointment(); @@ -582,13 +582,13 @@ test('Adding an OpenMRS appointment syncs appointment into appointments table in // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}/superset/sqllab`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ANALYTICS_QA_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_QA}/superset/sqllab`); break; default: - await page.goto(`${process.env.E2E_ANALYTICS_URL}/superset/sqllab`); + await page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}/superset/sqllab`); } await homePage.clearSQLEditor(); await page.getByRole('textbox').first().fill(appointmentsCountQuery); diff --git a/e2e/tests/testKeycloakIntegration.spec.ts b/e2e/tests/testKeycloakIntegration.spec.ts index 2cb703a6..98071234 100644 --- a/e2e/tests/testKeycloakIntegration.spec.ts +++ b/e2e/tests/testKeycloakIntegration.spec.ts @@ -15,13 +15,13 @@ test('Adding an OpenMRS role syncs the role into Keycloak', async ({ page }) => // setup switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/users/role.list`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/users/role.list`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/users/role.list`); } const homePage = new HomePage(page); await homePage.addOpenMRSRole(); @@ -49,13 +49,13 @@ test('Updating a synced OpenMRS role updates the corresponding role in Keycloak' // setup switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/users/role.list`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/users/role.list`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/users/role.list`); } const homePage = new HomePage(page); await homePage.addOpenMRSRole(); @@ -77,13 +77,13 @@ test('Updating a synced OpenMRS role updates the corresponding role in Keycloak' await expect(page.getByText('Application: Records Allergies')).toBeTruthy(); switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/users/role.list`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/users/role.list`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/users/role.list`); } await homePage.updateOpenMRSRole(); @@ -96,7 +96,7 @@ test('Updating a synced OpenMRS role updates the corresponding role in Keycloak' await page.goto(`${process.env.E2E_KEYCLOAK_QA_URL}/admin/master/console`); break; default: - await page.goto(`${process.env.E2E_KEYCLOAK_URL}/admin/master/console`); + await page.goto(`${process.env.E2E_KEYCLOAK_URL_DEV}/admin/master/console`); } await homePage.goToClients(); await page.getByRole('link', { name: 'openmrs', exact: true }).click(); @@ -113,13 +113,13 @@ test('Deleting a synced OpenMRS role deletes the corresponding role in Keycloak' // setup switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/users/role.list`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/users/role.list`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/users/role.list`); } const homePage = new HomePage(page); await homePage.addOpenMRSRole(); @@ -144,13 +144,13 @@ test('Deleting a synced OpenMRS role deletes the corresponding role in Keycloak' // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_KEYCLOAK_DEMO_URL}/admin/master/console`); + await page.goto(`${process.env.E2E_KEYCLOAK_URL_DEMO}/admin/master/console`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_KEYCLOAK_QA_URL}/admin/master/console`); + await page.goto(`${process.env.E2E_KEYCLOAK_URL_QA}/admin/master/console`); break; default: - await page.goto(`${process.env.E2E_KEYCLOAK_URL}/admin/master/console`); + await page.goto(`${process.env.E2E_KEYCLOAK_URL_DEV}/admin/master/console`); } await homePage.goToClients(); await page.getByRole('link', { name: 'openmrs', exact: true }).click(); @@ -159,13 +159,13 @@ test('Deleting a synced OpenMRS role deletes the corresponding role in Keycloak' await expect(roleName).not.toHaveText(`${randomOpenMRSRoleName.roleName}`); switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/users/role.list`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/users/role.list`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/users/role.list`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/users/role.list`); } await homePage.addOpenMRSRole(); }); diff --git a/e2e/tests/testOdooIntegration.spec.ts b/e2e/tests/testOdooIntegration.spec.ts index ded64e2a..ec905446 100644 --- a/e2e/tests/testOdooIntegration.spec.ts +++ b/e2e/tests/testOdooIntegration.spec.ts @@ -58,13 +58,13 @@ test('Editing patient details with a synced lab order edits the corresponding cu // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.updatePatientDetails(); @@ -72,13 +72,13 @@ test('Editing patient details with a synced lab order edits the corresponding cu // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ODOO_DEMO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ODOO_QA_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_QA}`); break; default: - await page.goto(`${process.env.E2E_ODOO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEV}`); } await homePage.searchCustomerInOdoo(); const updatedCustomer = @@ -127,13 +127,13 @@ test('Editing patient details with a synced drug order edits corresponding custo // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.updatePatientDetails(); @@ -141,13 +141,13 @@ test('Editing patient details with a synced drug order edits corresponding custo // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ODOO_DEMO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ODOO_QA_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_QA}`); break; default: - await page.goto(`${process.env.E2E_ODOO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEV}`); } await homePage.searchCustomerInOdoo(); const updatedCustomer = @@ -177,13 +177,13 @@ test('Revising a synced drug order edits corresponding quotation line in Odoo', // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.editDrugOrder(); @@ -191,13 +191,13 @@ test('Revising a synced drug order edits corresponding quotation line in Odoo', // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ODOO_DEMO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ODOO_QA_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_QA}`); break; default: - await page.goto(`${process.env.E2E_ODOO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEV}`); } await homePage.searchCustomerInOdoo(); await page.getByRole('cell', { name: `${patientName.firstName + ' ' + patientName.givenName}` }).click(); @@ -226,13 +226,13 @@ test('Discontinuing a synced drug order cancels corresponding quotation line in // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.discontinueDrugOrder(); @@ -240,13 +240,13 @@ test('Discontinuing a synced drug order cancels corresponding quotation line in // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_ODOO_DEMO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_ODOO_QA_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_QA}`); break; default: - await page.goto(`${process.env.E2E_ODOO_URL}`); + await page.goto(`${process.env.E2E_ODOO_URL_DEV}`); } await homePage.searchCustomerInOdoo(); await expect(customer?.includes(`${patientName.firstName + ' ' + patientName.givenName}`)).toBeTruthy(); diff --git a/e2e/tests/testSenaiteIntegration.spec.ts b/e2e/tests/testSenaiteIntegration.spec.ts index 10302e2a..471a0728 100644 --- a/e2e/tests/testSenaiteIntegration.spec.ts +++ b/e2e/tests/testSenaiteIntegration.spec.ts @@ -48,13 +48,13 @@ test('Editing patient details with a synced lab test order edits client details // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.updatePatientDetails(); @@ -88,13 +88,13 @@ test('Editing a synced lab order edits corresponding analysis request in SENAITE // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.updateLabOrder(); @@ -131,13 +131,13 @@ test('Voiding a synced lab order cancels corresponding analysis request in SENAI // replay switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`); await homePage.discontinueLabOrder(); @@ -169,13 +169,13 @@ test('Published coded lab results from SENAITE are viewable in O3', async ({ pag // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.viewTestResults(); const testName = await page.locator('div:nth-child(2) >div> div.cds--data-table-container td:nth-child(1)').first(); @@ -206,13 +206,13 @@ test('Published numeric lab results from SENAITE are viewable in O3', async ({ p // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.viewTestResults(); const testName = await page.locator('div:nth-child(2) >div> div.cds--data-table-container td:nth-child(1)').first(); @@ -243,13 +243,13 @@ test('Published free text lab results from SENAITE are viewable in O3', async ({ // verify switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } await homePage.viewTestResults(); const testName = await page.locator('div:nth-child(2) >div> div.cds--data-table-container td:nth-child(1)').first(); diff --git a/e2e/utils/configs/globalSetup.ts b/e2e/utils/configs/globalSetup.ts index 5b43fbd0..7cde914d 100644 --- a/e2e/utils/configs/globalSetup.ts +++ b/e2e/utils/configs/globalSetup.ts @@ -16,7 +16,7 @@ async function globalSetup() { const token = Buffer.from(`${process.env.E2E_USER_ADMIN_USERNAME}:${process.env.E2E_USER_ADMIN_PASSWORD}`).toString( 'base64', ); - await requestContext.post(`${process.env.E2E_BASE_URL}/ws/rest/v1/session`, { + await requestContext.post(`${process.env.E2E_BASE_URL_DEV}/ws/rest/v1/session`, { data: { sessionLocation: process.env.E2E_LOGIN_DEFAULT_LOCATION_UUID, locale: 'en', @@ -32,7 +32,7 @@ async function globalSetup() { export const api: WorkerFixture = async ({ playwright }, use) => { const ctx = await playwright.request.newContext({ - baseURL: `${process.env.E2E_BASE_URL}/ws/rest/v1/`, + baseURL: `${process.env.E2E_BASE_URL_DEV}/ws/rest/v1/`, httpCredentials: { username: process.env.E2E_USER_ADMIN_USERNAME ?? "", password: process.env.E2E_USER_ADMIN_PASSWORD ?? "", diff --git a/e2e/utils/functions/testBase.ts b/e2e/utils/functions/testBase.ts index 3d13299f..b818763a 100644 --- a/e2e/utils/functions/testBase.ts +++ b/e2e/utils/functions/testBase.ts @@ -29,13 +29,13 @@ export class HomePage { async initiateLogin() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_BASE_DEMO_URL}`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_BASE_QA_URL}`); + await this.page.goto(`${process.env.E2E_BASE_URL_QA}`); break; default: - await this.page.goto(`${process.env.E2E_BASE_URL}`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEV}`); } if (`${process.env.E2E_RUNNING_ON_OZONE_PRO}` == 'true') { await this.page.locator('#username').fill(`${process.env.E2E_USER_ADMIN_USERNAME}`); @@ -65,26 +65,26 @@ export class HomePage { async goToSuperset() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_ANALYTICS_DEMO_URL}`); + await this.page.goto(`${process.env.E2E_ANALYTICS_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_ANALYTICS_QA_URL}`); + await this.page.goto(`${process.env.E2E_ANALYTICS_URL_QA}`); break; default: - await this.page.goto(`${process.env.E2E_ANALYTICS_URL}`); + await this.page.goto(`${process.env.E2E_ANALYTICS_URL_DEV}`); } } async goToKeycloak() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_KEYCLOAK_DEMO_URL}/admin/master/console`); + await this.page.goto(`${process.env.E2E_KEYCLOAK_URL_DEMO}/admin/master/console`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_KEYCLOAK_QA_URL}/admin/master/console`); + await this.page.goto(`${process.env.E2E_KEYCLOAK_URL_QA}/admin/master/console`); break; default: - await this.page.goto(`${process.env.E2E_KEYCLOAK_URL}/admin/master/console`); + await this.page.goto(`${process.env.E2E_KEYCLOAK_URL_DEV}/admin/master/console`); } await this.page.getByLabel('Username or email').fill('admin'); await this.page.getByLabel('Password').fill('password'); @@ -95,13 +95,13 @@ export class HomePage { async goToOdoo() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_ODOO_DEMO_URL}`); + await this.page.goto(`${process.env.E2E_ODOO_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_ODOO_QA_URL}`); + await this.page.goto(`${process.env.E2E_ODOO_URL_QA}`); break; default: - await this.page.goto(`${process.env.E2E_ODOO_URL}`); + await this.page.goto(`${process.env.E2E_ODOO_URL_DEV}`); } if (`${process.env.E2E_RUNNING_ON_OZONE_PRO}` == 'true') { await this.page.getByRole('link', { name: 'Login with Single Sign-On' }).click(); @@ -118,13 +118,13 @@ export class HomePage { async goToSENAITE() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_SENAITE_DEMO_URL}`); + await this.page.goto(`${process.env.E2E_SENAITE_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_SENAITE_QA_URL}`); + await this.page.goto(`${process.env.E2E_SENAITE_URL_QA}`); break; default: - await this.page.goto(`${process.env.E2E_SENAITE_URL}`); + await this.page.goto(`${process.env.E2E_SENAITE_URL_DEV}`); } if (!(`${process.env.E2E_RUNNING_ON_OZONE_PRO}` == 'true')) { await delay(3000); @@ -214,13 +214,13 @@ export class HomePage { async deletePatient() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/patients/index.htm`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/patients/index.htm`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/patients/index.htm`); + await this.page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/patients/index.htm`); break; default: - await this.page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/patients/index.htm`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/patients/index.htm`); } await this.page.getByPlaceholder(' ').type(`${patientName.firstName + ' ' + patientName.givenName}`); await this.page.locator('#openmrsSearchTable tbody tr.odd td:nth-child(1)').click(); @@ -533,13 +533,13 @@ export class HomePage { async deleteOpenMRSRole() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/admin/users/role.list`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/admin/users/role.list`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/admin/users/role.list`); + await this.page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/admin/users/role.list`); break; default: - await this.page.goto(`${process.env.E2E_BASE_URL}/openmrs/admin/users/role.list`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/admin/users/role.list`); } await this.unlinkInheritedOpenMRSRoles(); await this.page.getByRole('row', { name: `${randomOpenMRSRoleName.roleName}` }).getByRole('checkbox').check(); @@ -552,13 +552,13 @@ export class HomePage { async makeDelayFor03ToLoad() { switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_SENAITE_DEMO_URL}`); + await this.page.goto(`${process.env.E2E_SENAITE_URL_DEMO}`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_SENAITE_QA_URL}`); + await this.page.goto(`${process.env.E2E_SENAITE_URL_QA}`); break; default: - await this.page.goto(`${process.env.E2E_SENAITE_URL}`); + await this.page.goto(`${process.env.E2E_SENAITE_URL_DEV}`); } if (!(`${process.env.E2E_RUNNING_ON_OZONE_PRO}` == 'true')) { await delay(3000); @@ -571,13 +571,13 @@ export class HomePage { await delay(4000); switch (true) { case `${process.env.E2E_TEST_ENVIRONMENT}` == 'demo': - await this.page.goto(`${process.env.E2E_BASE_DEMO_URL}/openmrs/spa/home`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEMO}/openmrs/spa/home`); break; case `${process.env.E2E_TEST_ENVIRONMENT}` == 'qa': - await this.page.goto(`${process.env.E2E_BASE_QA_URL}/openmrs/spa/home`); + await this.page.goto(`${process.env.E2E_BASE_URL_QA}/openmrs/spa/home`); break; default: - await this.page.goto(`${process.env.E2E_BASE_URL}/openmrs/spa/home`); + await this.page.goto(`${process.env.E2E_BASE_URL_DEV}/openmrs/spa/home`); } } diff --git a/playwright.config.ts b/playwright.config.ts index 6b62836d..973b08db 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -15,7 +15,7 @@ const config: PlaywrightTestConfig = { reporter: process.env.CI ? [['junit', { outputFile: 'results.xml' }], ['html']] : [['html']], globalSetup: require.resolve('./e2e/utils/configs/globalSetup'), use: { - baseURL: `${process.env.E2E_BASE_URL}/spa/`, + baseURL: `${process.env.E2E_BASE_URL_DEV}/spa/`, storageState: 'e2e/storageState.json', }, projects: [