Closed Bug 1386523 Opened 8 years ago Closed 7 years ago

Move store debug logging in test as an option of openNewTabAndConsole helper

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(firefox57 wontfix, firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox57 --- wontfix
firefox60 --- fixed

People

(Reporter: nchevobbe, Assigned: bgrins)

Details

(Whiteboard: [newconsole-mvp])

Attachments

(1 file)

We have a few tests that use the same snippet to log every store changes (http://searchfox.org/mozilla-central/search?q=store.subscribe(()+%3D%3E+{&case=false&regexp=false&path=devtools%2Fclient%2Fwebconsole). This could be moved to the opennewTabAndConsole helper function, as an option
Flags: qe-verify-
Priority: -- → P2
Whiteboard: [reserve-console-html]
Priority: P2 → P3
Priority: P3 → P4
Flags: qe-verify-
Priority: P4 → P2
Whiteboard: [reserve-console-html] → [newconsole-mvp]
Ended up making this a separate helper function instead of an option on openNewTabAndConsole since at least one of the consumers wasn't already using openNewTabAndConsole. To really clean this up I think we'd want to update every test possible to use openNewTabAndConsole, and then change signature there to make options an object (instead of adding a third param after clearJstermHistory). That said, I think this on it's own is a simple improvement and I didn't have the time today to do more. By the way, the logging had broken on `store.getState().messages.messagesById.reduce` with "reduce is not a function" since messagesById is a Map now, so this patch fixes that as well. It wasn't causin test failures since the error was happening in the subscribe callback.
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Priority: P2 → P1
Comment on attachment 8944882 [details] Bug 1386523 - Make store debug logging into a shared helper function for webconsole mochitests; https://reviewboard.mozilla.org/r/215046/#review220808 Looks good to me, thanks Brian
Attachment #8944882 - Flags: review?(nchevobbe) → review+
Pushed by bgrinstead@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5aa587585663 Make store debug logging into a shared helper function for webconsole mochitests;r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: