pull/4837/head
filip mertens 8 months ago
parent e5f3738c66
commit f396f5e6b2
  1. 57
      .circleci/config.yml
  2. 7
      apps/remixdesktop/package.json
  3. 0
      apps/remixdesktop/selenium-linux.config.js
  4. 15
      apps/remixdesktop/selenium-mac.config.js
  5. 21
      apps/remixdesktop/test/nighwatch.app.ts
  6. 1
      apps/remixdesktop/test/tests/app/compiler.test.ts
  7. 2
      apps/remixdesktop/test/tests/app/xterm.test.ts

@ -126,12 +126,12 @@ jobs:
yarn --ignore-optional
yarn add @remix-project/remix-ws-templates
yarn dist
yarn run selenium-install
yarn run selenium-install-linux
- run:
name: "Run selenium"
command: |
cd apps/remixdesktop/
yarn run selenium
yarn run selenium-linux
background: true
- run:
name: "Run tests"
@ -332,7 +332,58 @@ jobs:
- store_artifacts:
path: apps/remixdesktop/release/
destination: remixdesktop-mac
test-remixdesktop-mac:
macos:
xcode: 14.2.0
resource_class:
macos.m1.large.gen1
working_directory: ~/remix-project
steps:
- checkout
- attach_workspace:
at: .
- run: unzip ./persist/desktopbuild.zip
- run:
command: |
ls -la dist/apps/remix-ide
nvm install 20.0.0
nvm use 20.0.0
- restore_cache:
keys:
- remixdesktop-deps-mac-{{ checksum "apps/remixdesktop/yarn.lock" }}
- run:
command: |
nvm use 20.0.0
cd apps/remixdesktop && yarn
yarn add @remix-project/remix-ws-templates
- save_cache:
key: remixdesktop-deps-mac-{{ checksum "apps/remixdesktop/yarn.lock" }}
paths:
- apps/remixdesktop/node_modules
# use USE_HARD_LINK=false https://github.com/electron-userland/electron-builder/issues/3179
- run:
command: |
nvm use 20.0.0
mkdir apps/remixdesktop/build
cp -r dist/apps/remix-ide apps/remixdesktop/build
cd apps/remixdesktop
yarn
yarn installRipGrepMacOXarm64
PUBLISH_FOR_PULL_REQUEST='true' USE_HARD_LINKS=false yarn dist --mac --arm64
yarn run selenium-install-mac
- run:
name: "Run selenium"
command: |
cd apps/remixdesktop/
yarn run selenium-mac
background: true
- run:
name: "Run tests"
command: |
cd apps/remixdesktop/
yarn run build:e2e && yarn run test:app:mac
lint:
docker:
- image: cimg/node:20.0.0-browsers

@ -28,8 +28,11 @@
"installRipGrepMacOXx64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=x64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"installRipGrepMacOXarm64": "rm -rf node_modules/@vscode/ripgrep/bin && npm_config_arch=arm64 node node_modules/@vscode/ripgrep/lib/postinstall.js",
"postinstall": "electron-builder install-app-deps",
"selenium-install": "selenium-standalone install --drivers.chromiumedge.version=114.0.1788.0 --drivers.chrome.version=114.0.1788.0 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com",
"selenium": "selenium-standalone start --config=./selenium.config.js",
"selenium-install-linux": "selenium-standalone install --drivers.chromiumedge.version=114.0.1788.0 --drivers.chrome.version=114.0.1788.0 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com",
"selenium-install-mac": "selenium-standalone install --drivers.chromiumedge.version=114.0.1788.0 --drivers.chrome.version=114.0.1788.0 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com",
"selenium-linux": "selenium-standalone start --config=./selenium-linux.config.js",
"selenium-mac": "selenium-standalone start --config=./selenium-mac.config.js",
"selenium-win": "selenium-standalone start --config=./selenium-win.config.js",
"test:app:linuxlocal": "yarn run build:e2e && nightwatch --config build-e2e/remixdesktop/test/nighwatch.app.js --env=linuxlocal",
"test:app:maclocal": "yarn run build:e2e && nightwatch --config build-e2e/remixdesktop/test/nighwatch.app.js --env=maclocal",
"test:app:winlocal": "yarn run build:e2e && nightwatch --config build-e2e/remixdesktop/test/nighwatch.app.js --env=winlocal",

@ -0,0 +1,15 @@
module.exports = {
baseURL: 'https://selenium-release.storage.googleapis.com',
drivers: {
chrome: {
version: '114.0.1788.0',
arch: process.arch,
baseURL: 'https://chromedriver.storage.googleapis.com'
},
chromiumedge: {
version: '114.0.1788.0',
arch: process.arch,
baseURL: 'https://msedgedriver.azureedge.net/'
}
}
}

@ -21,17 +21,15 @@ module.exports = {
},
},
macos: {
maclocal: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
'goog:chromeOptions': {
"binary": "electron .",
"binary": "release/mac/Remix IDE.app/Contents/MacOS/Remix IDE",
"args": [
"--folder=test/contracts",
"--remix-ide-url=http://localhost:8080",
"--e2e"
"--e2e-local",
]
}
}
@ -62,6 +60,19 @@ module.exports = {
}
}
},
mac: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
'goog:chromeOptions': {
"binary": "release/mac-arm64/Remix IDE.app/Contents/MacOS/Remix IDE",
"args": [
"--e2e",
]
}
}
},
windows: {
desiredCapabilities: {
browserName: 'chrome',

@ -33,6 +33,5 @@ module.exports = {
"//a[@data-id='dropdown-item-soljson-v0.8.23+commit.f704f362.js']//*[contains(@class, 'fa-arrow-circle-down')]",
locateStrategy: 'xpath'
})
.pause()
}
}

@ -17,7 +17,7 @@ module.exports = {
.click('*[data-type="remixUIXT"]')
.perform(function () {
const actions = this.actions({ async: true })
return actions.sendKeys('echo "Hello, World!" > example.txt').sendKeys(this.Keys.ENTER)
return actions.sendKeys('echo test > example.txt').sendKeys(this.Keys.ENTER)
})
.waitForElementVisible('*[data-id="treeViewLitreeViewItemexample.txt"]', 10000)
},

Loading…
Cancel
Save