Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaud committed Aug 22, 2024
1 parent fbdb46c commit 61f1f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2e/tests/diagnosis.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';
import { Odoo } from '../utils/functions/odoo';
import { Bahmni } from '../utils/functions/bahmni';
import { Bahmni, delay } from '../utils/functions/bahmni';

let bahmni: Bahmni;
let odoo: Odoo;
Expand Down Expand Up @@ -50,9 +50,11 @@ test('Create, revise and discontinue diagnosis.', async ({ page }) => {
await page.locator('#view-content :nth-child(1).btn--success').click();
await page.locator('#opd-tabs').getByText('Diagnosis').click();
await page.locator('i.fa.fa-edit').first().click();
await delay(3000);
await page.getByRole('button', { name: 'PRESUMED'}).nth(1).click();
await bahmni.saveOrder();
await page.locator('i.fa.fa-edit').nth(1).click();
await delay(3000);
await page.getByRole('button', { name: 'CONFIRMED' }).nth(1).click();
await bahmni.saveOrder();
await page.locator('#dashboard-link span.patient-name').click();
Expand Down
1 change: 1 addition & 0 deletions e2e/utils/functions/bahmni.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export var patientName = {
givenName : '',
familyName : '',
}
export const delay = (mills) => new Promise(resolve => setTimeout(resolve, mills));

export class Bahmni {
constructor(readonly page: Page) {}
Expand Down

0 comments on commit 61f1f70

Please sign in to comment.