-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add unit tests for common sidebar functionality #10619
Merged
Merged
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
f61d54b
Add skeleton unit test
tgolen ab12338
Switch test rendering lib
tgolen 9aa11a1
Get component to render inside a test
tgolen 596d17a
Struggle rendering icon
tgolen 278605d
Fix errors for rendering an SVG
tgolen 0234575
Get the tests passing
tgolen c0259be
Add comments to the tests
tgolen 40c2cad
Cleanup tests and clear onyx after each test
tgolen f5aabd3
Remove unnecessary onyx key for preferred locale
tgolen 3fdd8a0
Test that one report is showing in the list
tgolen aca004b
Have test verify no items were rendered
tgolen cfd7e37
Remove unused import
tgolen 0173c33
Add a way to supprest proptype warnings
tgolen 0e3e13d
Switch to a better method for checking array length
tgolen 4779610
Add a test for the order of reports
tgolen ece7808
Remove nested promises
tgolen 0b914d6
Change participant names to identify the reports
tgolen c618fed
Add a test for draft comments on the active report
tgolen e58c132
Merge branch 'main' into tgolen-test-sidebarlinks
tgolen 6590435
WIP trying to get context providers to work
tgolen 33b19e0
WIP trying to get context providers to work
tgolen 4ed2bff
Get the context provider working
tgolen 9d59462
Pass a string for reportID instead of a number
tgolen 07c5cfd
Add a test for the pencil icon
tgolen 720b875
Get the tests working for reports with drafts
tgolen 115854c
Split up the tests so they are smaller
tgolen 2a7f583
Add a test for new comments added to active report
tgolen 2815b5a
Add a test for switching chats while a report has a draft
tgolen e37356d
Add a test for switching chats while a report has a draft
tgolen dd447ea
Add a test for the removal of the pencil icon
tgolen 6a5c8e2
Add a test for keeping draft reports on top
tgolen 7e525cd
Add a test for page refresh
tgolen 3f7ee72
Fix broken test
tgolen 545991d
Merge branch 'main' into tgolen-test-sidebarlinks
tgolen ac12528
Refactor tests for removing of draft onyx key
tgolen 9b81d5a
Fix a bad merge conflict
tgolen 14ee46d
Fix some proptype warnings
tgolen 19b2e43
Simplify the hasDraftComment property
tgolen 21a1c6a
WIP to fix broken test
tgolen e6e9a18
Add a comment about why the test doesn't work
tgolen b97e5b1
Merge branch 'main' into tgolen-test-sidebarlinks
tgolen 38f8541
Move accessability hint onto the icon component
tgolen 394f30d
Fix lint errors
tgolen e92e258
Update src/pages/home/sidebar/SidebarLinks.js
tgolen e464e8e
Remove unnecessary disable of automocking
tgolen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This small refactoring done in this file was to add this prop, which allowed the Icon to be targetted by the unit tests. The rest of the changes in this file are just some cleaning up.