Closed Bug 1683153 Opened 5 years ago Closed 1 year ago

Refactor CSS Grid Highlighter tests to use generic highlighter test helpers

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(Fission Milestone:Future, firefox139 fixed)

RESOLVED FIXED
139 Branch
Fission Milestone Future
Tracking Status
firefox139 --- fixed

People

(Reporter: rcaliman, Assigned: nchevobbe)

References

Details

(Whiteboard: dt-fission-future)

Attachments

(1 file)

Follow up for Bug 1572652 where we refactored CSS Grid highlighters to use generic highlighter events ("highlighter-shown", "highlighter-hidden"), but did not update all tests to use the generic test helpers introduced in https://phabricator.services.mozilla.com/D85858.

For uniformity, the tests in https://searchfox.org/mozilla-central/source/devtools/client/inspector/grids/test should be migrated to use the new helpers and drop the custom events ("grid-highlighter-shown", "grid-highlighter-hidden"), as well as the shims for getting the parentGridHighlighters map.

Example snippet:

const HIGHLIGHTER_TYPE = inspector.highlighters.TYPES.GRID;
const { waitForHighlighterTypeShown, waitForHighlighterTypeHidden } = getHighlighterTestHelpers(inspector);

const onHighlighterShown = waitForHighlighterTypeShown(HIGHLIGHTER_TYPE)
// do action to show highlighter (ex: click toggle), then wait for the promise to resolve
const { nodeFront, highlighter } = await onHighlighterShown();

const onHighlighterHidden = waitForHighlighterTypeHidden(HIGHLIGHTER_TYPE)
// do action to hide highlighter, then wait for the promise to resolve
const { nodeFront, highlighter } = await onHighlighterHidden();
Severity: -- → S4
Priority: -- → P3
Summary: Update CSS Grid Highlighter tests to use generic highlighter test helpers → Refactor CSS Grid Highlighter tests to use generic highlighter test helpers
Whiteboard: dt-fission-m3-reserve

Tracking dt-fission-m3-reserve bugs for Fission MVP.

Fission Milestone: --- → MVP

Moving "dt-fission-m3-reserve" bugs to "dt-fission-future" because they don't block Fission MVP.

Fission Milestone: MVP → Future
Whiteboard: dt-fission-m3-reserve → dt-fission-future

Migrate tests that were using this to actually check the rendered highlighters
in the DOM.
We add a "isParent" option to the grid highlighters so we can set it as an
attribute in the DOM and run some assertions in tests.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea85a86cf6e1 [devtools] Remove HighlightersOverlay.parentGridHighlighters. r=devtools-reviewers,ochameau.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea981fe545ac [devtools] Remove HighlightersOverlay.parentGridHighlighters. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: