fix chrome driver

pull/5370/head
yann300 8 months ago
parent 3103fd95fc
commit 909dac7b37
  1. 4
      .circleci/config.yml
  2. 2
      apps/remix-ide-e2e/nightwatch.ts
  3. 2
      apps/remix-ide-e2e/package.json
  4. 6
      apps/remix-ide-e2e/src/commands/setupMetamask.ts
  5. 1
      apps/remix-ide-e2e/src/commands/switchBrowserTab.ts

@ -388,7 +388,9 @@ jobs:
- run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules
- run: mkdir node_modules/hardhat && wget https://unpkg.com/hardhat/console.sol -O node_modules/hardhat/console.sol
- run: ls -la ./dist/apps/remix-ide/assets/js
- run: npm list selenium-standalone
- run: yarn run selenium-install --singleDriverInstall=firefox
- run: yarn run selenium-install --singleDriverInstall=chrome
- when:
condition:
equal: [ "chrome", << parameters.browser >> ]
@ -448,7 +450,9 @@ jobs:
- run: unzip ./persist/dist.zip
- run: unzip ./persist/plugin-<< parameters.plugin >>.zip
- run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules
- run: npm list selenium-standalone
- run: yarn run selenium-install --singleDriverInstall=firefox
- run: yarn run selenium-install --singleDriverInstall=chrome
- run: mkdir -p node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/
- run: cp ~/bin/chromedriver /home/circleci/remix-project/node_modules/selenium-standalone/.selenium/chromedriver/latest-x64/
- run:

@ -37,7 +37,7 @@ module.exports = {
args: [
'window-size=2560,1440',
'--no-sandbox',
'--headless',
'--headless=new',
'--verbose',
'--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
],

@ -12,7 +12,7 @@
"@openzeppelin/wizard": "^0.4.0",
"@remix-project/remixd": "../../dist/libs/remixd",
"deep-equal": "^1.0.1",
"selenium-standalone": "^9.0.3",
"selenium-standalone": "^9.5.0",
"tree-kill": "^1.2.2"
},
"devDependencies": {

@ -17,7 +17,11 @@ class MetaMask extends EventEmitter {
function setupMetaMask (browser: NightwatchBrowser, passphrase: string, password: string, done: VoidFunction) {
const words = passphrase.split(' ')
browser
.switchBrowserTab(1)
.perform((done) => {
browser.switchBrowserWindow('chrome-extension://mmejnnbljapjihcidiglpfkpnojpiamk/home.html', 'MetaMask', (browser) => {
browser.perform(() => done())
})
})
.waitForElementVisible('input[data-testid="onboarding-terms-checkbox"]')
.click('input[data-testid="onboarding-terms-checkbox"]')
.click('button[data-testid="onboarding-import-wallet"]')

@ -9,6 +9,7 @@ class SwitchBrowserTab extends EventEmitter {
command (this: NightwatchBrowser, index: number): NightwatchBrowser {
this.api.perform((browser: NightwatchAPI, done) => {
browser.windowHandles((result) => {
console.log('switching to window', result)
browser.switchWindow(result.value[index])
done()
})

Loading…
Cancel
Save