Closed Bug 2073001 Opened 2 months ago Closed 1 month ago

browser_context_menu_item.js checks a search shortcut's context menu rather than a top site's

Categories

(Firefox :: New Tab Page, task)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

browser_context_menu_item.js reaches the menu it inspects with .top-sites-list:not(.search-shortcut, .placeholder). .top-sites-list is the <ul>, and those two classes sit on the .top-site-outer items inside it, so the :not() excludes nothing and the test opens the menu of whichever tile comes first.

The test configures no top sites, so that row holds only the @amazon search shortcut TopSitesFeed pins on its own, followed by the add-shortcut tile. The assertion has therefore only ever inspected a search shortcut's two-item menu, never the top site menu its comment describes.

Narrowing the selector is not enough: the test has to configure the default top sites and address one of them by href.

test_contextMenuIcons means to inspect a top site's context menu, but its
selector matched the list rather than the tiles inside it, so it has only ever
opened the menu of the search shortcut that was the row's first tile.

Assignee: nobody → florian
Status: NEW → ASSIGNED
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9775174e1697 https://hg.mozilla.org/integration/autoland/rev/3deae2694c52 Check a top site's context menu rather than a search shortcut's in browser_context_menu_item.js, r=mconley.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
QA Whiteboard: [qa-triage-done-c159/b158]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: