Skip to content

Commit

Permalink
Renamed variable names for QA, DEMO and DEV URLS
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaud committed Nov 20, 2023
1 parent 0584eea commit 52af715
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 152 deletions.
30 changes: 15 additions & 15 deletions .env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/foss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ozone PRO E2E Test Environment
name: Run Ozone PRO E2E Tests On Specified Environment

on:

Expand Down
84 changes: 42 additions & 42 deletions e2e/tests/testAnalyticsIntegration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -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();
Expand All @@ -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);
Expand Down Expand Up @@ -383,27 +383,27 @@ 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();

// 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);
Expand Down Expand Up @@ -460,27 +460,27 @@ 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();

// 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);
Expand Down Expand Up @@ -568,27 +568,27 @@ 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();

// 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);
Expand Down
Loading

0 comments on commit 52af715

Please sign in to comment.