Closed Bug 1697391 Opened 4 years ago Closed 4 years ago

Use a single waitForDispatch test helper and move it to devtools shared-head.js

Categories

(DevTools :: General, task, P3)

task

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Several DevTools test suites implement their own waitForDispatch helpers:
https://searchfox.org/mozilla-central/search?q=function+waitForDispatch&path=devtools

We have currently 8 different implementations, we should try to consolidate to a single implementation and move it to shared-head.js.

There are some minor differences; for instance some methods are expecting a generic store argument while others expect a panel argument and extract the store from it. But there also some potentially more impacting differences, such as the handling of async actions, and support for action count.

See https://phabricator.services.mozilla.com/D107674

Blocks: 1261076
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED

One of the problems with those async actions is that the states are panel specific. Debugger uses "error" & "done", while DOM uses "error" & "end". We can make the generic helper support all possible states, or we could unify all our redux codebase to use the same status strings.

Blocks: 1697440
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4ea5bd68072f [devtools] Use a shared waitForDispatch helper in devtools mochitests r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: