From ea9e40012209b4401eef3d5efb989f2d2b099e0b Mon Sep 17 00:00:00 2001 From: kdaud Date: Mon, 27 May 2024 13:28:51 +0300 Subject: [PATCH 1/2] OZ-554: Renamed deletePatient() to voidPatient() --- e2e/tests/erpnext-openmrs-flows.spec.ts | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/e2e/tests/erpnext-openmrs-flows.spec.ts b/e2e/tests/erpnext-openmrs-flows.spec.ts index 4e6c0c9e..f5a09db8 100644 --- a/e2e/tests/erpnext-openmrs-flows.spec.ts +++ b/e2e/tests/erpnext-openmrs-flows.spec.ts @@ -26,7 +26,7 @@ test('Ordering a lab test for an OpenMRS patient creates the corresponding ERPNe await erpnext.searchCustomer(); const customer = await page.locator(".bold a:nth-child(1)"); await expect(customer).toContainText(`${patientName.firstName + ' ' + patientName.givenName}`); - await openmrs.deletePatient(); + await openmrs.voidPatient(); }); test('Ordering a drug for an OpenMRS patient creates the corresponding ERPNext customer with a filled quotation.', async ({ page }) => { @@ -44,7 +44,7 @@ test('Ordering a drug for an OpenMRS patient creates the corresponding ERPNext c await page.getByLabel('Dashboard').getByText('Quotation').click(); await erpnext.searchQuotation(); await expect(page.getByText('Draft').nth(0)).toBeVisible(); - await openmrs.deletePatient(); + await openmrs.voidPatient(); await erpnext.deleteQuotation(); }); @@ -68,7 +68,7 @@ test('Ending an OpenMRS patient visit with a synced drug order updates the corre await erpnext.searchQuotation(); await expect(quotationStatus).toHaveText('Open'); await erpnext.voidQuotation(); - await openmrs.deletePatient(); + await openmrs.voidPatient(); await erpnext.deleteQuotation(); }); @@ -92,7 +92,7 @@ test('Revising a synced OpenMRS drug order edits the corresponding ERPNext quota await erpnext.searchQuotation(); await page.getByRole('link', { name: `${patientName.firstName + ' ' + patientName.givenName}` }).click(); await expect(quantity).toHaveText('8'); - await openmrs.deletePatient(); + await openmrs.voidPatient(); await erpnext.deleteQuotation(); }); @@ -111,7 +111,7 @@ test('Ordering a drug with a free text medication dosage for an OpenMRS patient await page.getByLabel('Dashboard').getByText('Quotation').click(); await erpnext.searchQuotation(); await expect(page.getByText('Draft').nth(0)).toBeVisible(); - await openmrs.deletePatient(); + await openmrs.voidPatient(); await erpnext.deleteQuotation(); }); @@ -133,7 +133,7 @@ test('Discontinuing a synced OpenMRS drug order for an ERPNext customer with a s await erpnext.searchQuotation(); await expect(page.getByText(`${patientName.firstName + ' ' + patientName.givenName}`)).not.toBeVisible(); await expect(page.getByText('No Quotation found')).toBeVisible(); - await openmrs.deletePatient(); + await openmrs.voidPatient(); }); test.afterEach(async ({ page }) => { diff --git a/package.json b/package.json index e40b1c50..178fbaa4 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "!playwright-report/" ], "scripts": { - "e2e-tests-pro": "npx playwright test", + "e2e-tests-pro": "npx playwright test erpnext-openmrs", "e2e-tests-foss": "npx playwright test odoo-openmrs erpnext-openmrs openmrs-senaite" }, "publishConfig": { From 44c89f1a2ec9fc327a31d3e78fcd03de931baffc Mon Sep 17 00:00:00 2001 From: kdaud Date: Wed, 29 May 2024 08:27:29 +0300 Subject: [PATCH 2/2] Update scripts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 178fbaa4..e40b1c50 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "!playwright-report/" ], "scripts": { - "e2e-tests-pro": "npx playwright test erpnext-openmrs", + "e2e-tests-pro": "npx playwright test", "e2e-tests-foss": "npx playwright test odoo-openmrs erpnext-openmrs openmrs-senaite" }, "publishConfig": {