add more checks in metamask setup

pull/4978/head
Your Name 7 months ago committed by Aniket
parent a296e691e1
commit 1579eae918
  1. 12
      apps/remix-ide-e2e/src/commands/setupMetamask.ts
  2. 2
      apps/remix-ide-e2e/src/tests/runAndDeploy_injected.test.ts

@ -16,6 +16,7 @@ class MetaMask extends EventEmitter {
function setupMetaMask(browser: NightwatchBrowser, passphrase: string, password: string, done: VoidFunction) {
const words = passphrase.split(' ')
console.log('setup metamask')
browser
.switchBrowserTab(1)
.waitForElementVisible('input[data-testid="onboarding-terms-checkbox"]')
@ -49,6 +50,13 @@ function setupMetaMask(browser: NightwatchBrowser, passphrase: string, password:
.click('button[data-testid="pin-extension-next"]')
.waitForElementVisible('button[data-testid="pin-extension-done"]')
.click('button[data-testid="pin-extension-done"]')
.waitForElementVisible({
selector: 'button[data-testid="popover-close"]',
locateStrategy: 'css selector',
suppressNotFoundErrors: true,
abortOnFailure: false,
timeout: 10000
})
.isVisible({
selector: 'button[data-testid="popover-close"]',
locateStrategy: 'css selector',
@ -58,7 +66,8 @@ function setupMetaMask(browser: NightwatchBrowser, passphrase: string, password:
console.log('okVisible', okVisible)
if (!okVisible.value) {
console.log('popover not found')
}else{
} else {
console.log('popover found... closing')
browser.click('button[data-testid="popover-close"]')
}
})
@ -66,6 +75,7 @@ function setupMetaMask(browser: NightwatchBrowser, passphrase: string, password:
.click('.mm-modal-content label.toggle-button--off') // show test networks
.click('div[data-testid="Sepolia"]') // switch to sepolia
.perform(() => {
console.log('MetaMask setup complete')
done()
})
}

@ -236,7 +236,7 @@ const branch = process.env.CIRCLE_BRANCH;
const isMasterBranch = branch === 'master';
module.exports = {
...(branch ? (isMasterBranch ? tests : {}) : tests),
...tests//(branch ? (isMasterBranch ? tests : {}) : tests),
};
const localsCheck = {

Loading…
Cancel
Save