Closed
Bug 1432759
Opened 7 years ago
Closed 7 years ago
"Remove selected" should be greyed out if no item is selected in the site data manager
Categories
(Firefox :: Settings UI, defect, P3)
Tracking
()
VERIFIED
FIXED
Firefox 60
Tracking | Status | |
---|---|---|
firefox60 | --- | verified |
People
(Reporter: johannh, Assigned: mkohler)
References
(Blocks 1 open bug)
Details
(Whiteboard: [storage-v2])
Attachments
(1 file)
Bug 1432759 - 'Remove selected' should be greyed out if no item is selected in the site data manager
(deleted),
text/x-review-board-request
|
johannh
:
review+
|
Details |
Go to about:preferences#privacy and open the site data manager without selecting a site. The "Remove selected" button should be grayed out.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → me
Status: NEW → ASSIGNED
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8946453 [details]
Bug 1432759 - 'Remove selected' should be greyed out if no item is selected in the site data manager
https://reviewboard.mozilla.org/r/216398/#review222178
Static analysis found 1 defect in this patch.
- 1 defect found by mozlint
You can run this analysis locally with:
- `./mach lint check path/to/file` (Python/Javascript/wpt)
If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx
::: browser/components/preferences/in-content/tests/browser_siteData2.js:182
(Diff revision 1)
> + let firstSite = sitesList.querySelector(`richlistitem`);
> + firstSite.click();
> + }
> +
> + function assertRemoveSelectedButtonEnabled() {
> + let frameDoc = win.gSubDialog._topDialog._frame.contentDocument;
Error: 'frameDoc' is already declared in the upper scope. [eslint: no-shadow]
Comment hidden (mozreview-request) |
Reporter | ||
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8946453 [details]
Bug 1432759 - 'Remove selected' should be greyed out if no item is selected in the site data manager
https://reviewboard.mozilla.org/r/216398/#review222668
I think this looks good, I just had a question about the test...
::: browser/components/preferences/in-content/tests/browser_siteData2.js:133
(Diff revision 2)
> removeBtn.doCommand();
> }
> }
> });
>
> +// Test selecting site button state
I wonder if it would be less verbose to just integrate the assertions from this test into one of the other tests, e.g. the "Test selecting and removing partial sites" test below, that way you could also check
- does the button get disabled when removing an item?
- does the button get disabled when removing all items?
What do you think?
::: browser/components/preferences/in-content/tests/browser_siteData2.js:177
(Diff revision 2)
> + await BrowserTestUtils.removeTab(gBrowser.selectedTab);
> +
> + function selectOneEntry() {
> + frameDoc = win.gSubDialog._topDialog._frame.contentDocument;
> + let sitesList = frameDoc.getElementById("sitesList");
> + let firstSite = sitesList.querySelector(`richlistitem`);
Nit: please use double quoutes here
Reporter | ||
Updated•7 years ago
|
Flags: needinfo?(me)
Reporter | ||
Comment 5•7 years ago
|
||
(Also thanks for working on this!)
Comment hidden (mozreview-request) |
Reporter | ||
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8946453 [details]
Bug 1432759 - 'Remove selected' should be greyed out if no item is selected in the site data manager
https://reviewboard.mozilla.org/r/216398/#review222928
r=me with the nit fixed
Thank you!
::: browser/components/preferences/in-content/tests/browser_siteData2.js:248
(Diff revision 3)
> hosts.forEach(host => {
> let site = sitesList.querySelector(`richlistitem[host="${host}"]`);
> if (site) {
> site.click();
> + is(removeBtn.disabled, false, "Should enable the removeSelected button");
> removeBtn.doCommand();
Nit: After this command, the removeBtn should be disabled, right? Can you add an assertion for that?
Attachment #8946453 -
Flags: review?(jhofmann) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 9•7 years ago
|
||
Kind of screwed up try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=11210ea442d3ef881ef0fb55e6277382656ee85f
Setting the checkin-needed keyword anyway, feel free to not take it and let me run another one.
Flags: needinfo?(me)
Keywords: checkin-needed
Reporter | ||
Comment 10•7 years ago
|
||
Those should be all unrelated :)
Comment 11•7 years ago
|
||
Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f37162b61839
'Remove selected' should be greyed out if no item is selected in the site data manager r=johannh
Keywords: checkin-needed
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Comment 13•7 years ago
|
||
Verified fixed using Nightly 61.0a1(2018-03-13) and Beta 60.0b3 on Windows 10 x64, Ubuntu 16.04 x64 and Mac OS X 10.12.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•