test: navbar desktop coverage#318
Conversation
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
More information on how to conduct a self review: This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
|
Can it be further improved? @Sparshagarwal29 |
Thanks for the review. If you’d like, I can follow up with focusing on one of those flows (for example, delete confirmation or export actions), or refactor the component slightly to improve testability. |
|
Sure, please go ahead with more mocks as required. Though do make sure not to change the components' UI or functionality, and just test ids or aria labels, etc. |
|
Hey @its-me-abhishek I have improved the test by adding mock . Please take a look . After more improvement |
Description
This PR improves test coverage for the NavbarDesktop component.
I added a few focused tests that exercise real user interactions (opening the user menu, navigation links, GitHub link, and auto-sync UI) rather than relying on snapshot-only coverage.
A very small, non-functional tweak was made in NavbarDesktop to make these behaviors easier to test. No runtime behavior or logic was changed.
Checklist
npx prettier --write .(handled via pre-commit hook)gofmt -w .(not applicable)npm testAdditional Notes
This PR focuses on improving interaction-based test coverage for
NavbarDesktop.Some UI branches depend on third-party UI primitives and internal state transitions,
which are intentionally not over-mocked to keep tests maintainable and realistic.
Before

After
