From 22e0aef306914ef0aaf7541426ada8300183f1bf Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 12:13:21 -0600 Subject: [PATCH 1/7] replaced circleci image with ours temp --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e039d6d06..34faf03b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,9 @@ integration_job: &integration_job environment: <<: *integration_environment docker: - - image: circleci/node:8-browsers + # TODO: replace with node:8-browsers when build issues are resolved. + # - image: circleci/node:8-browsers + - image: coralproject/ci - image: circleci/mongo:3 - image: circleci/redis:4-alpine steps: From 1b3a74a011aab366f9f0ba672b6a959989f67e47 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 13:33:45 -0600 Subject: [PATCH 2/7] store test results as artifacts every time --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34faf03b5..b264e96a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,10 @@ integration_job: &integration_job - store_test_results: when: always path: /tmp/circleci-test-results + - store_artifacts: + when: always + path: /tmp/circleci-test-results + version: 2 jobs: From 8613ced71deb6557caa6ab1161c84e731031457a Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 14:19:23 -0600 Subject: [PATCH 3/7] applied fix to allow local run with firefox --- nightwatch.conf.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nightwatch.conf.js b/nightwatch.conf.js index 76a5c291b..c76e3ed0f 100644 --- a/nightwatch.conf.js +++ b/nightwatch.conf.js @@ -26,7 +26,6 @@ module.exports = { selenium_host: 'localhost', silent: true, desiredCapabilities: { - browserName: 'chrome', javascriptEnabled: true, acceptSslCerts: true, webStorageEnabled: true, @@ -41,16 +40,27 @@ module.exports = { path: process.env.REPORTS_FOLDER || './test/e2e/reports', }, }, - chrome: {}, + chrome: { + desiredCapabilities: { + browserName: 'chrome', + }, + }, 'chrome-headless': { desiredCapabilities: { + browserName: 'chrome', chromeOptions: { args: ['--headless', '--disable-gpu', 'window-size=1600,1200'], }, }, }, + firefox: { + desiredCapabilities: { + browserName: 'firefox', + }, + }, 'firefox-headless': { desiredCapabilities: { + browserName: 'firefox', 'moz:firefoxOptions': { args: ['-headless'], }, From 7598784acca09ee7549cd20c68b6a446b0150161 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 14:33:52 -0600 Subject: [PATCH 4/7] disable headless tests, run with full browsers --- .circleci/e2e.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/e2e.sh b/.circleci/e2e.sh index 2d9fc25af..c9688c476 100755 --- a/.circleci/e2e.sh +++ b/.circleci/e2e.sh @@ -23,7 +23,7 @@ if [[ "$BROWSERSTACK" == "true" && -n "$BROWSERSTACK_KEY" ]]; then echo Testing on browserstack node scripts/e2e.js --reports-folder "$REPORTS_FOLDER" --retries "$E2E_MAX_RETRIES" --timeout "$E2E_WAIT_FOR_TIMEOUT" --browsers "$E2E_BROWSERS" --browserstack else - # When browserstack is not available test locally using chrome headless. + # When browserstack is not available test locally. echo Testing locally - node scripts/e2e.js --reports-folder "$REPORTS_FOLDER" --retries "$E2E_MAX_RETRIES" --timeout "$E2E_WAIT_FOR_TIMEOUT" --browsers "$E2E_BROWSERS" --headless + node scripts/e2e.js --reports-folder "$REPORTS_FOLDER" --retries "$E2E_MAX_RETRIES" --timeout "$E2E_WAIT_FOR_TIMEOUT" --browsers "$E2E_BROWSERS" fi From 7af9458710fef676b43dcf1592b4d255892ce0ca Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 14:46:00 -0600 Subject: [PATCH 5/7] added logs to artifacts --- nightwatch-browserstack.conf.js | 6 ++++-- nightwatch.conf.js | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/nightwatch-browserstack.conf.js b/nightwatch-browserstack.conf.js index 961d50b4e..1bd62574c 100644 --- a/nightwatch-browserstack.conf.js +++ b/nightwatch-browserstack.conf.js @@ -1,8 +1,10 @@ const { ROOT_URL } = require('./config'); +const REPORTS_FOLDER = process.env.REPORTS_FOLDER || './test/e2e/reports'; + const nightwatch_config = { src_folders: './test/e2e/specs/', - output_folder: process.env.REPORTS_FOLDER || './test/e2e/reports', + output_folder: REPORTS_FOLDER, page_objects_path: './test/e2e/page_objects', globals_path: './test/e2e/globals', @@ -34,7 +36,7 @@ const nightwatch_config = { enabled: true, on_failure: true, on_error: true, - path: process.env.REPORTS_FOLDER || './test/e2e/reports', + path: REPORTS_FOLDER, }, }, chrome: { diff --git a/nightwatch.conf.js b/nightwatch.conf.js index c76e3ed0f..75dfa5ef6 100644 --- a/nightwatch.conf.js +++ b/nightwatch.conf.js @@ -1,15 +1,17 @@ const { ROOT_URL } = require('./config'); +const REPORTS_FOLDER = process.env.REPORTS_FOLDER || './test/e2e/reports'; + module.exports = { src_folders: './test/e2e/specs/', - output_folder: process.env.REPORTS_FOLDER || './test/e2e/reports', + output_folder: REPORTS_FOLDER, page_objects_path: './test/e2e/page_objects', globals_path: './test/e2e/globals', selenium: { start_process: true, server_path: 'node_modules/selenium-standalone/.selenium/selenium-server/3.7.1-server.jar', - log_path: './test/e2e/', + log_path: REPORTS_FOLDER, host: '127.0.0.1', port: 6666, cli_args: { @@ -37,7 +39,7 @@ module.exports = { enabled: true, on_failure: true, on_error: true, - path: process.env.REPORTS_FOLDER || './test/e2e/reports', + path: REPORTS_FOLDER, }, }, chrome: { From b6a2d791ec7ff6494ff7430a7925d0f59395046d Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 15:18:54 -0600 Subject: [PATCH 6/7] re-enabled headless support --- .circleci/e2e.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/e2e.sh b/.circleci/e2e.sh index c9688c476..826736bfc 100755 --- a/.circleci/e2e.sh +++ b/.circleci/e2e.sh @@ -25,5 +25,5 @@ if [[ "$BROWSERSTACK" == "true" && -n "$BROWSERSTACK_KEY" ]]; then else # When browserstack is not available test locally. echo Testing locally - node scripts/e2e.js --reports-folder "$REPORTS_FOLDER" --retries "$E2E_MAX_RETRIES" --timeout "$E2E_WAIT_FOR_TIMEOUT" --browsers "$E2E_BROWSERS" + node scripts/e2e.js --reports-folder "$REPORTS_FOLDER" --retries "$E2E_MAX_RETRIES" --timeout "$E2E_WAIT_FOR_TIMEOUT" --browsers "$E2E_BROWSERS" --headless fi From a0d2a4147c933cbccac99a127bea36b5d774a38b Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 13 Mar 2018 15:39:13 -0600 Subject: [PATCH 7/7] disabled firefox local integration tests :( --- .circleci/config.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b264e96a4..507706803 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -245,10 +245,11 @@ workflows: <<: *filter_develop requires: - build_assets - - test_integration_firefox_local: - <<: *filter_develop - requires: - - build_assets + # TODO: uncomment when more reliable + # - test_integration_firefox_local: + # <<: *filter_develop + # requires: + # - build_assets deploy-tagged: jobs: - npm_dependencies: