Bug 1500475 - Modify browser_jsterm_content_defined_helpers.js to find cause of intermittent; r=bgrins.
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Fri, 19 Oct 2018 16:12:13 +0000
changeset 500662 a159b99e2a0b8516b852e47e257c8752fa3b55b6
parent 500661 d38486cbad8d8388fa3596139473b89ef35b9821
child 500663 4a81fd6046965751585ae7b85740417bb542aa04
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1500475
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1500475 - Modify browser_jsterm_content_defined_helpers.js to find cause of intermittent; r=bgrins. The log we currently receive are not really actionable (we are using ok, so we don't know what the received value actually is). Switching to is should give us what the value is when the test fails, which might help us fix the failure. Differential Revision: https://phabricator.services.mozilla.com/D9270
devtools/client/webconsole/test/mochitest/browser_jsterm_content_defined_helpers.js
--- a/devtools/client/webconsole/test/mochitest/browser_jsterm_content_defined_helpers.js
+++ b/devtools/client/webconsole/test/mochitest/browser_jsterm_content_defined_helpers.js
@@ -50,15 +50,16 @@ async function performTests() {
   const {autocompletePopup} = jsterm;
 
   for (const helper of HELPERS) {
     await setInputValueForAutocompletion(jsterm, helper);
     const autocompleteItems = getPopupLabels(autocompletePopup).filter(l => l === helper);
     is(autocompleteItems.length, 1,
       `There's no duplicated "${helper}" item in the autocomplete popup`);
     const msg = await jsterm.execute(`${helper}()`);
-    ok(msg.textContent.includes(PREFIX + helper), `output is correct for ${helper}()`);
+    is(msg.textContent.trim(), `"${PREFIX + helper}"`,
+      `output is correct for ${helper}()`);
   }
 }
 
 function getPopupLabels(popup) {
   return popup.getItems().map(item => item.label);
 }