diff --git a/.eslintrc.yml b/.eslintrc.yml index 624a657e95..0403ee272d 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -14,6 +14,7 @@ parserOptions: jsx: true plugins: + - mozilla - react - promise diff --git a/test/addon/.eslintrc.js b/test/addon/.eslintrc.js new file mode 100644 index 0000000000..63f006438f --- /dev/null +++ b/test/addon/.eslintrc.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = { + "extends": [ + "plugin:mozilla/browser-test" + ] +} diff --git a/test/addon/browser_screenshots_ui_check.js b/test/addon/browser_screenshots_ui_check.js index 06944d12a0..8f5d106097 100644 --- a/test/addon/browser_screenshots_ui_check.js +++ b/test/addon/browser_screenshots_ui_check.js @@ -1,8 +1,5 @@ "use strict"; -/* global add_task, is, promiseScreenshotsEnabled, promiseScreenshotsReset, - registerCleanupFunction */ - function checkElements(expectPresent, l) { for (let id of l) { is(!!document.getElementById(id), expectPresent, "element " + id + (expectPresent ? " is" : " is not") + " present"); @@ -16,5 +13,9 @@ add_task(function*() { yield promiseScreenshotsReset(); }); + yield BrowserTestUtils.waitForCondition( + () => document.getElementById("screenshots_mozilla_org-browser-action"), + "Screenshots button should be present", 100, 100); + checkElements(true, ["screenshots_mozilla_org-browser-action"]); });