Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

add acceptance test for patients.admitted #785

Closed

Conversation

ZachEddy
Copy link

@ZachEddy ZachEddy commented Nov 1, 2016

Fixes #699.

Adds an acceptance test for patients.admitted

Because patients and patients.admitted use the same partial, they can be tested identically.

To avoid duplicate code, I wrapped the patients and patients.admitted test inside a helper function named testPatientList.

The logic for both tests is identical and unchanged, so it may not be worth testing these separately. I was just looking for a bite-size pull request to get oriented.

I'll start tackling more of these acceptance test issues.

cc @HospitalRun/core-maintainers

Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

@ZachEddy thanks for the PR! While this PR does add testing to the admitted patients screen, it doesn't really test the functionality of that screen.
What this acceptance test should test is the workflow of the admitted patients screen, which is to say, only admitted patients should show up on that screen and once a patient is discharged, they should disappear from that screen.
I just changed the patients pouch dump so that it has a patient in an admitted state, so this test should do the following:

  1. Verify that the patient shows up on the admitted list.
  2. Discharge the patient
  3. Verify that the patient is no longer on the admitted list.

@ZachEddy ZachEddy closed this Nov 2, 2016
@ZachEddy
Copy link
Author

ZachEddy commented Nov 2, 2016

Thanks for the reply, @jkleinsc! Your feedback makes a lot of sense. I'll start writing a test to meet the requirements you listed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants