From 5b3c09865b26251fd5951d7244b1847b06c2e6e7 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 Apr 2020 15:40:01 +0000 Subject: [PATCH 01/13] update config.yml --- .circleci/config.yml | 96 ++++++-------------------------------------- 1 file changed, 12 insertions(+), 84 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3352c407d1..3d6590513e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ # version: 2 jobs: - remix-ide-chrome-1: + remix-ide-chrome: docker: # specify the version you desire here - image: circleci/node:9.11.2-browsers @@ -20,6 +20,7 @@ jobs: - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" working_directory: ~/remix-ide + parallelism: 10 steps: - checkout - run: npm install @@ -31,79 +32,11 @@ jobs: name: Start Selenium command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js background: true - - run: ./ci/browser_tests_chrome_part1.sh + - run: ./ci/browser_tests_chrome.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 - 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_part1.sh - - store_artifacts: - path: ./reports/screenshots - - remix-ide-firefox-2: + remix-ide-firefox: docker: # specify the version you desire here - image: circleci/node:9.11.2-browsers @@ -119,6 +52,7 @@ jobs: - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" working_directory: ~/remix-ide + parallelism: 10 steps: - checkout - run: npm install @@ -136,7 +70,7 @@ jobs: - run: name: Install Firefox command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - - run: ./ci/browser_tests_firefox_part2.sh + - run: ./ci/browser_tests_firefox.sh - store_artifacts: path: ./reports/screenshots @@ -234,27 +168,21 @@ workflows: version: 2 build_all: jobs: - - remix-ide-chrome-1 - - remix-ide-firefox-1 - - remix-ide-chrome-2 - - remix-ide-firefox-2 + - remix-ide-chrome + - remix-ide-firefox - 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-chrome + - remix-ide-firefox - 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-chrome + - remix-ide-firefox - remix-ide-run-deploy filters: branches: From 456c4412a304595d875ca65adefd700983279b73 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 Apr 2020 15:43:38 +0000 Subject: [PATCH 02/13] Removed part2 sh files and changed command to run circle ci split test --- ci/browser_tests_chrome.sh | 31 ++++++++++++++++++++++++ ci/browser_tests_chrome_part1.sh | 39 ------------------------------- ci/browser_tests_chrome_part2.sh | 39 ------------------------------- ci/browser_tests_firefox.sh | 31 ++++++++++++++++++++++++ ci/browser_tests_firefox_part1.sh | 39 ------------------------------- ci/browser_tests_firefox_part2.sh | 39 ------------------------------- 6 files changed, 62 insertions(+), 156 deletions(-) create mode 100755 ci/browser_tests_chrome.sh delete mode 100755 ci/browser_tests_chrome_part1.sh delete mode 100755 ci/browser_tests_chrome_part2.sh create mode 100755 ci/browser_tests_firefox.sh delete mode 100755 ci/browser_tests_firefox_part1.sh delete mode 100755 ci/browser_tests_firefox_part2.sh diff --git a/ci/browser_tests_chrome.sh b/ci/browser_tests_chrome.sh new file mode 100755 index 0000000000..9fe887fd82 --- /dev/null +++ b/ci/browser_tests_chrome.sh @@ -0,0 +1,31 @@ +#!/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 + +TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings) +npm run nightwatch $TESTFILES + +echo "$TEST_EXITCODE" +if [ "$TEST_EXITCODE" -eq 1 ] +then + exit 1 +fi diff --git a/ci/browser_tests_chrome_part1.sh b/ci/browser_tests_chrome_part1.sh deleted file mode 100755 index cd9e98d91a..0000000000 --- a/ci/browser_tests_chrome_part1.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/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 diff --git a/ci/browser_tests_chrome_part2.sh b/ci/browser_tests_chrome_part2.sh deleted file mode 100755 index f1c21b6a90..0000000000 --- a/ci/browser_tests_chrome_part2.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/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 diff --git a/ci/browser_tests_firefox.sh b/ci/browser_tests_firefox.sh new file mode 100755 index 0000000000..9fe887fd82 --- /dev/null +++ b/ci/browser_tests_firefox.sh @@ -0,0 +1,31 @@ +#!/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 + +TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings) +npm run nightwatch $TESTFILES + +echo "$TEST_EXITCODE" +if [ "$TEST_EXITCODE" -eq 1 ] +then + exit 1 +fi diff --git a/ci/browser_tests_firefox_part1.sh b/ci/browser_tests_firefox_part1.sh deleted file mode 100755 index 67d1d0f903..0000000000 --- a/ci/browser_tests_firefox_part1.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/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 diff --git a/ci/browser_tests_firefox_part2.sh b/ci/browser_tests_firefox_part2.sh deleted file mode 100755 index bb0cfac638..0000000000 --- a/ci/browser_tests_firefox_part2.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/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 From 7e3b7fb7c7059913a81108c4b555e149a1a65284 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 Apr 2020 15:48:02 +0000 Subject: [PATCH 03/13] Removed test commands for firefox and added nightwatch command --- package.json | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index ca276a4983..02c340ec41 100644 --- a/package.json +++ b/package.json @@ -162,6 +162,7 @@ "lint": "standard | notify-error", "make-mock-compiler": "node ci/makeMockCompiler.js", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", + "nightwatch": "nightwatch --config nightwatch.js --env chrome", "nightwatch_parallel": "nightwatch -e chrome,firefox --config nightwatch.js", "nightwatch_local_firefox": "nightwatch --config nightwatch.js --env firefox", "nightwatch_local_chrome": "nightwatch --config nightwatch.js --env chrome", @@ -185,26 +186,7 @@ "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_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 ", "onchange": "onchange build/app.js -- npm-run-all lint", "prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build", From 718fd3b20f38735475191e9586f182f9b1fc9362 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 Apr 2020 15:53:16 +0000 Subject: [PATCH 04/13] Renamed test files and updated package.json --- package.json | 40 +++++++++---------- .../tests/{ballot.js => ballot.test.js} | 0 .../tests/{debugger.js => debugger.test.js} | 0 ...defaultLayout.js => defaultLayout.test.js} | 0 .../tests/{editor.js => editor.test.js} | 0 .../{fileExplorer.js => fileExplorer.test.js} | 0 ...ralSettings.js => generalSettings.test.js} | 0 test-browser/tests/{gist.js => gist.test.js} | 0 ...eployment.js => libraryDeployment.test.js} | 0 ...pluginManager.js => pluginManager.test.js} | 0 ...ishContract.js => publishContract.test.js} | 0 .../tests/{recorder.js => recorder.test.js} | 0 .../tests/{remixd.js => remixd.test.js} | 0 ...gningMessage.js => signingMessage.test.js} | 0 ...lidityImport.js => solidityImport.test.js} | 0 ...Unittests.js => solidityUnittests.test.js} | 0 ...lFunctions.js => specialFunctions.test.js} | 0 ...aticAnalysis.js => staticAnalysis.test.js} | 0 .../tests/{terminal.js => terminal.test.js} | 0 ...cution.js => transactionExecution.test.js} | 0 .../tests/{workspace.js => workspace.test.js} | 0 21 files changed, 20 insertions(+), 20 deletions(-) rename test-browser/tests/{ballot.js => ballot.test.js} (100%) rename test-browser/tests/{debugger.js => debugger.test.js} (100%) rename test-browser/tests/{defaultLayout.js => defaultLayout.test.js} (100%) rename test-browser/tests/{editor.js => editor.test.js} (100%) rename test-browser/tests/{fileExplorer.js => fileExplorer.test.js} (100%) rename test-browser/tests/{generalSettings.js => generalSettings.test.js} (100%) rename test-browser/tests/{gist.js => gist.test.js} (100%) rename test-browser/tests/{libraryDeployment.js => libraryDeployment.test.js} (100%) rename test-browser/tests/{pluginManager.js => pluginManager.test.js} (100%) rename test-browser/tests/{publishContract.js => publishContract.test.js} (100%) rename test-browser/tests/{recorder.js => recorder.test.js} (100%) rename test-browser/tests/{remixd.js => remixd.test.js} (100%) rename test-browser/tests/{signingMessage.js => signingMessage.test.js} (100%) rename test-browser/tests/{solidityImport.js => solidityImport.test.js} (100%) rename test-browser/tests/{solidityUnittests.js => solidityUnittests.test.js} (100%) rename test-browser/tests/{specialFunctions.js => specialFunctions.test.js} (100%) rename test-browser/tests/{staticAnalysis.js => staticAnalysis.test.js} (100%) rename test-browser/tests/{terminal.js => terminal.test.js} (100%) rename test-browser/tests/{transactionExecution.js => transactionExecution.test.js} (100%) rename test-browser/tests/{workspace.js => workspace.test.js} (100%) diff --git a/package.json b/package.json index 02c340ec41..a4a3456c7b 100644 --- a/package.json +++ b/package.json @@ -166,26 +166,26 @@ "nightwatch_parallel": "nightwatch -e chrome,firefox --config nightwatch.js", "nightwatch_local_firefox": "nightwatch --config nightwatch.js --env firefox", "nightwatch_local_chrome": "nightwatch --config nightwatch.js --env chrome", - "nightwatch_local_ballot": "nightwatch ./test-browser/tests/ballot.js --config nightwatch.js --env chrome ", - "nightwatch_local_libraryDeployment": "nightwatch ./test-browser/tests/libraryDeployment.js --config nightwatch.js --env chrome ", - "nightwatch_local_solidityImport": "nightwatch ./test-browser/tests/solidityImport.js --config nightwatch.js --env chrome ", - "nightwatch_local_recorder": "nightwatch ./test-browser/tests/recorder.js --config nightwatch.js --env chrome ", - "nightwatch_local_transactionExecution": "nightwatch ./test-browser/tests/transactionExecution.js --config nightwatch.js --env chrome ", - "nightwatch_local_staticAnalysis": "nightwatch ./test-browser/tests/staticAnalysis.js --config nightwatch.js --env chrome ", - "nightwatch_local_signingMessage": "nightwatch ./test-browser/tests/signingMessage.js --config nightwatch.js --env chrome ", - "nightwatch_local_specialFunctions": "nightwatch ./test-browser/tests/specialFunctions.js --config nightwatch.js --env chrome ", - "nightwatch_local_solidityUnitTests": "nightwatch ./test-browser/tests/solidityUnittests.js --config nightwatch.js --env chrome ", - "nightwatch_local_remixd": "nightwatch ./test-browser/tests/remixd.js --config nightwatch.js --env chrome ", - "nightwatch_local_terminal": "nightwatch ./test-browser/tests/terminal.js --config nightwatch.js --env chrome ", - "nightwatch_local_gist": "nightwatch ./test-browser/tests/gist.js --config nightwatch.js --env chrome ", - "nightwatch_local_workspace": "nightwatch ./test-browser/tests/workspace.js --config nightwatch.js --env chrome ", - "nightwatch_local_defaultLayout": "nightwatch ./test-browser/tests/defaultLayout.js --config nightwatch.js --env chrome ", - "nightwatch_local_pluginManager": "nightwatch ./test-browser/tests/pluginManager.js --config nightwatch.js --env chrome ", - "nightwatch_local_publishContract": "nightwatch ./test-browser/tests/publishContract.js --config nightwatch.js --env chrome ", - "nightwatch_local_generalSettings": "nightwatch ./test-browser/tests/generalSettings.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_editor": "nightwatch ./test-browser/tests/editor.js --config nightwatch.js --env chrome ", + "nightwatch_local_ballot": "nightwatch ./test-browser/tests/ballot.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_libraryDeployment": "nightwatch ./test-browser/tests/libraryDeployment.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_solidityImport": "nightwatch ./test-browser/tests/solidityImport.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_recorder": "nightwatch ./test-browser/tests/recorder.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_transactionExecution": "nightwatch ./test-browser/tests/transactionExecution.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_staticAnalysis": "nightwatch ./test-browser/tests/staticAnalysis.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_signingMessage": "nightwatch ./test-browser/tests/signingMessage.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_specialFunctions": "nightwatch ./test-browser/tests/specialFunctions.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_solidityUnitTests": "nightwatch ./test-browser/tests/solidityUnittests.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_remixd": "nightwatch ./test-browser/tests/remixd.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_terminal": "nightwatch ./test-browser/tests/terminal.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_gist": "nightwatch ./test-browser/tests/gist.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_workspace": "nightwatch ./test-browser/tests/workspace.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_defaultLayout": "nightwatch ./test-browser/tests/defaultLayout.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_pluginManager": "nightwatch ./test-browser/tests/pluginManager.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_publishContract": "nightwatch ./test-browser/tests/publishContract.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_generalSettings": "nightwatch ./test-browser/tests/generalSettings.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_fileExplorer": "nightwatch ./test-browser/tests/fileExplorer.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_debugger": "nightwatch ./test-browser/tests/debugger.test.js --config nightwatch.js --env chrome ", + "nightwatch_local_editor": "nightwatch ./test-browser/tests/editor.test.js --config nightwatch.js --env chrome ", "nightwatch_local_runAndDeploy": "nightwatch ./test-browser/tests/runAndDeploy.js --config nightwatch.js --env chrome-runAndDeploy ", "onchange": "onchange build/app.js -- npm-run-all lint", diff --git a/test-browser/tests/ballot.js b/test-browser/tests/ballot.test.js similarity index 100% rename from test-browser/tests/ballot.js rename to test-browser/tests/ballot.test.js diff --git a/test-browser/tests/debugger.js b/test-browser/tests/debugger.test.js similarity index 100% rename from test-browser/tests/debugger.js rename to test-browser/tests/debugger.test.js diff --git a/test-browser/tests/defaultLayout.js b/test-browser/tests/defaultLayout.test.js similarity index 100% rename from test-browser/tests/defaultLayout.js rename to test-browser/tests/defaultLayout.test.js diff --git a/test-browser/tests/editor.js b/test-browser/tests/editor.test.js similarity index 100% rename from test-browser/tests/editor.js rename to test-browser/tests/editor.test.js diff --git a/test-browser/tests/fileExplorer.js b/test-browser/tests/fileExplorer.test.js similarity index 100% rename from test-browser/tests/fileExplorer.js rename to test-browser/tests/fileExplorer.test.js diff --git a/test-browser/tests/generalSettings.js b/test-browser/tests/generalSettings.test.js similarity index 100% rename from test-browser/tests/generalSettings.js rename to test-browser/tests/generalSettings.test.js diff --git a/test-browser/tests/gist.js b/test-browser/tests/gist.test.js similarity index 100% rename from test-browser/tests/gist.js rename to test-browser/tests/gist.test.js diff --git a/test-browser/tests/libraryDeployment.js b/test-browser/tests/libraryDeployment.test.js similarity index 100% rename from test-browser/tests/libraryDeployment.js rename to test-browser/tests/libraryDeployment.test.js diff --git a/test-browser/tests/pluginManager.js b/test-browser/tests/pluginManager.test.js similarity index 100% rename from test-browser/tests/pluginManager.js rename to test-browser/tests/pluginManager.test.js diff --git a/test-browser/tests/publishContract.js b/test-browser/tests/publishContract.test.js similarity index 100% rename from test-browser/tests/publishContract.js rename to test-browser/tests/publishContract.test.js diff --git a/test-browser/tests/recorder.js b/test-browser/tests/recorder.test.js similarity index 100% rename from test-browser/tests/recorder.js rename to test-browser/tests/recorder.test.js diff --git a/test-browser/tests/remixd.js b/test-browser/tests/remixd.test.js similarity index 100% rename from test-browser/tests/remixd.js rename to test-browser/tests/remixd.test.js diff --git a/test-browser/tests/signingMessage.js b/test-browser/tests/signingMessage.test.js similarity index 100% rename from test-browser/tests/signingMessage.js rename to test-browser/tests/signingMessage.test.js diff --git a/test-browser/tests/solidityImport.js b/test-browser/tests/solidityImport.test.js similarity index 100% rename from test-browser/tests/solidityImport.js rename to test-browser/tests/solidityImport.test.js diff --git a/test-browser/tests/solidityUnittests.js b/test-browser/tests/solidityUnittests.test.js similarity index 100% rename from test-browser/tests/solidityUnittests.js rename to test-browser/tests/solidityUnittests.test.js diff --git a/test-browser/tests/specialFunctions.js b/test-browser/tests/specialFunctions.test.js similarity index 100% rename from test-browser/tests/specialFunctions.js rename to test-browser/tests/specialFunctions.test.js diff --git a/test-browser/tests/staticAnalysis.js b/test-browser/tests/staticAnalysis.test.js similarity index 100% rename from test-browser/tests/staticAnalysis.js rename to test-browser/tests/staticAnalysis.test.js diff --git a/test-browser/tests/terminal.js b/test-browser/tests/terminal.test.js similarity index 100% rename from test-browser/tests/terminal.js rename to test-browser/tests/terminal.test.js diff --git a/test-browser/tests/transactionExecution.js b/test-browser/tests/transactionExecution.test.js similarity index 100% rename from test-browser/tests/transactionExecution.js rename to test-browser/tests/transactionExecution.test.js diff --git a/test-browser/tests/workspace.js b/test-browser/tests/workspace.test.js similarity index 100% rename from test-browser/tests/workspace.js rename to test-browser/tests/workspace.test.js From 2759d508f947e5c16942e616a97ef745c1bb76d1 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 Apr 2020 16:17:17 +0000 Subject: [PATCH 05/13] Fixed failing test --- test-browser/tests/fileExplorer.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test-browser/tests/fileExplorer.test.js b/test-browser/tests/fileExplorer.test.js index 71431aa64a..c39fb9ff04 100644 --- a/test-browser/tests/fileExplorer.test.js +++ b/test-browser/tests/fileExplorer.test.js @@ -3,9 +3,9 @@ const init = require('../helpers/init') const sauce = require('./sauce') const path = require('path') const testData = { - testFile1: path.resolve(__dirname + '/editor.js'), // eslint-disable-line - testFile2: path.resolve(__dirname + '/fileExplorer.js'), // eslint-disable-line - testFile3: path.resolve(__dirname + '/generalSettings.js') // eslint-disable-line + testFile1: path.resolve(__dirname + '/editor.test.js'), // eslint-disable-line + testFile2: path.resolve(__dirname + '/fileExplorer.test.js'), // eslint-disable-line + testFile3: path.resolve(__dirname + '/generalSettings.test.js') // eslint-disable-line } module.exports = { @@ -105,9 +105,9 @@ module.exports = { .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3) - .waitForElementVisible('*[key="browser/editor.js"]') - .waitForElementVisible('*[key="browser/fileExplorer.js"]') - .waitForElementVisible('*[key="browser/generalSettings.js"]') + .waitForElementVisible('*[key="browser/editor.test.js"]') + .waitForElementVisible('*[key="browser/fileExplorer.test.js"]') + .waitForElementVisible('*[key="browser/generalSettings.test.js"]') .end() }, From 93aa077ba73c7945a44fb9cd5f8a08be5fe48178 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 29 Apr 2020 16:24:05 +0000 Subject: [PATCH 06/13] store test results for better test execution --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d6590513e..24733a98a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,8 @@ jobs: command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js background: true - run: ./ci/browser_tests_chrome.sh + - store_test_results: + path: ./reports/test_results - store_artifacts: path: ./reports/screenshots @@ -71,6 +73,8 @@ jobs: name: Install Firefox command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - run: ./ci/browser_tests_firefox.sh + - store_test_results: + path: ./reports/test_results - store_artifacts: path: ./reports/screenshots From b4544eb74a24ae2878ae330f71f60d2c46aa52d7 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 01:54:33 +0000 Subject: [PATCH 07/13] changed nightwatch script in browser_tests sh file --- ci/browser_tests_chrome.sh | 2 +- ci/browser_tests_firefox.sh | 2 +- package.json | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/browser_tests_chrome.sh b/ci/browser_tests_chrome.sh index 9fe887fd82..c5642f7832 100755 --- a/ci/browser_tests_chrome.sh +++ b/ci/browser_tests_chrome.sh @@ -22,7 +22,7 @@ setupRemixd sleep 5 TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings) -npm run nightwatch $TESTFILES +npm run nightwatch_local_chrome $TESTFILES echo "$TEST_EXITCODE" if [ "$TEST_EXITCODE" -eq 1 ] diff --git a/ci/browser_tests_firefox.sh b/ci/browser_tests_firefox.sh index 9fe887fd82..89abb5d2b7 100755 --- a/ci/browser_tests_firefox.sh +++ b/ci/browser_tests_firefox.sh @@ -22,7 +22,7 @@ setupRemixd sleep 5 TESTFILES=$(circleci tests glob "./test-browser/tests/**/*.test.js" | circleci tests split --split-by=timings) -npm run nightwatch $TESTFILES +npm run nightwatch_local_firefox $TESTFILES echo "$TEST_EXITCODE" if [ "$TEST_EXITCODE" -eq 1 ] diff --git a/package.json b/package.json index a4a3456c7b..062a9cfa16 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,6 @@ "lint": "standard | notify-error", "make-mock-compiler": "node ci/makeMockCompiler.js", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", - "nightwatch": "nightwatch --config nightwatch.js --env chrome", "nightwatch_parallel": "nightwatch -e chrome,firefox --config nightwatch.js", "nightwatch_local_firefox": "nightwatch --config nightwatch.js --env firefox", "nightwatch_local_chrome": "nightwatch --config nightwatch.js --env chrome", From 0d929dcf12693bd693f97aa007a0f048d400df97 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 02:03:17 +0000 Subject: [PATCH 08/13] store test results --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 24733a98a2..e547474b36 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ jobs: background: true - run: ./ci/browser_tests_chrome.sh - store_test_results: - path: ./reports/test_results + path: test_results - store_artifacts: path: ./reports/screenshots @@ -74,7 +74,7 @@ jobs: command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - run: ./ci/browser_tests_firefox.sh - store_test_results: - path: ./reports/test_results + path: test_results - store_artifacts: path: ./reports/screenshots From 2dd3a0de32b00e4a047de7cefc8eb66e726d0099 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 08:28:39 +0000 Subject: [PATCH 09/13] Change directory for storing test results --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e547474b36..e8421b966d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,7 +34,7 @@ jobs: background: true - run: ./ci/browser_tests_chrome.sh - store_test_results: - path: test_results + path: ./reports/test_results/chrome - store_artifacts: path: ./reports/screenshots @@ -74,7 +74,7 @@ jobs: command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - run: ./ci/browser_tests_firefox.sh - store_test_results: - path: test_results + path: ./reports/test_results/firefox - store_artifacts: path: ./reports/screenshots From 7c324c1905ac437778b6397929966bea50fb72fd Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 08:40:44 +0000 Subject: [PATCH 10/13] Setup Directory for Test Results --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e8421b966d..a333b16f10 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,9 @@ jobs: command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js background: true - run: ./ci/browser_tests_chrome.sh + - run: + name: Setup Directory For Test Results + command: mkdir -p ./reports/test_results/chrome - store_test_results: path: ./reports/test_results/chrome - store_artifacts: @@ -73,6 +76,9 @@ jobs: name: Install Firefox command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - run: ./ci/browser_tests_firefox.sh + - run: + name: Setup Directory For Test Results + command: mkdir -p ./reports/test_results/chrome - store_test_results: path: ./reports/test_results/firefox - store_artifacts: From c001a39d9bb95cdbf9448227dfb10c27d3eab1cb Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 09:02:19 +0000 Subject: [PATCH 11/13] Set dir for firefox --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a333b16f10..6bb6b52d62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,10 +32,10 @@ jobs: name: Start Selenium command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js background: true - - run: ./ci/browser_tests_chrome.sh - run: - name: Setup Directory For Test Results + name: Setup Directory For Saving Test Results command: mkdir -p ./reports/test_results/chrome + - run: ./ci/browser_tests_chrome.sh - store_test_results: path: ./reports/test_results/chrome - store_artifacts: @@ -75,10 +75,10 @@ jobs: - run: name: Install Firefox command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - - run: ./ci/browser_tests_firefox.sh - run: - name: Setup Directory For Test Results - command: mkdir -p ./reports/test_results/chrome + name: Setup Directory For Saving Test Results + command: mkdir -p ./reports/test_results/firefox + - run: ./ci/browser_tests_firefox.sh - store_test_results: path: ./reports/test_results/firefox - store_artifacts: From 7354c23a153837145708339a8dc4769a7254a521 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 09:22:40 +0000 Subject: [PATCH 12/13] Changed nightwatch reports directory --- .circleci/config.yml | 10 ++-------- nightwatch.js | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6bb6b52d62..eefaf2ea6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,12 +32,9 @@ jobs: name: Start Selenium command: ./node_modules/.bin/selenium-standalone start --config=../remix-ide/seleniumConfig.js background: true - - run: - name: Setup Directory For Saving Test Results - command: mkdir -p ./reports/test_results/chrome - run: ./ci/browser_tests_chrome.sh - store_test_results: - path: ./reports/test_results/chrome + path: ./reports/tests - store_artifacts: path: ./reports/screenshots @@ -75,12 +72,9 @@ jobs: - run: name: Install Firefox command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - - run: - name: Setup Directory For Saving Test Results - command: mkdir -p ./reports/test_results/firefox - run: ./ci/browser_tests_firefox.sh - store_test_results: - path: ./reports/test_results/firefox + path: ./reports/tests - store_artifacts: path: ./reports/screenshots diff --git a/nightwatch.js b/nightwatch.js index c3067eebec..42e15ba9d6 100644 --- a/nightwatch.js +++ b/nightwatch.js @@ -6,7 +6,7 @@ const metamaskExtension = new Buffer.from(crxFile).toString('base64') // eslint- module.exports = { 'src_folders': ['test-browser/tests'], - 'output_folder': 'reports', + 'output_folder': './reports/tests', 'custom_commands_path': ['test-browser/commands'], 'custom_assertions_path': '', 'page_objects_path': '', From 47bb65f048f5374ad029f78324b9f99849b35b0a Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 30 Apr 2020 11:06:47 +0000 Subject: [PATCH 13/13] Increased parallelism to 20 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eefaf2ea6e..0c921ed1c3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" working_directory: ~/remix-ide - parallelism: 10 + parallelism: 20 steps: - checkout - run: npm install @@ -54,7 +54,7 @@ jobs: - FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json" working_directory: ~/remix-ide - parallelism: 10 + parallelism: 20 steps: - checkout - run: npm install