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

UIU-2431 create JEST/RTL test cases for UserSearch.js #2449

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ssandupatla
Copy link
Contributor

UIU-2431 create JEST/RTL test cases for UserSearch.js
URL: https://issues.folio.org/browse/UIU-2431

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

16/20 tests here end by taking some action without a follow-up expect call to validate that something happened as a result of that action. This validates that the function was callable, but that's it: it doesn't establish that the function behaves correctly.

Maybe you need to add assertions that a "submit" button is disabled until required fields have been filled out, and then assert that that it's enabled when they are completed, and then assert that clicking the button causes it to to disappear (presumably because the modal containing it closes, which is something else you could assert). Maybe you need to mock an API so you can assert that when somebody types 3/12/2023 into a date-field and then hits "Save" it closes the modal and makes an API request to some-report?query=startDate=2023-03-12. etc. etc.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ssandupatla ssandupatla requested review from cchitneedi and zburke June 27, 2023 06:41
@VSnehalatha VSnehalatha requested a review from ryandberger July 14, 2023 11:19
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.

3 participants