Wait for Redux actions in tests
Categories
(DevTools :: Netmonitor, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: Honza, Unassigned)
References
(Blocks 1 open bug)
Details
This is a follow up for bug 1622043. This bug is nicely unifying the way we are waiting for all data properly received over RDP.
In addition to that we should also wait till Redux actions are dispatched and the UI updated.
We probably need some helpers for:
- Waiting for specific Redux action
- Waiting for all Redux actions in queue (e.g. making sure that a test doesn't finish before an async Redux action is dispatched and handled)
Honza
Reporter | ||
Comment 1•5 years ago
|
||
Nicolas, do you have any tips how we could implement such helpers?
Honza
Comment 2•5 years ago
|
||
Are you looking for something different than waitForDispatch
? (https://searchfox.org/mozilla-central/rev/61f224ec08ddc6f9a93ac45c8c3c5f7159be7c2a/devtools/client/netmonitor/test/head.js#770-789)
For "all the action in queue", I'm not sure. But if you're only afraid about ending a test while there is still some on-flight communication with the server, you might want to check the ignore middleware : https://searchfox.org/mozilla-central/rev/61f224ec08ddc6f9a93ac45c8c3c5f7159be7c2a/devtools/client/shared/redux/middleware/ignore.js
Updated•2 years ago
|
Description
•