Added test for gillick consent and self consent on the same day and next#1141
Added test for gillick consent and self consent on the same day and next#1141chinmaymudholkar1 wants to merge 2 commits intomainfrom
Conversation
| indirect=True, | ||
| ids=lambda v: f"{v[0]}-{v[1]}", | ||
| ) | ||
| def test_gillick_consent_and_vaccination( |
There was a problem hiding this comment.
Is it worth extending the existing `test_gillick with the self-consent and vaccination steps rather than creating a new one?
There was a problem hiding this comment.
I think the two should be separate because of the different validation points - test_gillick tests CRUD operations on Gillick assessments while test_gillick_consent_and_vaccination tests the vaccination workflow.
If test_gillick fails, it's a Gillick assessment issue; if test_gillick_consent_and_vaccination fails, it's a workflow integration issue
There was a problem hiding this comment.
I agree it touches on different parts, but depending on where the test fails tells us which section, which is why I think it's okay for them to be the same test.
For example, if something has broken in the Gillick assessment part then both test_gillick and test_gillick_consent_and_vaccination will break, therefore test_gillick is not giving us any additional information.
| Test: Verify that Gillick consent given on day A cannot be used | ||
| to vaccinate on day B. |
There was a problem hiding this comment.
I'm not sure this tests the right thing, this ends up testing that the session allows you to record vaccinations, and it doesn't because it's on a different day (the text on the "Record vaccinations" tab shows the message as such). However, this will be the case regardless of whether the child has self-consent or not, so it's not testing the specifics of self-consent.
There was a problem hiding this comment.
I am only trying to assert that a child cannot be vaccinated the next/different day if they have self consented. I am not sure if this particular scenario can be tested in any other way. Open to suggestions if there is.
There was a problem hiding this comment.
I don't think this scenario can be tested with the end-to-end tests at the moment, it requires the current date to be changed to a different day which is recorded as a coverage gap: #852
…me day as gillick consent and vaccination cannot be recorded next day.
9971a29 to
b808e5f
Compare
Added tests for https://nhsd-jira.digital.nhs.uk/browse/MAV-5915 to check that: