Skip to content
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-2722: Add E2E test for returning to home page and patient list page from the patient chart #957

Merged
merged 9 commits into from
Feb 28, 2024

Conversation

kdaud
Copy link
Member

@kdaud kdaud commented Jan 30, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

Screenshots

Related Issue

https://issues.openmrs.org/browse/O3-2722

Other

e2e/specs/patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/patient-search.spec.ts Outdated Show resolved Hide resolved
@kdaud kdaud force-pushed the O3-2722 branch 2 times, most recently from 29efc48 to d9bc61e Compare February 9, 2024 08:31
@kdaud kdaud changed the title O3-2722: Add E2E test for user returning to patient list and home page from the patient chart O3-2722: Add E2E test for returning to home page and patient list page from the patient chart Feb 9, 2024
@kdaud kdaud force-pushed the O3-2722 branch 2 times, most recently from a843ae0 to d157c85 Compare February 9, 2024 08:47
@kdaud kdaud changed the title O3-2722: Add E2E test for returning to home page and patient list page from the patient chart (test) O3-2722: Add E2E test for returning to home page and patient list page from the patient chart Feb 9, 2024
@kdaud
Copy link
Member Author

kdaud commented Feb 12, 2024

@jayasanka-sack this PR is waiting review. Thanks

@kdaud
Copy link
Member Author

kdaud commented Feb 20, 2024

@vasharma05 @denniskigen @brandones could you review this PR? Thanks.

@brandones
Copy link
Contributor

Where'd @jayasanka-sack go?

@vasharma05
Copy link
Member

Hi @Piumal1999 @jayasanka-sack, please review this PR.
Thanks!

@jayasanka-sack
Copy link
Member

Hey, I'm so sorry I missed this. Let me have a look.

@jayasanka-sack
Copy link
Member

jayasanka-sack commented Feb 21, 2024

Hey Daud, kudos on getting the steps implemented! I've got a suggestion to make things even more organized:

create a new spec with the following:

Given I have a patient list with patients <- Use before each hook, create a list with few patients using the API

# test 1

When I navigate to the patient list
And I click on the patient {{name}} in the list
Then I should be redirected to the patient's chart page
When I click the close button
Then I should be redirected back to the patient list

...

# test 3

When I navigate to the patient list
And I click on the patient {{name}} in the list
Then I should be redirected to the patient's chart page
When I click on the visits tab
And I reload the page
And I click the close button
Then I should be redirected back to the patient list

....

// Add other tests except test 4

....

// Clean all the data at the end

@kdaud @brandones let me know what you think

@kdaud
Copy link
Member Author

kdaud commented Feb 21, 2024

@jayasanka-sack I would suggest to break the test into the suggested cases without creating a new spec file since they're concerning with patient list. I'm open to suggestion.

@jayasanka-sack
Copy link
Member

The reason for new spec is that it calls for different pre-populated data, meaning we'll need different 'Given' statements. That also means we'll have to set up new 'beforeEach' and 'afterEach' hooks.

@kdaud
Copy link
Member Author

kdaud commented Feb 22, 2024

@jayasanka-sack I've addressed the suggestion. Could you review the changes? thanks.

Copy link
Member

@jayasanka-sack jayasanka-sack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much, Daud! I added few minor comments.

e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
e2e/specs/return-to-patient-list.spec.ts Outdated Show resolved Hide resolved
Copy link
Member

@jayasanka-sack jayasanka-sack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch, @kdaud !

@jayasanka-sack jayasanka-sack merged commit 7643d03 into openmrs:main Feb 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants