Merge pull request #2785 from ethereum/homepagePlugins

Split e2e tests execution
pull/1/head
yann300 5 years ago committed by GitHub
commit 3bd3563064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 216
      .circleci/config.yml
  2. 39
      ci/browser_tests_chrome_part1.sh
  3. 39
      ci/browser_tests_chrome_part2.sh
  4. 39
      ci/browser_tests_firefox_part1.sh
  5. 39
      ci/browser_tests_firefox_part2.sh
  6. 30
      ci/browser_tests_run_deploy.sh
  7. 21
      package.json
  8. 24
      test-browser/commands/waitForElementContainsText.js
  9. 49
      test-browser/tests/generalSettings.js

@ -4,7 +4,7 @@
# #
version: 2 version: 2
jobs: jobs:
remix-ide: remix-ide-chrome-1:
docker: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:9.11.2-browsers - image: circleci/node:9.11.2-browsers
@ -12,6 +12,69 @@ jobs:
# Specify service dependencies here if necessary # Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images # CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/ # documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-ide
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js
background: true
- run: ./ci/browser_tests_chrome_part1.sh
- store_artifacts:
path: ./reports/screenshots
remix-ide-chrome-2:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-ide
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js
background: true
- run: ./ci/browser_tests_chrome_part2.sh
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox-1:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4 # - image: circleci/mongo:3.4.4
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
@ -36,18 +99,133 @@ jobs:
- run: - run:
name: Install Firefox name: Install Firefox
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run: ./ci/browser_tests.sh - run: ./ci/browser_tests_firefox_part1.sh
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox-2:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-ide
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js
background: true
- run:
name: Download Latest Firefox
command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run:
name: Install Firefox
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run: ./ci/browser_tests_firefox_part2.sh
- store_artifacts:
path: ./reports/screenshots
remix-ide-run-deploy:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-ide
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js
background: true
- run: ./ci/browser_tests_run_deploy.sh
- store_artifacts:
path: ./reports/screenshots
deploy-remix-live:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-ide
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run: - run:
name: Deploy name: Deploy
command: | command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then
./ci/deploy_from_travis_remix-alpha.sh; ./ci/deploy_from_travis_remix-live.sh;
fi fi
- store_artifacts:
path: ./reports/screenshots
deploy-remix-alpha:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
resource_class: xlarge
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-ide
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run: - run:
name: Deploy name: Deploy
command: | command: |
if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then if [ "${CIRCLE_BRANCH}" == "master" ]; then
./ci/deploy_from_travis_remix-live.sh; ./ci/deploy_from_travis_remix-alpha.sh;
fi fi
- store_artifacts: - store_artifacts:
path: ./reports/screenshots path: ./reports/screenshots
@ -56,4 +234,28 @@ workflows:
version: 2 version: 2
build_all: build_all:
jobs: jobs:
- remix-ide - remix-ide-chrome-1
- remix-ide-firefox-1
- remix-ide-chrome-2
- remix-ide-firefox-2
- remix-ide-run-deploy
- deploy-remix-live:
requires:
- remix-ide-chrome-1
- remix-ide-firefox-1
- remix-ide-chrome-2
- remix-ide-firefox-2
- remix-ide-run-deploy
filters:
branches:
only: remix_live
- deploy-remix-alpha:
requires:
- remix-ide-chrome-1
- remix-ide-firefox-1
- remix-ide-chrome-2
- remix-ide-firefox-2
- remix-ide-run-deploy
filters:
branches:
only: master

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
setupRemixd
sleep 5
npm run nightwatch_local_libraryDeployment || TEST_EXITCODE=1
npm run nightwatch_local_solidityImport || TEST_EXITCODE=1
npm run nightwatch_local_recorder || TEST_EXITCODE=1
npm run nightwatch_local_transactionExecution || TEST_EXITCODE=1
npm run nightwatch_local_staticAnalysis || TEST_EXITCODE=1
npm run nightwatch_local_signingMessage || TEST_EXITCODE=1
npm run nightwatch_local_specialFunctions || TEST_EXITCODE=1
npm run nightwatch_local_solidityUnitTests || TEST_EXITCODE=1
npm run nightwatch_local_remixd || TEST_EXITCODE=1
npm run nightwatch_local_terminal || TEST_EXITCODE=1
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
setupRemixd
sleep 5
npm run nightwatch_local_generalSettings || TEST_EXITCODE=1
npm run nightwatch_local_ballot || TEST_EXITCODE=1
npm run nightwatch_local_gist || TEST_EXITCODE=1
npm run nightwatch_local_workspace || TEST_EXITCODE=1
npm run nightwatch_local_defaultLayout || TEST_EXITCODE=1
npm run nightwatch_local_pluginManager || TEST_EXITCODE=1
npm run nightwatch_local_publishContract || TEST_EXITCODE=1
npm run nightwatch_local_fileExplorer || TEST_EXITCODE=1
npm run nightwatch_local_debugger || TEST_EXITCODE=1
npm run nightwatch_local_editor || TEST_EXITCODE=1
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
setupRemixd
sleep 5
npm run nightwatch_local_libraryDeployment_firefox || TEST_EXITCODE=1
npm run nightwatch_local_solidityImport_firefox || TEST_EXITCODE=1
npm run nightwatch_local_recorder_firefox || TEST_EXITCODE=1
npm run nightwatch_local_transactionExecution_firefox || TEST_EXITCODE=1
npm run nightwatch_local_staticAnalysis_firefox || TEST_EXITCODE=1
npm run nightwatch_local_signingMessage_firefox || TEST_EXITCODE=1
npm run nightwatch_local_specialFunctions_firefox || TEST_EXITCODE=1
npm run nightwatch_local_solidityUnitTests_firefox || TEST_EXITCODE=1
npm run nightwatch_local_remixd_firefox || TEST_EXITCODE=1
npm run nightwatch_local_terminal_firefox || TEST_EXITCODE=1
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
setupRemixd
sleep 5
npm run nightwatch_local_generalSettings_firefox || TEST_EXITCODE=1
npm run nightwatch_local_ballot_firefox || TEST_EXITCODE=1
npm run nightwatch_local_gist_firefox || TEST_EXITCODE=1
npm run nightwatch_local_workspace_firefox || TEST_EXITCODE=1
npm run nightwatch_local_defaultLayout_firefox || TEST_EXITCODE=1
npm run nightwatch_local_pluginManager_firefox || TEST_EXITCODE=1
npm run nightwatch_local_publishContract_firefox || TEST_EXITCODE=1
npm run nightwatch_local_fileExplorer_firefox || TEST_EXITCODE=1
npm run nightwatch_local_debugger_firefox || TEST_EXITCODE=1
npm run nightwatch_local_editor_firefox || TEST_EXITCODE=1
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
setupRemixd () {
mkdir remixdSharedfolder
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
setupRemixd
sleep 5
npm run nightwatch_local_runAndDeploy || TEST_EXITCODE=1
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -185,6 +185,27 @@
"nightwatch_local_fileExplorer": "nightwatch ./test-browser/tests/fileExplorer.js --config nightwatch.js --env chrome ", "nightwatch_local_fileExplorer": "nightwatch ./test-browser/tests/fileExplorer.js --config nightwatch.js --env chrome ",
"nightwatch_local_debugger": "nightwatch ./test-browser/tests/debugger.js --config nightwatch.js --env chrome ", "nightwatch_local_debugger": "nightwatch ./test-browser/tests/debugger.js --config nightwatch.js --env chrome ",
"nightwatch_local_editor": "nightwatch ./test-browser/tests/editor.js --config nightwatch.js --env chrome ", "nightwatch_local_editor": "nightwatch ./test-browser/tests/editor.js --config nightwatch.js --env chrome ",
"nightwatch_local_ballot_firefox": "nightwatch ./test-browser/tests/ballot.js --config nightwatch.js --env firefox ",
"nightwatch_local_libraryDeployment_firefox": "nightwatch ./test-browser/tests/libraryDeployment.js --config nightwatch.js --env firefox ",
"nightwatch_local_solidityImport_firefox": "nightwatch ./test-browser/tests/solidityImport.js --config nightwatch.js --env firefox ",
"nightwatch_local_recorder_firefox": "nightwatch ./test-browser/tests/recorder.js --config nightwatch.js --env firefox ",
"nightwatch_local_transactionExecution_firefox": "nightwatch ./test-browser/tests/transactionExecution.js --config nightwatch.js --env firefox ",
"nightwatch_local_staticAnalysis_firefox": "nightwatch ./test-browser/tests/staticAnalysis.js --config nightwatch.js --env firefox ",
"nightwatch_local_signingMessage_firefox": "nightwatch ./test-browser/tests/signingMessage.js --config nightwatch.js --env firefox ",
"nightwatch_local_specialFunctions_firefox": "nightwatch ./test-browser/tests/specialFunctions.js --config nightwatch.js --env firefox ",
"nightwatch_local_solidityUnitTests_firefox": "nightwatch ./test-browser/tests/solidityUnittests.js --config nightwatch.js --env firefox ",
"nightwatch_local_remixd_firefox": "nightwatch ./test-browser/tests/remixd.js --config nightwatch.js --env firefox ",
"nightwatch_local_terminal_firefox": "nightwatch ./test-browser/tests/terminal.js --config nightwatch.js --env firefox ",
"nightwatch_local_gist_firefox": "nightwatch ./test-browser/tests/gist.js --config nightwatch.js --env firefox ",
"nightwatch_local_workspace_firefox": "nightwatch ./test-browser/tests/workspace.js --config nightwatch.js --env firefox ",
"nightwatch_local_defaultLayout_firefox": "nightwatch ./test-browser/tests/defaultLayout.js --config nightwatch.js --env firefox ",
"nightwatch_local_pluginManager_firefox": "nightwatch ./test-browser/tests/pluginManager.js --config nightwatch.js --env firefox ",
"nightwatch_local_publishContract_firefox": "nightwatch ./test-browser/tests/publishContract.js --config nightwatch.js --env firefox ",
"nightwatch_local_generalSettings_firefox": "nightwatch ./test-browser/tests/generalSettings.js --config nightwatch.js --env firefox ",
"nightwatch_local_fileExplorer_firefox": "nightwatch ./test-browser/tests/fileExplorer.js --config nightwatch.js --env firefox ",
"nightwatch_local_debugger_firefox": "nightwatch ./test-browser/tests/debugger.js --config nightwatch.js --env firefox ",
"nightwatch_local_editor_firefox": "nightwatch ./test-browser/tests/editor.js --config nightwatch.js --env firefox ",
"nightwatch_local_runAndDeploy": "nightwatch ./test-browser/tests/runAndDeploy.js --config nightwatch.js --env chrome-runAndDeploy ", "nightwatch_local_runAndDeploy": "nightwatch ./test-browser/tests/runAndDeploy.js --config nightwatch.js --env chrome-runAndDeploy ",
"onchange": "onchange build/app.js -- npm-run-all lint", "onchange": "onchange build/app.js -- npm-run-all lint",
"prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build", "prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build",

@ -0,0 +1,24 @@
const EventEmitter = require('events')
class WaitForElementContainsText extends EventEmitter {
command (id, value) {
let incr = 0
let runid = setInterval(() => {
this.api.getText(id, (result) => {
if (value.indexOf(result.value || '') !== -1) {
clearInterval(runid)
this.api.assert.ok(true, `WaitForElementContainsText ${id} contains ${value}`)
this.emit('complete')
} else incr++
if (incr > 50) {
clearInterval(runid)
this.api.assert.fail(`WaitForElementContainsText - expected ${value} but got ${result.value}`)
// throw new Error(`WaitForElementContainsText ${id} ${value}`)
}
})
}, 200)
return this
}
}
module.exports = WaitForElementContainsText

@ -12,15 +12,14 @@ module.exports = {
.click('*[data-id="landingPageStartSolidity"]') .click('*[data-id="landingPageStartSolidity"]')
.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) .waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="verticalIconsKindsettings"]') .click('*[data-id="verticalIconsKindsettings"]')
.waitForElementVisible('*[data-id="settingsTabSettingsView"]') .waitForElementContainsText('h6[data-id="sidePanelSwapitTitle"]', 'SETTINGS')
.assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'SETTINGS')
}, },
'Should open gitter channel in a new tab when `Gitter Channel Button` is clicked': function (browser) { 'Should open gitter channel in a new tab when `Gitter Channel Button` is clicked': function (browser) {
const runtimeBrowser = browser.capabilities.browserName const runtimeBrowser = browser.capabilities.browserName
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]')
.waitForElementVisible('*[data-id="settingsTabGitterChannelButton"]') .waitForElementVisible('*[data-id="settingsTabGitterChannelButton"]', 5000)
.click('*[data-id="settingsTabGitterChannelButton"]') .click('*[data-id="settingsTabGitterChannelButton"]')
.pause(2000) .pause(2000)
.perform((done) => { if (runtimeBrowser === 'chrome') { browser.switchBrowserTab(1).assert.urlContains('https://gitter.im/ethereum/remix') } done() }) .perform((done) => { if (runtimeBrowser === 'chrome') { browser.switchBrowserTab(1).assert.urlContains('https://gitter.im/ethereum/remix') } done() })
@ -28,8 +27,8 @@ module.exports = {
'Should activate `generate contract metadata`': function (browser) { 'Should activate `generate contract metadata`': function (browser) {
browser.switchBrowserTab(0) browser.switchBrowserTab(0)
.waitForElementVisible('*[data-id="remixIdeSidePanel"]') .waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000)
.waitForElementVisible('*[data-id="settingsTabGenerateContractMetadata"]') .waitForElementVisible('*[data-id="settingsTabGenerateContractMetadata"]', 5000)
.click('*[data-id="settingsTabGenerateContractMetadata"]') .click('*[data-id="settingsTabGenerateContractMetadata"]')
.click('*[data-id="verticalIconsFileExplorerIcons"]') .click('*[data-id="verticalIconsFileExplorerIcons"]')
.switchFile('browser/3_Ballot.sol') .switchFile('browser/3_Ballot.sol')
@ -43,34 +42,34 @@ module.exports = {
}, },
'Should add new github access token': function (browser) { 'Should add new github access token': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="verticalIconsKindsettings"]') .click('*[data-id="verticalIconsKindsettings"]')
.setValue('*[data-id="settingsTabGistAccessToken"]', '**********') .setValue('*[data-id="settingsTabGistAccessToken"]', '**********')
.click('*[data-id="settingsTabSaveGistToken"]') .click('*[data-id="settingsTabSaveGistToken"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)') .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token saved') .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token saved')
.click('*[data-id="tooltipCloseButton"]') .click('*[data-id="tooltipCloseButton"]')
}, },
'Should copy github access token to clipboard': function (browser) { 'Should copy github access token to clipboard': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="copyToClipboardCopyIcon"]') .click('*[data-id="copyToClipboardCopyIcon"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)') .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Copied value to clipboard.') .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Copied value to clipboard.')
.click('*[data-id="tooltipCloseButton"]') .click('*[data-id="tooltipCloseButton"]')
}, },
'Should remove github access token': function (browser) { 'Should remove github access token': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabRemoveGistToken"]') .click('*[data-id="settingsTabRemoveGistToken"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)') .waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token removed') .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token removed')
.assert.containsText('*[data-id="settingsTabGistAccessToken"]', '') .assert.containsText('*[data-id="settingsTabGistAccessToken"]', '')
.click('*[data-id="tooltipCloseButton"]') .click('*[data-id="tooltipCloseButton"]')
}, },
'Should load dark theme': function (browser) { 'Should load dark theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeDark"]') .click('*[data-id="settingsTabThemeDark"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.dark.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.dark.primary)
@ -82,7 +81,7 @@ module.exports = {
}, },
'Should load light theme': function (browser) { 'Should load light theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLight"]') .click('*[data-id="settingsTabThemeLight"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.light.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.light.primary)
@ -94,7 +93,7 @@ module.exports = {
}, },
'Should load Cerulean theme': function (browser) { 'Should load Cerulean theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeCerulean"]') .click('*[data-id="settingsTabThemeCerulean"]')
.pause(5000) .pause(5000)
.checkElementStyle(':root', '--primary', remixIdeThemes.curelean.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.curelean.primary)
@ -106,7 +105,7 @@ module.exports = {
}, },
'Should load Flatly theme': function (browser) { 'Should load Flatly theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeFlatly"]') .click('*[data-id="settingsTabThemeFlatly"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.flatly.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.flatly.primary)
@ -118,7 +117,7 @@ module.exports = {
}, },
'Should load Lumen theme': function (browser) { 'Should load Lumen theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLumen"]') .click('*[data-id="settingsTabThemeLumen"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.lumen.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.lumen.primary)
@ -130,7 +129,7 @@ module.exports = {
}, },
'Should load Minty theme': function (browser) { 'Should load Minty theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeMinty"]') .click('*[data-id="settingsTabThemeMinty"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.minty.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.minty.primary)
@ -142,7 +141,7 @@ module.exports = {
}, },
'Should load Pulse theme': function (browser) { 'Should load Pulse theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemePulse"]') .click('*[data-id="settingsTabThemePulse"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.pulse.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.pulse.primary)
@ -154,7 +153,7 @@ module.exports = {
}, },
'Should load Sandstone theme': function (browser) { 'Should load Sandstone theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeSandstone"]') .click('*[data-id="settingsTabThemeSandstone"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.sandstone.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.sandstone.primary)
@ -166,7 +165,7 @@ module.exports = {
}, },
'Should load Spacelab theme': function (browser) { 'Should load Spacelab theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeSpacelab"]') .click('*[data-id="settingsTabThemeSpacelab"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.spacelab.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.spacelab.primary)
@ -178,7 +177,7 @@ module.exports = {
}, },
'Should load Yeti theme': function (browser) { 'Should load Yeti theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeYeti"]') .click('*[data-id="settingsTabThemeYeti"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.yeti.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.yeti.primary)
@ -190,7 +189,7 @@ module.exports = {
}, },
'Should load Cyborg theme': function (browser) { 'Should load Cyborg theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeCyborg"]') .click('*[data-id="settingsTabThemeCyborg"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.cyborg.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.cyborg.primary)
@ -202,7 +201,7 @@ module.exports = {
}, },
'Should load Darkly theme': function (browser) { 'Should load Darkly theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeDarkly"]') .click('*[data-id="settingsTabThemeDarkly"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.darkly.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.darkly.primary)
@ -214,7 +213,7 @@ module.exports = {
}, },
'Should load Slate theme': function (browser) { 'Should load Slate theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeSlate"]') .click('*[data-id="settingsTabThemeSlate"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.slate.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.slate.primary)
@ -226,7 +225,7 @@ module.exports = {
}, },
'Should load Superhero theme': function (browser) { 'Should load Superhero theme': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]') browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeSuperhero"]') .click('*[data-id="settingsTabThemeSuperhero"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.superhero.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.superhero.primary)

Loading…
Cancel
Save