-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OZ-541: Ordering a lab test for an OpenMRS patient creates the corres…
…ponding ERPNext customer
- Loading branch information
Showing
5 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { HomePage } from '../utils/functions/testBase'; | ||
import { patientName } from '../utils/functions/testBase'; | ||
import { O3_URL, ODOO_URL } from '../utils/configs/globalSetup'; | ||
|
||
let homePage: HomePage; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
homePage = new HomePage(page); | ||
}); | ||
|
||
test('Ordering a lab test for an OpenMRS patient creates the corresponding ERPNext customer.', async ({ page }) => { | ||
// setup | ||
await homePage.initiateLogin(); | ||
await expect(page).toHaveURL(/.*home/); | ||
await homePage.createPatient(); | ||
await homePage.startPatientVisit(); | ||
|
||
// replay | ||
await homePage.goToLabOrderForm(); | ||
await page.getByRole('button', { name: 'Add', exact: true }).click(); | ||
await page.locator('#tab select').selectOption('857AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'); | ||
await homePage.saveLabOrder(); | ||
|
||
// verify | ||
await homePage.goToERPNext(); | ||
await expect(page).toHaveURL(/.*home/); | ||
await homePage.searchCustomerInERPNext(); | ||
|
||
// Assert the presence of customer in ERPNext | ||
}); | ||
|
||
test.afterEach(async ({ page }) => { | ||
homePage = new HomePage(page); | ||
// await homePage.deletePatient(); | ||
await page.close(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters