Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

FormModel tests - #207

Merged
james-martin-jd merged 12 commits into
developfrom
tests/refactor-tests
Apr 2, 2020
Merged

FormModel tests#207
james-martin-jd merged 12 commits into
developfrom
tests/refactor-tests

Conversation

@angelaraya

Copy link
Copy Markdown
Contributor

On this PR:

  • Update testing-library to @testing-library/...
  • Remove empty tests
  • Add tests for the components that are part of the FormModel rendering process.
  • Move testing dependencies to devDependencies

@angelaraya

Copy link
Copy Markdown
Contributor Author

The remaining failing tests are from the Shex components and custom hooks that were not part of the refactor.

Several of the tests were failing for various reasons. These reasons include improper jest functions, incorrectly assumed structures, and using the wrong value property.
@james-martin-jd

Copy link
Copy Markdown
Contributor

Reviewed the tests - they look good. Adding some fixes to the other tests that are failing so all tests run successfully.

james-martin-jd and others added 3 commits March 30, 2020 13:04
Updated existing, older tests so that they render on each test. The sequential testing was causing issues with the render not being there as expected.
Re-render withAuthorization in each test

@NSeydoux NSeydoux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall it looks all good, I just have a couple of questions that I left as comments where appropriate. Also, neither src/lib/components/FormModel/children/Spinner nor src/lib/components/FormModel/children/Viewer/UI/MultipleViewer include tests right now, is this an issue ?

Comment thread src/lib/components/FormModel/children/Form/UI/Select/select.test.js
Comment thread src/lib/components/FormModel/children/Group/group.test.js Outdated
Comment thread src/lib/components/FormModel/children/Multiple/multiple.test.js Outdated
Comment thread src/lib/components/FormModel/form-model.test.js Outdated
@james-martin-jd
james-martin-jd requested a review from NSeydoux April 1, 2020 16:54
@james-martin-jd
james-martin-jd merged commit fa589c2 into develop Apr 2, 2020
@james-martin-jd
james-martin-jd deleted the tests/refactor-tests branch April 2, 2020 13:37
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.

4 participants