New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(test) O3-2107: Add patient chart allergies E2E test #1205
Conversation
@jayasanka-sack @anjula-sack @Piumal1999 Could you please review this PR? |
packages/esm-patient-allergies-app/src/allergies/allergies-detailed-summary.component.tsx
Outdated
Show resolved
Hide resolved
packages/esm-patient-allergies-app/src/allergies/allergies-overview.component.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's extend the test to test the food and environment allergies as well @RandilaP |
Good job! @RandilaP Let's test the notification as well. |
@jayasanka-sack @anjula-sack @Piumal1999 Could you please review the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RandilaP for the PR. I've taken the time to review it and have left some comments. Could you please take a moment to review them? Let me know if you require any further clarifications.
@RandilaP Can you fix the conflicts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check your screenshot as well @RandilaP,
e2e/pages/allergies-page.ts
Outdated
@@ -3,6 +3,7 @@ import { Page } from '@playwright/test'; | |||
export class AllergiesPage { | |||
constructor(readonly page: Page) {} | |||
|
|||
readonly tableRow = () => this.page.locator('tr'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a space here.
readonly tableRow = () => this.page.locator('tr'); | |
readonly tableRow = () => this.page.locator('tr'); | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be other tables on the page. To be specific, we can use the extension id attribute.
data-extension-id="allergies-details-widget"
.
Also, instead of locating the row, it would be better to locate only the table here. Check my other comment on the spec. Using a variable name something like allergyTable
would also work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this doesn't fail because the heading row of the table itself a tr
@anjula-sack @Piumal1999 @jayasanka-sack Could you please review this |
Hey, @RandilaP! Pro tip: It might be a cool idea to resolve any ongoing conversations before throwing in another review request. 😁 Happy resolving and reviewing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep up the great work! Cheers! 🎉
e2e/pages/allergies-page.ts
Outdated
@@ -3,6 +3,7 @@ import { Page } from '@playwright/test'; | |||
export class AllergiesPage { | |||
constructor(readonly page: Page) {} | |||
|
|||
readonly tableRow = () => this.page.locator('tr'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There can be other tables on the page. To be specific, we can use the extension id attribute.
data-extension-id="allergies-details-widget"
.
Also, instead of locating the row, it would be better to locate only the table here. Check my other comment on the spec. Using a variable name something like allergyTable
would also work.
e2e/pages/allergies-page.ts
Outdated
@@ -3,6 +3,7 @@ import { Page } from '@playwright/test'; | |||
export class AllergiesPage { | |||
constructor(readonly page: Page) {} | |||
|
|||
readonly tableRow = () => this.page.locator('tr'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this doesn't fail because the heading row of the table itself a tr
@RandilaP can you fix the conflicts here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! @RandilaP
Requirements
Summary
This PR aims to write an E2E test for record allergies in the patient chart repository.
Screenshots
Related Issue
https://issues.openmrs.org/browse/O3-2107
Other