diff --git a/.circleci/config.yml b/.circleci/config.yml index fa77e67154..389949576d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -524,31 +524,6 @@ jobs: - run: yarn karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} - run: ./scripts/saucelabs/stop-tunnel.sh - legacy-e2e-tests: - <<: *job_defaults - docker: - - image: *browsers_docker_image - steps: - - checkout: - <<: *post_checkout - - *restore_cache - - *define_env_vars - - *download_yarn - - *yarn_install - - *setup_circleci_bazel_config - - *setup_bazel_remote_execution - - attach_workspace: - at: dist - # Build the e2e tests using the existing Bazel "packages-dist" output that has been - # attached to this job. This avoids multiple rebuilds across various CI jobs. - - run: ./scripts/build-e2e-tests.sh --use-existing-packages-dist - - run: - name: Starting servers for e2e tests - command: yarn gulp serve - background: true - - run: NODE_PATH=$NODE_PATH:./dist/all yarn protractor ./protractor-e2e.conf.js --bundles=true - - run: NODE_PATH=$NODE_PATH:./dist/all yarn protractor ./protractor-perf.conf.js --bundles=true --dryrun - legacy-misc-tests: <<: *job_defaults steps: @@ -596,9 +571,6 @@ workflows: - deploy_aio: requires: - test_aio - - legacy-e2e-tests: - requires: - - build-npm-packages - legacy-misc-tests: requires: - build-npm-packages @@ -647,7 +619,6 @@ workflows: # since the publishing script expects the legacy outputs layout. - build-npm-packages - build-ivy-npm-packages - - legacy-e2e-tests - legacy-misc-tests - legacy-unit-tests-local - legacy-unit-tests-saucelabs diff --git a/modules/build.sh b/modules/build.sh deleted file mode 100755 index 01d151a30b..0000000000 --- a/modules/build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -set -x -u -e -o pipefail - -# Go to project directory. -cd $(dirname ${0})/.. - -# Build the "modules" JS output. The module e2e tests can be served by running "gulp serve". -yarn tsc -p ./modules - -# Commands that have been extracted from the deleted "build.sh". These are responsible for -# copying assets and vendor files for the playground e2e tests to the dist output. -( - echo "=> Copying asset and vendor files which are needed for playground e2e tests." - mkdir -p ./dist/all/playground/vendor - cp -r ./modules/playground ./dist/all/ - cp -r ./modules/playground/favicon.ico ./dist/ - cd ./dist/all/playground/vendor - ln -s ../../../../node_modules/core-js/client/core.js . - ln -s ../../../../node_modules/zone.js/dist/zone.js . - ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js . - ln -s ../../../../node_modules/systemjs/dist/system.src.js . - ln -s ../../../../node_modules/base64-js . - ln -s ../../../../node_modules/reflect-metadata/Reflect.js . - ln -s ../../../../node_modules/rxjs . - ln -s ../../../../node_modules/angular/angular.js . - ln -s ../../../../node_modules/hammerjs/hammer.js . -) - -# Commands that have been extracted from the deleted "build.sh". These are responsible for -# copying assets and vendor files for the benchmarks e2e tests to the dist output. -( - echo "=> Copying asset and vendor files which are needed for e2e benchmarks." - mkdir -p ./dist/all/benchmarks/vendor - cp -r ./modules/benchmarks ./dist/all/ - cp -r ./modules/benchmarks/favicon.ico ./dist/ - cd ./dist/all/benchmarks/vendor - ln -s ../../../../node_modules/core-js/client/core.js . - ln -s ../../../../node_modules/zone.js/dist/zone.js . - ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js . - ln -s ../../../../node_modules/systemjs/dist/system.src.js . - ln -s ../../../../node_modules/reflect-metadata/Reflect.js . - ln -s ../../../../node_modules/rxjs . - ln -s ../../../../node_modules/angular/angular.js . - ln -s ../../../../node_modules/incremental-dom/dist/incremental-dom-cjs.js -) diff --git a/protractor-e2e.conf.js b/protractor-e2e.conf.js deleted file mode 100644 index 3fb56d08e6..0000000000 --- a/protractor-e2e.conf.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ - -// Make sure that the command line is read as the first thing -// as this could exit node if the help script should be printed. -require('./dist/all/e2e_util/e2e_util').readCommandLine(); - -exports.config = { - onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); }, - allScriptsTimeout: 11000, - specs: ['dist/all/**/e2e_test/**/*_spec.js'], - exclude: ['dist/all/@angular/examples/**'], - capabilities: { - 'browserName': 'chrome', - // Enables concurrent testing. Currently runs four e2e files in parallel. - shardTestFiles: true, - maxInstances: 4, - }, - directConnect: true, - baseUrl: 'http://localhost:8000/', - framework: 'jasmine2', - jasmineNodeOpts: - {showColors: true, defaultTimeoutInterval: 60000, print: function(msg) { console.log(msg) }}, - useAllAngular2AppRoots: true, -}; diff --git a/protractor-perf.conf.js b/protractor-perf.conf.js index 702b360861..2839079890 100644 --- a/protractor-perf.conf.js +++ b/protractor-perf.conf.js @@ -6,16 +6,9 @@ * found in the LICENSE file at https://angular.io/license */ -// Determine if we run under bazel -const isBazel = !!process.env.RUNFILES; -// isBazel needed while 'scripts/ci/test-e2e.sh test.e2e.protractor-e2e' is run -// on Travis -// TODO: port remaining protractor e2e tests to bazel protractor_web_test_suite rule - // Make sure that the command line is read as the first thing // as this could exit node if the help script should be printed. -const BASE = isBazel ? 'angular/modules' : './dist/all'; -require(`${BASE}/e2e_util/perf_util`).readCommandLine(); +require('angular/modules/e2e_util/perf_util').readCommandLine(); const CHROME_OPTIONS = { 'args': ['--js-flags=--expose-gc', '--no-sandbox', '--headless', '--disable-dev-shm-usage'], @@ -25,7 +18,7 @@ const CHROME_OPTIONS = { } }; -const config = { +exports.config = { onPrepare: function() { beforeEach(function() { browser.ignoreSynchronization = false; }); }, restartBrowserBetweenTests: true, allScriptsTimeout: 11000, @@ -46,14 +39,3 @@ const config = { }, useAllAngular2AppRoots: true }; - -// Bazel has different strategy for how specs and baseUrl are specified -if (!isBazel) { - config.baseUrl = 'http://localhost:8000/'; - config.specs = [ - 'dist/all/**/e2e_test/**/*_perf.spec.js', - 'dist/all/**/e2e_test/**/*_perf.js', - ] -} - -exports.config = config; diff --git a/scripts/build-e2e-tests.sh b/scripts/build-e2e-tests.sh deleted file mode 100755 index 7d62b191e4..0000000000 --- a/scripts/build-e2e-tests.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -# Legacy bash script that builds the e2e tests partially using Bazel and old Bash build scripts. -# These scripts will be removed in the future and should be replaced by Bazel's test command. - -# Immediately exit if any command failed. -set -e - -# Go to project directory. -cd $(dirname ${0})/../ - -BAZEL=`yarn bin bazel` -BAZEL_BIN_DIR=`${BAZEL} info bazel-bin` - -if [[ ! ${*} == *--use-existing-packages-dist* ]]; then - # Build all Angular release packages (this does not include //packages/benchpress) - ./scripts/build-packages-dist.sh -fi - -# Build the "@angular/benchpress" package which is required for running e2e perf tests. -yarn bazel build //packages/benchpress:npm_package - -# Copy the NPM package output of the benchpress package to the "packages-dist" directory. -# This simplifies our path mappings for tests depending on these built packages. -mkdir dist/packages-dist/benchpress -cp -R ${BAZEL_BIN_DIR}/packages/benchpress/npm_package/* dist/packages-dist/benchpress - -# Symlinks the Bazel "packages-dist" output to "dist/all/@angular" so that it can be used in -# combination with "$NODE_PATH" for a proper module resolution. Note that this is outdated -# and shouldn't be necessary if we run tests using Bazel in the future. -mkdir -p ./dist/all -(cd ./dist/all; ln -s ../packages-dist/ "@angular") - -# Build the modules which contain the playground and benchmark e2e tests. These -# can be served by running "gulp serve". -./modules/build.sh