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

Update tests for the notifications page components #5885

Merged
merged 9 commits into from
Jun 26, 2023

Conversation

HelNershingThapa
Copy link
Contributor

@HelNershingThapa HelNershingThapa commented Jun 6, 2023

Closes #5722

This pull request primarily focuses on updating component tests on the notifications page. Additionally, it includes several other improvements unrelated to the test code. Here is a summary of the changes:

  • Updated tests for components on the notifications page.
  • Resolved an issue by sending setPoputFocus to the InboxNavMini component, preventing an uncaught error when routing to a location using Link.
  • Added a generateSampleNotifications function to simplify testing interactions with all notifications on a page.
  • Implemented a server handler to intercept requests to the GET /notifications/:id endpoint.
  • Moved the updateUnreadCount function to the ActionButtons component to eliminate prop drilling and improve code organization.
  • Removed unnecessary else conditional statements from the onSortSelect function since the dropdown selection is single select.
  • Updated the error message text when loading notification details fail on the modal.

Resolves an issue preventing an uncaught error when routing to a location using `Link`
he `generateSampleNotifications` function is added, which takes the number of samples as a parameter and generates an array of sample notification objects.
to eliminate prop drilling and improve code organization maybe.
Will now show error loading notification instead of error loading message
… function

since the dropdown selection is single select?
the previous commits I'm taking about here being the use of function to generate n number of notifications and removal of updateUnreadCount as props to ActionButtons
@sonarcloud
Copy link

sonarcloud bot commented Jun 23, 2023

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

@HelNershingThapa HelNershingThapa merged commit 3b090d1 into develop Jun 26, 2023
8 checks passed
@HelNershingThapa HelNershingThapa deleted the tests/5722-notifications-page branch June 26, 2023 06:04
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.

Update test cases for the notifications page
2 participants