Bug 1223726 - Update tests; r=jdescottes
MozReview-Commit-ID: 6FR7W58WRg0
--- a/devtools/client/styleeditor/test/browser_styleeditor_fetch-from-netmonitor.js
+++ b/devtools/client/styleeditor/test/browser_styleeditor_fetch-from-netmonitor.js
@@ -29,16 +29,20 @@ add_task(async function() {
let styleeditor = await toolbox.selectTool("styleeditor");
let ui = styleeditor.UI;
info("Waiting for the sources to be loaded.");
await ui.editors[0].getSourceEditor();
await ui.selectStyleSheet(ui.editors[1].styleSheet);
await ui.editors[1].getSourceEditor();
+ // Wait till there is 5 requests in Netmonitor store.
+ // (i.e. the Styleeditor panel performed one request).
+ await waitUntil(() => getSortedRequests(store.getState()).length == 5);
+
info("Checking Netmonitor contents.");
let shortRequests = [];
let longRequests = [];
let hugeRequests = [];
for (let item of getSortedRequests(store.getState())) {
if (item.url.endsWith("doc_short_string.css")) {
shortRequests.push(item);
}