Closed
Bug 1433901
Opened 6 years ago
Closed 6 years ago
Add automated test for "Bookmarks can be removed from the Bookmarks Toolbar and from the Library"
Categories
(Firefox :: Bookmarks & History, enhancement, P2)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: icrisan, Assigned: icrisan)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxsearch])
Attachments
(1 file, 1 obsolete file)
7.79 KB,
patch
|
standard8
:
review+
|
Details | Diff | Splinter Review |
testrail link: https://testrail.stage.mozaws.net/index.php?/cases/view/4098 Preconditions: A dirty profile with a reasonable amount of browsing history and bookmarks. Steps: 1. Launch Firefox 2. Enable the Bookmarks Toolbar 3. Right-click any of the bookmarks displayed in the toolbar and select Delete. Expected results: Step 1: Firefox is successfully launched. Step 2: The Bookmarks Toolbar is enabled and displayed below the Location Bar. Step 3: The bookmark is successfully removed.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Hi Mark, It is ok to merge also this test and browser_library_remove_bookmarks.js in a new js file for example browser_remove_bookmarks.js? Thank you!
Flags: needinfo?(standard8)
Comment 2•6 years ago
|
||
(In reply to Ioana Crisan from comment #1) > It is ok to merge also this test and browser_library_remove_bookmarks.js in That took me a while, there's no 's' on the actual filename. > a new js file for example browser_remove_bookmarks.js? Yes, that would be fine.
Flags: needinfo?(standard8)
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #2) > (In reply to Ioana Crisan from comment #1) > > It is ok to merge also this test and browser_library_remove_bookmarks.js in > > That took me a while, there's no 's' on the actual filename. > > > a new js file for example browser_remove_bookmarks.js? > > Yes, that would be fine. Indeed! Sorry for the 's'.
Assignee | ||
Updated•6 years ago
|
Summary: Add automated test for "Bookmarks can be removed from the Bookmarks Toolbar" → Add automated test for "Bookmarks can be removed from the Bookmarks Toolbar and from the Library"
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #8947079 -
Flags: review?(standard8)
Comment 5•6 years ago
|
||
Comment on attachment 8947079 [details] [diff] [review] browser_remove_bookmarks Review of attachment 8947079 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for the patch, looking good, just a couple of things to tidy up. ::: browser/components/places/tests/browser/browser_remove_bookmarks.js @@ +9,5 @@ > + */ > + > +const TEST_URL = "about:mozilla"; > + > +function getToolbarNodeForItemGuid(aItemGuid) { This function is already in head.js, so shouldn't need repeating here. @@ +48,5 @@ > + let toolbarNode = getToolbarNodeForItemGuid(toolbarBookmark.guid); > + > + toolbarBookmark = []; > + await PlacesUtils.bookmarks.fetch({ url: TEST_URL }, bm => toolbarBookmark.push(bm)); > + Assert.equal(toolbarBookmark.length, 1, "Should have one bookmark in the database"); I don't think we need the additional check here prior to the test - we know what we're putting into it. You could put an eraseEverything into setup (so that we erase before & after). @@ +69,5 @@ > + await removePromise; > + > + toolbarBookmark = []; > + await PlacesUtils.bookmarks.fetch({ url: TEST_URL }, bm => toolbarBookmark.push(bm)); > + Assert.equal(toolbarBookmark.length, 0, "Should have removed the bookmark from the database"); This last bit can be simplified to: Assert.equal(PlacesUtils.bookmarks.fetch({ url: TEST_URL }), null, "Should have removed the bookmark from the database"); @@ +134,5 @@ > + Assert.equal(library.ContentTree.view.result.root.childCount, 2, "Should have removed the bookmark from the display"); > + > + // Cleanup. > + registerCleanupFunction(async function() { > + await PlacesUtils.bookmarks.eraseEverything(); This cleanup erase is already registered in the setup function, so no need for it to be here as well.
Attachment #8947079 -
Flags: review?(standard8)
Updated•6 years ago
|
Priority: -- → P2
Assignee | ||
Comment 7•6 years ago
|
||
Attachment #8947079 -
Attachment is obsolete: true
Attachment #8950150 -
Flags: review?(standard8)
Assignee | ||
Comment 8•6 years ago
|
||
TRY results: https://treeherder.mozilla.org/#/jobs?repo=try&revision=51982fe1c50f956f2cfa9ed28c3e4eb6990b3d76
Assignee | ||
Comment 9•6 years ago
|
||
Please consider these TRY results: https://treeherder.mozilla.org/#/jobs?repo=try&revision=311b9a13ea1d624c801bfa3047e4b65cfac6f308
Comment 10•6 years ago
|
||
Comment on attachment 8950150 [details] [diff] [review] browser_remove_bookmarks_1 Review of attachment 8950150 [details] [diff] [review]: ----------------------------------------------------------------- Great, thank you. r=Standard8
Attachment #8950150 -
Flags: review?(standard8) → review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Comment 11•6 years ago
|
||
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/mozilla-inbound/rev/575415a1d055 Add a test for checking that bookmarks can be removed from toolbar and from library. r=Standard8
Keywords: checkin-needed
Comment 12•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/575415a1d055
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Updated•6 years ago
|
Whiteboard: [fxsearch]
You need to log in
before you can comment on or make changes to this bug.
Description
•