Merge pull request #5756 from ethereum/e2e-fix-metamask

E2e fix metamask
master
bunsenstraat 5 days ago committed by GitHub
commit fb9c20bc57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      .circleci/config.yml
  2. 10
      apps/remix-ide-e2e/src/commands/switchBrowserTab.ts

@ -5,7 +5,7 @@ parameters:
type: boolean
default: false
orbs:
browser-tools: circleci/browser-tools@1.4.4
browser-tools: circleci/browser-tools@1.5.2
win: circleci/windows@5.0
node: circleci/node@7.0.0
jobs:
@ -629,7 +629,7 @@ jobs:
remix-ide-browser:
docker:
- image: cimg/node:20.17.0-browsers
- image: cimg/node:20.18.3-browsers
resource_class:
xlarge
working_directory: ~/remix-project

@ -6,11 +6,17 @@ import EventEmitter from 'events'
*/
class SwitchBrowserTab extends EventEmitter {
command (this: NightwatchBrowser, index: number): NightwatchBrowser {
command(this: NightwatchBrowser, index: number): NightwatchBrowser {
this.api.perform((browser: NightwatchAPI, done) => {
const runtimeBrowser = browser.options.desiredCapabilities.browserName
browser.windowHandles((result) => {
console.log('switching to window', result)
browser.switchWindow(result.value[index])
if (Array.isArray(result.value)) {
if(runtimeBrowser === 'chrome') {
index = index + 1
}
browser.switchWindow(result.value[index] || result.value[0])
}
done()
})
this.emit('complete')

Loading…
Cancel
Save