Skip to content

Conversation

HelNershingThapa
Copy link
Contributor

@HelNershingThapa HelNershingThapa commented Jul 12, 2023

Coming from #5964 (comment), this PR:

  • Fix warnings for tests in src/views/tests/project.test.js
  • Refactor src/views/tests/taskSelection.test.js to utilize the createComponentWithMemoryRouter function.

- Fixed warning in related to the usage of navigate() outside of a useEffect() hook. The warning was triggered when setting parameters only in the test case, not directly related to the navigate() function from react-router-dom. The issue specifically occurred when no parameters were passed while visiting the user projects page, resulting in the selection of a fallback filter for 'managed by me'.
- Refactored the test case for the 'Project Detail Page' to utilize the `createComponentWithMemoryRouter` function.
- Resolved the `Error: Not implemented: window.scrollTo` by assigning a Jest function to `window.scrollTo`.
@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
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant