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

Feature/react tests #58

Merged
merged 5 commits into from Mar 22, 2022
Merged

Feature/react tests #58

merged 5 commits into from Mar 22, 2022

Conversation

nbarlowATI
Copy link
Member

Very minimal set of tests for react components, essentially just verifying that each major component will render. Some notes:

  • The mermaid chart doesn't seem to render for some reason- the page says "Syntax error in graph", so we test for that
  • ItemViewer test hangs forever if we have an async waitFor around the expect, so we remove that.
  • In several cases (e.g. ItemViewer), not clear why getByText doesn't find text element. getByPlaceholderText seems to be a reliable way of finding placeholder text in forms though.

Related to #20 (see that issue for more detailed discussion of issues.)
More detailed and useful tests to be added in the future, but probably worth merging this skeleton into main for now.

@nbarlowATI nbarlowATI requested a review from mhauru March 21, 2022 17:42
@coveralls
Copy link

coveralls commented Mar 21, 2022

Pull Request Test Coverage Report for Build 2022853977

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.6%) to 86.909%

Totals Coverage Status
Change from base Build 2005252339: -2.6%
Covered Lines: 1434
Relevant Lines: 1650

💛 - Coveralls

Copy link
Collaborator

@mhauru mhauru left a comment

Choose a reason for hiding this comment

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

Looks great, just had a few questions that are mostly about me understanding what is going on.

frontend/src/components/tests/CaseCreator.test.js Outdated Show resolved Hide resolved
frontend/src/components/tests/CaseCreator.test.js Outdated Show resolved Hide resolved
frontend/src/components/tests/ItemEditor.test.js Outdated Show resolved Hide resolved
@nbarlowATI nbarlowATI merged commit 20a180d into main Mar 22, 2022
@AoifeHughes AoifeHughes deleted the feature/react-tests branch November 6, 2023 13:27
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

Successfully merging this pull request may close these issues.

None yet

3 participants