mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
test:e2e - fix responsie argument
This commit is contained in:
parent
7e3f1263f2
commit
cd62cc1901
@ -39,13 +39,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function prepareExtensionForTesting () {
|
async function prepareExtensionForTesting ({ responsive }={}) {
|
||||||
let driver, extensionId, extensionUrl
|
let driver, extensionId, extensionUrl
|
||||||
const targetBrowser = process.env.SELENIUM_BROWSER
|
const targetBrowser = process.env.SELENIUM_BROWSER
|
||||||
switch (targetBrowser) {
|
switch (targetBrowser) {
|
||||||
case 'chrome': {
|
case 'chrome': {
|
||||||
const extPath = path.resolve('dist/chrome')
|
const extPath = path.resolve('dist/chrome')
|
||||||
driver = buildChromeWebDriver(extPath, { responsive: true })
|
driver = buildChromeWebDriver(extPath, { responsive })
|
||||||
await delay(largeDelayMs)
|
await delay(largeDelayMs)
|
||||||
extensionId = await getExtensionIdChrome(driver)
|
extensionId = await getExtensionIdChrome(driver)
|
||||||
extensionUrl = `chrome-extension://${extensionId}/home.html`
|
extensionUrl = `chrome-extension://${extensionId}/home.html`
|
||||||
@ -53,7 +53,7 @@ async function prepareExtensionForTesting () {
|
|||||||
}
|
}
|
||||||
case 'firefox': {
|
case 'firefox': {
|
||||||
const extPath = path.resolve('dist/firefox')
|
const extPath = path.resolve('dist/firefox')
|
||||||
driver = buildFirefoxWebdriver({ responsive: true })
|
driver = buildFirefoxWebdriver({ responsive })
|
||||||
await installWebExt(driver, extPath)
|
await installWebExt(driver, extPath)
|
||||||
await delay(largeDelayMs)
|
await delay(largeDelayMs)
|
||||||
extensionId = await getExtensionIdFirefox(driver)
|
extensionId = await getExtensionIdFirefox(driver)
|
||||||
|
@ -27,7 +27,7 @@ describe('MetaMask', function () {
|
|||||||
this.bail(true)
|
this.bail(true)
|
||||||
|
|
||||||
before(async function () {
|
before(async function () {
|
||||||
const result = await prepareExtensionForTesting()
|
const result = await prepareExtensionForTesting({ responsive: true })
|
||||||
driver = result.driver
|
driver = result.driver
|
||||||
extensionId = result.extensionId
|
extensionId = result.extensionId
|
||||||
await setupFetchMocking(driver)
|
await setupFetchMocking(driver)
|
||||||
|
Loading…
Reference in New Issue
Block a user