Skip to content

Commit

Permalink
OZ-541: E2E test verifying discontinuing a synced OpenMRS lab order f…
Browse files Browse the repository at this point in the history
…or an ERPNext customer removes the corresponding quotation
  • Loading branch information
kdaud committed Oct 14, 2024
1 parent 56dd2e4 commit 9761284
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions e2e/tests/erpnext-openmrs-flows.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,29 @@ test('Discontinuing a synced OpenMRS drug order for an ERPNext customer with a s
await openmrs.voidPatient();
});

test('Discontinuing a synced OpenMRS lab order for an ERPNext customer removes the corresponding quotation.', async ({ page }) => {
// setup
await openmrs.navigateToLabOrderForm();
await page.getByPlaceholder('Search for a test type').fill('Complete blood count');
await openmrs.saveLabOrder();

await erpnext.open();
await erpnext.searchQuotation();
await expect(page.getByText(`${patientName.firstName + ' ' + patientName.givenName}`)).toBeVisible();

// replay
await page.goto(`${O3_URL}`);
await openmrs.searchPatient(`${patientName.firstName + ' ' + patientName.givenName}`);
await openmrs.cancelLabOrder();

// verify
await page.goto(`${ERPNEXT_URL}/app/home`);
await erpnext.searchQuotation();
await expect(page.getByText(`${patientName.firstName + ' ' + patientName.givenName}`)).not.toBeVisible();
await expect(page.getByText('No Quotation found')).toBeVisible();
await openmrs.voidPatient();
});

test('Ordering a drug for an OpenMRS patient within a visit creates the corresponding ERPNext customer with a filled quotation linked to the visit.', async ({ page }) => {
// setup
await openmrs.navigateToDrugOrderForm();
Expand Down

0 comments on commit 9761284

Please sign in to comment.