Skip to content

Commit

Permalink
Merge pull request #5756 from ethereum/e2e-fix-metamask
Browse files Browse the repository at this point in the history
E2e fix metamask
  • Loading branch information
bunsenstraat authored Feb 11, 2025
2 parents 7885c10 + 3e9037c commit fb9c20b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
node: circleci/[email protected]
jobs:
Expand Down Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions apps/remix-ide-e2e/src/commands/switchBrowserTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit fb9c20b

Please sign in to comment.