diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d91784124..70639d66e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -373,7 +373,7 @@ jobs: install-chrome: true install-chromedriver: false install-geckodriver: false - - run: sh ./chrome.sh + - run: yarn install_webdriver - run: google-chrome --version - when: condition: @@ -384,7 +384,7 @@ jobs: install-chrome: false install-geckodriver: false install-chromedriver: false - - run: sh ./chrome.sh + - run: yarn install_webdriver - run: firefox --version - run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.jobsize >> << parameters.job >> - store_test_results: @@ -412,15 +412,6 @@ jobs: default: 1 parallelism: << parameters.parallelism >> steps: - - browser-tools/install-browser-tools: - install-firefox: false - install-chrome: true - install-geckodriver: false - install-chromedriver: false - - install-chromedriver-custom-linux - - run: google-chrome --version - - run: chromedriver --version - - run: rm LICENSE.chromedriver 2> /dev/null || true - checkout - attach_workspace: at: . @@ -430,10 +421,13 @@ jobs: - run: yarn run selenium-install --singleDriverInstall=firefox - 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: - name: Start Selenium - command: yarn run selenium --singleDriverStart=chrome - background: true + - browser-tools/install-browser-tools: + install-firefox: false + install-chrome: true + install-geckodriver: false + install-chromedriver: false + - run: yarn install_webdriver + - run: google-chrome --version - run: ./apps/remix-ide/ci/browser_test_plugin.sh << parameters.plugin >> - store_test_results: path: ./reports/tests diff --git a/README.md b/README.md index baec594045..25b242ad27 100644 --- a/README.md +++ b/README.md @@ -246,12 +246,6 @@ This script will give you an options menu, just select the test you want ``` yarn run select_test ``` -#### method 2 - -``` -yarn run group_test --test=debugger --group=10 --env=chromeDesktop -``` -- specify chromeDesktop to see the browser action, use 'chrome' to run it headless ### Run the same (flaky) test across all instances in CircleCI diff --git a/chrome.sh b/apps/remix-ide-e2e/install-webdriver.sh similarity index 100% rename from chrome.sh rename to apps/remix-ide-e2e/install-webdriver.sh diff --git a/apps/remix-ide-e2e/nightwatch.ts b/apps/remix-ide-e2e/nightwatch-chrome.ts similarity index 71% rename from apps/remix-ide-e2e/nightwatch.ts rename to apps/remix-ide-e2e/nightwatch-chrome.ts index 4a75dd3664..9d06c04787 100644 --- a/apps/remix-ide-e2e/nightwatch.ts +++ b/apps/remix-ide-e2e/nightwatch-chrome.ts @@ -8,11 +8,7 @@ module.exports = { webdriver: { start_process: true, - port: 4444, - cli_args: [ - // very verbose geckodriver logs - // '-vv' - ] + port: 4444 }, test_settings: { @@ -29,9 +25,6 @@ module.exports = { on_failure: true, on_error: true }, - web_driver: { - start_process: true - }, exclude: ['dist/apps/remix-ide-e2e/src/tests/runAndDeploy.test.js', 'dist/apps/remix-ide-e2e/src/tests/pluginManager.test.ts'] }, @@ -73,31 +66,6 @@ module.exports = { args: ['window-size=2560,1440', 'start-fullscreen', '--no-sandbox', '--headless', '--verbose'] } } - }, - - 'firefoxDesktop': { - desiredCapabilities: { - 'browserName': 'firefox', - 'javascriptEnabled': true, - 'acceptSslCerts': true, - 'moz:firefoxOptions': { - args: ['-width=2560', '-height=1440'] - } - } - }, - - 'firefox': { - web_driver: { - server_path: './node_modules/geckodriver/bin/geckodriver.js' - }, - desiredCapabilities: { - 'browserName': 'firefox', - 'javascriptEnabled': true, - 'acceptSslCerts': true, - 'moz:firefoxOptions': { - args: ['-headless', '-width=2560', '-height=1440'] - } - } } } } diff --git a/apps/remix-ide-e2e/nightwatch-firefox.ts b/apps/remix-ide-e2e/nightwatch-firefox.ts new file mode 100644 index 0000000000..d1057726d6 --- /dev/null +++ b/apps/remix-ide-e2e/nightwatch-firefox.ts @@ -0,0 +1,54 @@ +module.exports = { + src_folders: ['dist/apps/remix-ide-e2e/src/tests'], + output_folder: './reports/tests', + custom_commands_path: ['dist/apps/remix-ide-e2e/src/commands'], + custom_assertions_path: '', + page_objects_path: '', + globals_path: '', + + webdriver: { + start_process: true, + port: 4444, + server_path: './node_modules/geckodriver/bin/geckodriver.js', + }, + + test_settings: { + selenium_port: 4444, + selenium_host: 'localhost', + 'default': { + globals: { + waitForConditionTimeout: 10000, + asyncHookTimeout: 100000 + }, + screenshots: { + enabled: true, + path: './reports/screenshots', + on_failure: true, + on_error: true + }, + exclude: ['dist/apps/remix-ide-e2e/src/tests/runAndDeploy.test.js', 'dist/apps/remix-ide-e2e/src/tests/pluginManager.test.ts'] + }, + + 'firefoxDesktop': { + desiredCapabilities: { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'moz:firefoxOptions': { + args: ['-width=2560', '-height=1440'] + } + } + }, + + 'firefox': { + desiredCapabilities: { + 'browserName': 'firefox', + 'javascriptEnabled': true, + 'acceptSslCerts': true, + 'moz:firefoxOptions': { + args: ['-headless', '-width=2560', '-height=1440'] + } + } + } + } +} diff --git a/apps/remix-ide-e2e/src/select_tests.sh b/apps/remix-ide-e2e/src/select_tests.sh index 6216b824dd..39dd4055f9 100644 --- a/apps/remix-ide-e2e/src/select_tests.sh +++ b/apps/remix-ide-e2e/src/select_tests.sh @@ -47,6 +47,13 @@ do done else # run the selected test - yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $opt --env=$BROWSER + if [ "$BROWSER" = "firefoxDesktop" ]; then + yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch-firefox.js $opt --env=$BROWSER + elif [ "$BROWSER" = "chrome" ]; then + yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch-chrome.js $opt --env=$BROWSER + elif [ "$BROWSER" = "chromeDesktop" ]; then + yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch-chrome.js $opt --env=$BROWSER + fi + fi done diff --git a/apps/remix-ide/ci/browser_test.sh b/apps/remix-ide/ci/browser_test.sh index 7bc595e1e7..8af369b567 100755 --- a/apps/remix-ide/ci/browser_test.sh +++ b/apps/remix-ide/ci/browser_test.sh @@ -17,7 +17,7 @@ sleep 5 node apps/remix-ide/ci/splice_tests.js $2 $3 TESTFILES=$(node apps/remix-ide/ci/splice_tests.js $2 $3 | circleci tests split --split-by=timings) for TESTFILE in $TESTFILES; do - npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1 + npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js dist/apps/remix-ide-e2e/src/tests/${TESTFILE}.js --env=$1 || TEST_EXITCODE=1 done echo "$TEST_EXITCODE" diff --git a/apps/remix-ide/ci/browser_test_plugin.sh b/apps/remix-ide/ci/browser_test_plugin.sh index b0f02995a0..1f5afbd28c 100755 --- a/apps/remix-ide/ci/browser_test_plugin.sh +++ b/apps/remix-ide/ci/browser_test_plugin.sh @@ -15,7 +15,7 @@ sleep 5 TESTFILES=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep $1 | sort | circleci tests split ) for TESTFILE in $TESTFILES; do - npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=chrome || TEST_EXITCODE=1 + npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-chrome.js $TESTFILE --env=chrome || TEST_EXITCODE=1 done echo "$TEST_EXITCODE" diff --git a/apps/remix-ide/ci/flaky.sh b/apps/remix-ide/ci/flaky.sh index 6cc1adb557..5373daec0b 100755 --- a/apps/remix-ide/ci/flaky.sh +++ b/apps/remix-ide/ci/flaky.sh @@ -23,7 +23,7 @@ yarn run serve:production & sleep 5 for TESTFILE in $TESTFILES; do - npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=$1 || TEST_EXITCODE=1 + npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch-${1}.js $TESTFILE --env=$1 || TEST_EXITCODE=1 done echo "$TEST_EXITCODE" diff --git a/package.json b/package.json index 916e6450ec..5baa7e5b02 100644 --- a/package.json +++ b/package.json @@ -74,47 +74,8 @@ "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "build:production": "NODE_ENV=production nx build remix-ide --configuration=production --skip-nx-cache", "serve:production": "npx http-server ./dist/apps/remix-ide", + "install_webdriver": "bash ./apps/remix-ide-e2e/install-webdriver.sh", "select_test": "bash apps/remix-ide-e2e/src/select_tests.sh", - "group_test": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${npm_config_test}_group${npm_config_group}.test.js --env=${npm_config_env}", - "nightwatch_parallel": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", - "nightwatch_local_firefox": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox", - "nightwatch_local_chrome": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome", - "nightwatch_local_ballot": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot.test.js --env=chrome", - "nightwatch_local_ballot_0_4_14": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.js --env=chrome", - "nightwatch_local_usingWorker": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/usingWebWorker.test.js --env=chrome", - "nightwatch_local_libraryDeployment": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/libraryDeployment.test.js --env=chrome", - "nightwatch_local_solidityImport": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityImport_*.test.js --env=chrome", - "nightwatch_local_recorder": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/recorder.test.js --env=chrome", - "nightwatch_local_transactionExecution": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/transactionExecution_*.test.js --env=chrome", - "nightwatch_local_staticAnalysis": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/staticAnalysis.test.js --env=chrome", - "nightwatch_local_signingMessage": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/signingMessage.test.js --env=chrome", - "nightwatch_local_specialFunctions": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/specialFunctions_*.test.js --env=chrome", - "nightwatch_local_solidityUnitTests": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityUnittests_*.test.js --env=chrome", - "nightwatch_local_remixd": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/remixd.test.js --env=chrome", - "nightwatch_local_terminal": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/terminal_*.test.js --env=chrome", - "nightwatch_local_gist": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/gist.test.js --env=chrome", - "nightwatch_local_workspace": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/workspace.test.js --env=chrome", - "nightwatch_local_defaultLayout": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/defaultLayout.test.js --env=chrome", - "nightwatch_local_pluginManager": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/pluginManager.test.js --env=chrome", - "nightwatch_local_publishContract": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/publishContract.test.js --env=chrome", - "nightwatch_local_generalSettings": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/generalSettings.test.js --env=chrome", - "nightwatch_local_fileExplorer": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/fileExplorer.test.js --env=chrome", - "nightwatch_local_debugger": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/debugger_*.test.js --env=chrome", - "nightwatch_local_editor": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/editor.test.js --env=chrome", - "nightwatch_local_importFromGithub": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/importFromGithub.test.js --env=chrome", - "nightwatch_local_compiler": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/compiler_api.test.js --env=chrome", - "nightwatch_local_txListener": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/txListener.test.js --env=chrome", - "nightwatch_local_fileManager": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/fileManager_api.test.js --env=chrome", - "nightwatch_local_runAndDeploy": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js --env=chrome-runAndDeploy", - "nightwatch_local_url": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/url.test.js --env=chrome", - "nightwatch_local_verticalIconscontextmenu": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.js --env=chrome", - "nightwatch_local_pluginApi": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/plugin_api_*.js --env=chrome", - "nightwatch_local_migrate_filesystem": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.js --env=chrome", - "nightwatch_local_proxy": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/proxy.test.js --env=chrome", - "nightwatch_local_stress_editor": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/stressEditor.test.js --env=chromeDesktop", - "nightwatch_local_search": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/search.test.js --env=chromeDesktop", - "nightwatch_local_providers": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/providers.test.js --env=chromeDesktop", - "nightwatch_local_walkthrough": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/walkthrough.test.js --env=chromeDesktop", "onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint", "remixd": "nx build remixd && chmod +x dist/libs/remixd/src/bin/remixd.js && dist/libs/remixd/src/bin/remixd.js --remix-ide http://127.0.0.1:8080", "simulator": "nx build remix-simulator && chmod +x dist/libs/remix-simulator/bin/ethsim && dist/libs/remix-simulator/bin/ethsim start --rpc", diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..d2e5373d96 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +Google Chrome 122.0.6261.57