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

Create a new cypress test to add a new location to a facility #10960

Open
2 tasks
nihal467 opened this issue Mar 3, 2025 · 3 comments
Open
2 tasks

Create a new cypress test to add a new location to a facility #10960

nihal467 opened this issue Mar 3, 2025 · 3 comments
Assignees

Comments

@nihal467
Copy link
Member

nihal467 commented Mar 3, 2025

Describe the Test

Create a new cypress test to add a new location in a facility and cover all its happy flow functionality

Rules to be followed

docs.ohc.network/docs/care/development/guidelines-to-write-cypress

  • Since we are connected to the dev backend, create a new user in the platform and update the fixture and use that ID for this test
  • Create a new file called patient_locationt.cy.ts and related object file

Things to be Covered

  • Create a new multi-type location (Room, Bed, and House) and verify that the location search functions correctly. (Test-1)
  • Create a new bed location, navigate to the encounter page, open any live encounter, and confirm that you can assign the patient to the new location in the "Manage Location" section. (Test-2)
@nihal467 nihal467 added this to the Cypress Coverage in CARE milestone Mar 3, 2025
@AdityaP700
Copy link
Contributor

AdityaP700 commented Mar 3, 2025

@nihal467 This looks like an interesting E2E issue, but I have a few queries regarding location creation and updates to ensure the test covers necessary scenarios:

  • In Test-1, should it create all three location types (Room, Bed, House) within a single test, or would it be better to have separate tests for each type to ensure more granular validation?
  • In Test-2, What should happen if the assigned location is already occupied? Should it include error handling scenarios in the test?
    Looking for the insights

@github-actions github-actions bot added needs-triage question Further information is requested labels Mar 3, 2025
@nihal467
Copy link
Member Author

nihal467 commented Mar 3, 2025

@AdityaP700

Since there are only three location types, we should keep them in a single test rather than separating them. Splitting them would add unnecessary steps and increase execution time without any additional benefit.
Currently, if a location is already occupied, it does not appear in the dropdown. Since we're connected to the local development backend, this could lead to flaky tests. To avoid this, we should ignore the occupied locations for now.

@nihal467 nihal467 removed question Further information is requested needs-triage labels Mar 3, 2025
@AdityaP700
Copy link
Contributor

Alright i see ,thanks for the clarification . Well i know it's an extensive issue to work on but i would like to have my hands on this issue ,Thus if you consider me assigning me this issue i will surely try and make the things work within a few days .

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

No branches or pull requests

2 participants