-
Notifications
You must be signed in to change notification settings - Fork 1.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
fix(#6503): Recently Viewed Items - Disable button if no items #6533
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6533 +/- ##
==========================================
- Coverage 54.77% 54.69% -0.08%
==========================================
Files 628 628
Lines 26798 26802 +4
Branches 2420 2421 +1
==========================================
- Hits 14678 14659 -19
- Misses 11453 11478 +25
+ Partials 667 665 -2
*This pull request uses carry forward flags. Click here to find out more.
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@vhenckel would you be able to add a quick e2e test for this?
|
@unlikelyzero add e2e test. |
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.
Great work! I've left just a few suggestions.
… the button becomes active again
… the button becomes active again
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.
Thanks for the quick update! We're getting close. I've got just a few more change requests:
expect(await recentObjectsList.locator('.c-recentobjects-listitem').count()).toBe(3); | ||
|
||
// Assert that the button is enabled | ||
expect( |
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.
Great!
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.
Found one issue-- we should disable the clear button only after the user has confirmed the clear action.
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.
LGTM. Smoke-tested this and it works well.
Excellent work, thank you!
Quick sidenote:
I went ahead and fixed the failing e2e test (it was failing because we were already focused on the clock object when navigating to it, so Recent Objects did not populate). Also, our initial state assertions were just checking for toBeTruthy()
, which evaluates to true whether or not the locator exists-- I switched those to toBeVisible()
.
Closes #6503
Describe your changes:
Disabling button when recent view list is empty.
Screen.Recording.2023-03-30.at.19.03.57.mov
All Submissions:
Author Checklist
Reviewer Checklist