pull/4837/head
filip mertens 9 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 --ignore-optional
yarn add @remix-project/remix-ws-templates yarn add @remix-project/remix-ws-templates
yarn dist yarn dist
yarn run selenium-install yarn run selenium-install-linux
- run: - run:
name: "Run selenium" name: "Run selenium"
command: | command: |
cd apps/remixdesktop/ cd apps/remixdesktop/
yarn run selenium yarn run selenium-linux
background: true background: true
- run: - run:
name: "Run tests" name: "Run tests"
@ -332,7 +332,58 @@ jobs:
- store_artifacts: - store_artifacts:
path: apps/remixdesktop/release/ path: apps/remixdesktop/release/
destination: remixdesktop-mac 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: lint:
docker: docker:
- image: cimg/node:20.0.0-browsers - 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", "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", "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", "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-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": "selenium-standalone start --config=./selenium.config.js", "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: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: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", "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: { desiredCapabilities: {
browserName: 'chrome', browserName: 'chrome',
javascriptEnabled: true, javascriptEnabled: true,
acceptSslCerts: true, acceptSslCerts: true,
'goog:chromeOptions': { 'goog:chromeOptions': {
"binary": "electron .", "binary": "release/mac/Remix IDE.app/Contents/MacOS/Remix IDE",
"args": [ "args": [
"--folder=test/contracts", "--e2e-local",
"--remix-ide-url=http://localhost:8080",
"--e2e"
] ]
} }
} }
@ -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: { windows: {
desiredCapabilities: { desiredCapabilities: {
browserName: 'chrome', 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')]", "//a[@data-id='dropdown-item-soljson-v0.8.23+commit.f704f362.js']//*[contains(@class, 'fa-arrow-circle-down')]",
locateStrategy: 'xpath' locateStrategy: 'xpath'
}) })
.pause()
} }
} }

@ -17,7 +17,7 @@ module.exports = {
.click('*[data-type="remixUIXT"]') .click('*[data-type="remixUIXT"]')
.perform(function () { .perform(function () {
const actions = this.actions({ async: true }) 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) .waitForElementVisible('*[data-id="treeViewLitreeViewItemexample.txt"]', 10000)
}, },

Loading…
Cancel
Save