Skip to content

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.

4 participants