aboutsummaryrefslogtreecommitdiffstats
path: root/test/e2e/func.js
diff options
context:
space:
mode:
authorVimal <vtiwari@coinswitch.co>2018-11-12 20:20:37 +0800
committerVimal <vtiwari@coinswitch.co>2018-11-12 20:20:37 +0800
commit6bb92a8672edf23465fb109c8966d2e56500ea86 (patch)
tree6f5c4e348fb58fcf23b27278ffae1c1b912ad08e /test/e2e/func.js
parent82b11b69a5dea38a4a036096528354a5a291a447 (diff)
parentda1036f2c4b20748407b7fa89b60df5e321fcab7 (diff)
downloadtangerine-wallet-browser-6bb92a8672edf23465fb109c8966d2e56500ea86.tar.gz
tangerine-wallet-browser-6bb92a8672edf23465fb109c8966d2e56500ea86.tar.zst
tangerine-wallet-browser-6bb92a8672edf23465fb109c8966d2e56500ea86.zip
merging upstream branch
Diffstat (limited to 'test/e2e/func.js')
-rw-r--r--test/e2e/func.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/e2e/func.js b/test/e2e/func.js
index 13dfb82f9..5301d78ae 100644
--- a/test/e2e/func.js
+++ b/test/e2e/func.js
@@ -56,23 +56,31 @@ async function setupBrowserAndExtension ({ browser, extPath }) {
return { driver, extensionId, extensionUri }
}
-function buildChromeWebDriver (extPath) {
+function buildChromeWebDriver (extPath, opts = {}) {
const tmpProfile = fs.mkdtempSync(path.join(os.tmpdir(), 'mm-chrome-profile'))
+ const args = [
+ `load-extension=${extPath}`,
+ `user-data-dir=${tmpProfile}`,
+ ]
+ if (opts.responsive) {
+ args.push('--auto-open-devtools-for-tabs')
+ }
return new webdriver.Builder()
.withCapabilities({
chromeOptions: {
- args: [
- `load-extension=${extPath}`,
- `user-data-dir=${tmpProfile}`,
- ],
+ args,
binary: process.env.SELENIUM_CHROME_BINARY,
},
})
.build()
}
-function buildFirefoxWebdriver () {
- return new webdriver.Builder().build()
+function buildFirefoxWebdriver (opts = {}) {
+ const driver = new webdriver.Builder().build()
+ if (opts.responsive) {
+ driver.manage().window().setSize(320, 600)
+ }
+ return driver
}
async function getExtensionIdChrome (driver) {