Closed Bug 1476395 Opened 6 years ago Closed 6 years ago

Add unit tests for the flexbox inspector sidebar

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: gl, Assigned: gl)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Priority: -- → P3
No longer blocks: 1470379
Assignee: nobody → gl
Status: NEW → ASSIGNED
Attached patch 1476395.patch [1.0] (deleted) — Splinter Review
Attachment #9024558 - Flags: review?(pbrosset)
Comment on attachment 9024558 [details] [diff] [review] 1476395.patch [1.0] Review of attachment 9024558 [details] [diff] [review]: ----------------------------------------------------------------- One comment about the commit message: these aren't unit tests, these are either integration tests, or maybe just mochitests if we want to be more specific. But they're not unit tests for sure. Could you please update the commit message? Also I have 2 minor comments below. But R+ with a green try build and those things addressed. Thanks! ::: devtools/client/inspector/flexbox/test/browser_flexbox_empty_state.js @@ +6,5 @@ > +// Test that a message is displayed when no flex container is selected. > + > +const TEST_URI = ` > + <style type='text/css'> > + </style> No need for an empty <style> tag in here. Simply having the <div></div> markup would be enough. ::: devtools/client/inspector/flexbox/test/browser_flexbox_toggle_flexbox_highlighter_02.js @@ +27,5 @@ > + let onHighlighterShown = highlighters.once("flexbox-highlighter-shown"); > + let onToggleChange = waitUntilState(store, state => state.flexbox.highlighted); > + flexHighlighterToggle.click(); > + await onHighlighterShown; > + await onToggleChange; We repeat (roughly) these 6 lines of code several times in this test and in the previous test too. Could you please move this logic to a new function in the nearby heard.js file? Something like toggleHighlighter(state)
Attachment #9024558 - Flags: review?(pbrosset) → review+
Pushed by gabriel.luong@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/86005ec774e6 Add mochitests for the flexbox inspector sidebar. r=pbro
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: