-
Notifications
You must be signed in to change notification settings - Fork 0
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 result list #92
Test result list #92
Conversation
392721a
to
71d3f53
Compare
71d3f53
to
0358365
Compare
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.
Looks good.
const renderTestReportForm = () => { | ||
render(<ContextAndModal children={<ReportForm initialValues={noValues} />} />, { wrapper: BrowserRouter }); | ||
}; | ||
|
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.
Is this needed in order to render a modal during the test?
One thing to consider. It could be beneficial to weigh up having more integration tests vs. having a small number of end-to-end tests that go through the form like a human would. You could use a tool called Puppeteer or Cypress to do this.
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.
Yep it is! though also a router is also required so that we can use useNavigate
, even if we're mocking it. Agreed, though this style of integration testing also feels similar to how a user would interact with the site, that would give us the benefit of not having to create our component for testing
beforeEach(() => { | ||
return clearFhirAndSendReports(); | ||
}); |
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.
Does this test delete the data already in the development fhir server if its run locally? I'm just thinking whether it's desirable for a test to change the data? I guess it doesn't matter too much, but thought I'd raise the question.
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.
Yeah it does, I think that if this were rolled out further into production then it might be worth adding some guards to the setup functions so that they can't be run on a real server.
Adding in automated tests for result list, also ensured use of identifiers that should have been there before
Closes #89