Skip to content

Commit

Permalink
OZ-544: Renormalized test titles and file names + Updated GA to v4 (#82)
Browse files Browse the repository at this point in the history
Co-authored-by: Dimitri R <[email protected]>
  • Loading branch information
kdaud and mks-d authored Apr 24, 2024
1 parent 5a5052c commit fd4b40a
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 41 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/foss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -49,7 +49,7 @@ jobs:
run: npm run fossE2ETests

- name: Upload report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Cache dependencies
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
Expand All @@ -44,7 +44,7 @@ jobs:
run: yarn install

- name: Install Playwright browsers
run: npx playwright install chromium --with-deps
run: npx playwright install chromium

- name: Run E2E tests
id: jobStatusPretty
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

- name: Upload report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test.beforeEach(async ({ page }) => {
await expect(page).toHaveURL(/.*home/);
});

test('Adding an OpenMRS role syncs the role into Keycloak', async ({ page }) => {
test('Creating an OpenMRS role creates the corresponding Keycloak role.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await page.goto(`${O3_URL}/openmrs/admin/users/role.list`);
Expand All @@ -35,7 +35,7 @@ test('Adding an OpenMRS role syncs the role into Keycloak', async ({ page }) =>
await homePage.deleteOpenMRSRole();
});

test('Updating a synced OpenMRS role updates the corresponding role in Keycloak', async ({ page }) => {
test('Updating a synced OpenMRS role updates the corresponding Keycloak role.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await page.goto(`${O3_URL}/openmrs/admin/users/role.list`);
Expand Down Expand Up @@ -70,7 +70,7 @@ test('Updating a synced OpenMRS role updates the corresponding role in Keycloak'
await homePage.deleteOpenMRSRole();
});

test('Deleting a synced OpenMRS role deletes the corresponding role in Keycloak', async ({ page }) => {
test('Deleting a synced OpenMRS role deletes the corresponding Keycloak role.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await page.goto(`${O3_URL}/openmrs/admin/users/role.list`);
Expand Down Expand Up @@ -100,7 +100,7 @@ test('Deleting a synced OpenMRS role deletes the corresponding role in Keycloak'
await expect(roleName).not.toHaveText(`${randomOpenMRSRoleName.roleName}`);
});

test('Adding a Superset role syncs the role into Keycloak', async ({ page }) => {
test('Creating a Superset role creates the corresponding Keycloak role.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToSuperset();
Expand All @@ -118,7 +118,7 @@ test('Adding a Superset role syncs the role into Keycloak', async ({ page }) =>
await homePage.deleteSupersetRole();
});

test('Updating a synced Superset role updates the corresponding role in Keycloak', async ({ page }) => {
test('Updating a synced Superset role updates the corresponding Keycloak role.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToSuperset();
Expand All @@ -144,7 +144,7 @@ test('Updating a synced Superset role updates the corresponding role in Keycloak
await homePage.deleteUpdatedSupersetRole();
});

test('Deleting a synced Superset role deletes the corresponding role in Keycloak', async ({ page }) => {
test('Deleting a synced Superset role deletes the corresponding Keycloak role.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToSuperset();
Expand All @@ -168,7 +168,7 @@ test('Deleting a synced Superset role deletes the corresponding role in Keycloak
await expect(page.getByText(`${randomSupersetRoleName.roleName}`)).not.toBeVisible();
});

test('Deleting a synchronized role in Keycloak gets created in the subsequent polling cycle', async ({ page }) => {
test('A synced role deleted from within Keycloak gets recreated in the subsequent polling cycle.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToSuperset();
Expand All @@ -192,7 +192,7 @@ test('Deleting a synchronized role in Keycloak gets created in the subsequent po
await homePage.deleteSupersetRole();
});

test('Creating a role in Keycloak automatically gets deleted during the subsequent polling cycle', async ({ page }) => {
test('A (non-synced) role created from within Keycloak gets deleted in the subsequent polling cycle.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToKeycloak();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test.beforeEach(async ({ page }) => {
await homePage.startPatientVisit();
});

test('Patient with lab order becomes customer in Odoo', async ({ page }) => {
test('Ordering a lab test for an OpenMRS patient creates the corresponding Odoo customer with a filled quotation.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand All @@ -34,7 +34,7 @@ test('Patient with lab order becomes customer in Odoo', async ({ page }) => {
await expect(quotation?.includes("Quotation")).toBeTruthy();
});

test('Editing patient details with a synced lab order edits the corresponding customer details in Odoo', async ({ page }) => {
test('Editing the details of an OpenMRS patient with a synced lab order edits the corresponding Odoo customer details.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand Down Expand Up @@ -63,7 +63,7 @@ test('Editing patient details with a synced lab order edits the corresponding cu
await expect(quotation?.includes("Quotation")).toBeTruthy();
});

test('Patient with drug order becomes customer in Odoo', async ({ page }) => {
test('Ordering a drug for an OpenMRS patient creates the corresponding Odoo customer with a filled quotation.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.makeDrugOrder();
Expand All @@ -81,7 +81,7 @@ test('Patient with drug order becomes customer in Odoo', async ({ page }) => {
await expect(quotation?.includes("Quotation")).toBeTruthy();
});

test('Editing patient details with a synced drug order edits corresponding customer details in Odoo', async ({ page }) => {
test('Editing the details of an OpenMRS patient with a synced drug order edits the corresponding Odoo customer details.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.makeDrugOrder();
Expand Down Expand Up @@ -109,7 +109,7 @@ test('Editing patient details with a synced drug order edits corresponding custo
await expect(quotation?.includes("Quotation")).toBeTruthy();
});

test('Revising a synced drug order edits corresponding quotation line in Odoo', async ({ page }) => {
test('Revising a synced OpenMRS drug order edits the corresponding Odoo quotation line.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.makeDrugOrder();
Expand Down Expand Up @@ -139,7 +139,7 @@ test('Revising a synced drug order edits corresponding quotation line in Odoo',
await expect(drugOrderItem).toContainText('Thrice daily - 6 Days');
});

test('Discontinuing a synced drug order cancels corresponding quotation line in Odoo', async ({ page }) => {
test('Discontinuing a synced OpenMRS drug order removes the corresponding Odoo quotation line.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.makeDrugOrder();
Expand All @@ -166,9 +166,12 @@ test('Discontinuing a synced drug order cancels corresponding quotation line in
await homePage.searchCustomerInOdoo();
await expect(customer?.includes(`${patientName.firstName + ' ' + patientName.givenName}`)).toBeTruthy();
await expect(quotation).toHaveText('Cancelled');
await page.getByRole('cell', { name: `${patientName.firstName + ' ' + patientName.givenName}` }).click();
const QuotationItem = await page.locator(".o_section_and_note_list_view tbody:nth-child(2) tr:nth-child(1) td");
await expect(QuotationItem).not.toHaveText('Aspirin 325mg');
});

test('Patient with free text medication dosage becomes customer in Odoo', async ({ page }) => {
test('Ordering a drug with a free text medication dosage for an OpenMRS patient creates the corresponding Odoo customer with a filled quotation.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.prescribeFreeTextMedicationDosage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test.beforeEach(async ({ page }) => {
await homePage.startPatientVisit();
});

test('Patient with lab order becomes client with analysis request in SENAITE', async ({ page }) => {
test('Ordering a lab test for an OpenMRS patient creates the corresponding SENAITE client with an analysis request.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand All @@ -31,7 +31,7 @@ test('Patient with lab order becomes client with analysis request in SENAITE', a
await expect(client).toContainText(`${patientName.firstName + ' ' + patientName.givenName}`);
});

test('Editing patient details with a synced lab test order edits client details in SENAITE', async ({ page }) => {
test('Editing the details of an OpenMRS patient with a synced lab order edits the corresponding SENAITE client details.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand All @@ -56,7 +56,7 @@ test('Editing patient details with a synced lab test order edits client details
await expect(client).toContainText(`${patientName.updatedFirstName}` + ' ' + `${patientName.givenName }`);
});

test('Editing a synced lab order edits corresponding analysis request in SENAITE', async ({ page }) => {
test('Editing a synced OpenMRS lab order edits the corresponding SENAITE analysis request.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand Down Expand Up @@ -90,7 +90,7 @@ test('Editing a synced lab order edits corresponding analysis request in SENAITE
await expect(analysisRequest).toHaveText('Sickle cell screening test Template');
});

test('Voiding a synced lab order cancels corresponding analysis request in SENAITE', async ({ page }) => {
test('Voiding a synced OpenMRS lab order cancels the corresponding SENAITE analysis request.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand Down Expand Up @@ -120,7 +120,7 @@ test('Voiding a synced lab order cancels corresponding analysis request in SENAI
await expect(client).not.toHaveText(`${patientName.firstName + ' ' + patientName.givenName}`);
});

test('Published coded lab results from SENAITE are viewable in O3', async ({ page }) => {
test('Published coded lab results from SENAITE are viewable in the OpenMRS lab results viewer.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand Down Expand Up @@ -148,7 +148,7 @@ test('Published coded lab results from SENAITE are viewable in O3', async ({ pag
await expect(labResult).toContainText('Negative');
});

test('Published numeric lab results from SENAITE are viewable in O3', async ({ page }) => {
test('Published numeric lab results from SENAITE are viewable in the OpenMRS lab results viewer.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand Down Expand Up @@ -176,7 +176,7 @@ test('Published numeric lab results from SENAITE are viewable in O3', async ({ p
await expect(labResult).toContainText('64');
});

test('Published free text lab results from SENAITE are viewable in O3', async ({ page }) => {
test('Published free text lab results from SENAITE are viewable in the OpenMRS lab results viewer.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToLabOrderForm();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test.beforeEach(async ({ page }) => {
await expect(page).toHaveURL(/.*home/);
});

test('Adding an OpenMRS patient syncs patient into patients table in Superset', async ({ page }) => {
test('Creating an OpenMRS patient creates the patient in Superset patients table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.goToSuperset();
Expand Down Expand Up @@ -58,7 +58,7 @@ test('Adding an OpenMRS patient syncs patient into patients table in Superset',
await homePage.clearSQLEditor();
});

test('Starting an OpenMRS visit syncs visit into visits table in Superset', async ({ page }) => {
test('Creating an OpenMRS visit creates the visit in Superset visits table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down Expand Up @@ -105,7 +105,7 @@ test('Starting an OpenMRS visit syncs visit into visits table in Superset', asyn
await homePage.clearSQLEditor();
});

test('Creating an OpenMRS order syncs order into orders table in Superset', async ({ page }) => {
test('Creating an OpenMRS order creates the order in Superset orders table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down Expand Up @@ -163,7 +163,7 @@ test('Creating an OpenMRS order syncs order into orders table in Superset', asyn
await homePage.clearSQLEditor();
});

test('Adding an OpenMRS encounter syncs encounter into encounters table in Superset', async ({ page }) => {
test('Creating an OpenMRS encounter creates the encounter in Superset encounters table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down Expand Up @@ -234,7 +234,7 @@ test('Adding an OpenMRS encounter syncs encounter into encounters table in Super
await homePage.clearSQLEditor();
});

test('Adding an OpenMRS condition syncs condition into conditions table in Superset', async ({ page }) => {
test('Creating an OpenMRS condition creates the condition in Superset conditions table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down Expand Up @@ -289,7 +289,7 @@ test('Adding an OpenMRS condition syncs condition into conditions table in Super
await homePage.clearSQLEditor();
});

test('Adding an OpenMRS observation syncs observation into observations table in Superset', async ({ page }) => {
test('Creating an OpenMRS obs creates the observation in Superset observations table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down Expand Up @@ -347,7 +347,7 @@ test('Adding an OpenMRS observation syncs observation into observations table in
await homePage.clearSQLEditor();
});

test('Adding an OpenMRS appointment syncs appointment into appointments table in Superset', async ({ page }) => {
test('Creating an OpenMRS appointment creates the appointment in Superset appointments table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down Expand Up @@ -400,7 +400,7 @@ test('Adding an OpenMRS appointment syncs appointment into appointments table in
await homePage.clearSQLEditor();
});

test('Voiding an OpenMRS observation updates observations dataset in Superset', async ({ page }) => {
test('Voiding an OpenMRS obs updates the observation in Superset observations table.', async ({ page }) => {
// setup
homePage = new HomePage(page);
await homePage.createPatient();
Expand Down

0 comments on commit fd4b40a

Please sign in to comment.