From cd62cc190160328bc9259379f3c817aafd247402 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 10 Sep 2019 23:43:59 +0800 Subject: [PATCH] test:e2e - fix responsie argument --- test/e2e/helpers.js | 6 +++--- test/e2e/metamask-responsive-ui.spec.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index a10dd17e3..7ab78e895 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -39,13 +39,13 @@ module.exports = { } -async function prepareExtensionForTesting () { +async function prepareExtensionForTesting ({ responsive }={}) { let driver, extensionId, extensionUrl const targetBrowser = process.env.SELENIUM_BROWSER switch (targetBrowser) { case 'chrome': { const extPath = path.resolve('dist/chrome') - driver = buildChromeWebDriver(extPath, { responsive: true }) + driver = buildChromeWebDriver(extPath, { responsive }) await delay(largeDelayMs) extensionId = await getExtensionIdChrome(driver) extensionUrl = `chrome-extension://${extensionId}/home.html` @@ -53,7 +53,7 @@ async function prepareExtensionForTesting () { } case 'firefox': { const extPath = path.resolve('dist/firefox') - driver = buildFirefoxWebdriver({ responsive: true }) + driver = buildFirefoxWebdriver({ responsive }) await installWebExt(driver, extPath) await delay(largeDelayMs) extensionId = await getExtensionIdFirefox(driver) diff --git a/test/e2e/metamask-responsive-ui.spec.js b/test/e2e/metamask-responsive-ui.spec.js index ae45c6c08..a413aae5c 100644 --- a/test/e2e/metamask-responsive-ui.spec.js +++ b/test/e2e/metamask-responsive-ui.spec.js @@ -27,7 +27,7 @@ describe('MetaMask', function () { this.bail(true) before(async function () { - const result = await prepareExtensionForTesting() + const result = await prepareExtensionForTesting({ responsive: true }) driver = result.driver extensionId = result.extensionId await setupFetchMocking(driver)