Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove legacy e2e tests job #28645

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 0 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -596,9 +571,6 @@ workflows:
- deploy_aio:
requires:
- test_aio
- legacy-e2e-tests:
requires:
- build-npm-packages
- legacy-misc-tests:
requires:
- build-npm-packages
Expand Down Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions modules/benchmarks/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ package(default_visibility = ["//visibility:public"])

exports_files([
"tsconfig-build.json",
"tsconfig-e2e.json",
"start-server.js",
])

filegroup(
name = "favicon",
srcs = [
"favicon.ico",
],
)
40 changes: 12 additions & 28 deletions modules/benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,23 @@
## Run in the browser

```bash
# Build the Angular packages.
yarn tsc -p packages/

# Build the e2e tests which are part of the "modules/"
./modules/build.sh

# Start server that serves all benchmark e2e apps.
yarn gulp serve
```

Now you can open benchmark e2e apps using their appropriate URLs. For example:
yarn bazel run modules/benchmarks/src/tree/{name}:devserver

```
http://localhost:8000/all/benchmarks/src/tree/ng2/index.html
# e.g. "ng2" tree benchmark:
yarn bazel run modules/benchmarks/src/tree/ng2:devserver
```

## Run e2e tests
$ export NODE_PATH=$(pwd)/dist/all:$(pwd)/dist/tools
$ ./node_modules/.bin/protractor protractor-e2e.conf.js --specs=dist/all/benchmarks/e2e_test/tree_spec.js

Options for protractor with `protractor-e2e.conf.js`:
- `--bundles=true`: use prebuilt bundles
- `--ng-help`: show all available options

## Run benchmarks tests
$ export NODE_PATH=$(pwd)/dist/all:$(pwd)/dist/tools
$ ./node_modules/.bin/protractor protractor-perf.conf.js --specs=dist/all/benchmarks/e2e_test/tree_perf.js
```
# Run e2e tests of individual applications:
yarn bazel test modules/benchmarks/src/tree/ng2/...

Options for protractor with `protractor-perf.conf.js`:
- `--bundles=true`: use prebuilt bundles
- `--ng-help`: show all available options
# Run all e2e tests:
yarn bazel test modules/benchmarks/...
```

## Compile *_aot.ts files
## Use of *_aot.ts files

These files are compiled as part of the compiler_cli integration tests.
See `@angular/compile_cli/integrationtest/tsconfig.json`
The `*_aot.ts` files are used as entry-points within Google to run the benchmark
tests. These are still built as part of the corresponding `ng_module` rule.
35 changes: 0 additions & 35 deletions modules/benchmarks/e2e_test/largeform_spec.ts

This file was deleted.

99 changes: 0 additions & 99 deletions modules/benchmarks/e2e_test/largetable_perf.ts

This file was deleted.

62 changes: 0 additions & 62 deletions modules/benchmarks/e2e_test/largetable_spec.ts

This file was deleted.

Binary file removed modules/benchmarks/favicon.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions modules/benchmarks/src/largeform/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package(default_visibility = ["//modules/benchmarks:__subpackages__"])

load("//tools:defaults.bzl", "ts_library")

ts_library(
name = "tests_lib",
testonly = 1,
srcs = ["largeform_perf.spec.ts"],
tsconfig = "//modules/benchmarks:tsconfig-e2e.json",
deps = [
"//modules/e2e_util",
"@ngdeps//@types/jasminewd2",
"@ngdeps//protractor",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,47 @@
* found in the LICENSE file at https://angular.io/license
*/

import {runBenchmark, verifyNoBrowserErrors} from 'e2e_util/perf_util';
import {$} from 'protractor';
import {$, By, element} from 'protractor';

import {openBrowser, verifyNoBrowserErrors} from '../../../e2e_util/e2e_util';
import {runBenchmark} from '../../../e2e_util/perf_util';

interface Worker {
id: string;
prepare?(): void;
work(): void;
}

const CreateAndDestroyWorker: Worker = {
const CreateAndDestroyWorker = {
id: 'createDestroy',
work: () => {
$('#createDom').click();
$('#destroyDom').click();
}
};

describe('largeform benchmark perf', () => {
describe('largeform benchmark spec', () => {

afterEach(verifyNoBrowserErrors);

it('should work for ng2', () => {
openBrowser({
url: '/',
params: [{name: 'copies', value: 1}],
ignoreBrowserSynchronization: true,
});
$('#createDom').click();
expect(element.all(By.css('input[name=value0]')).get(0).getAttribute('value'))
.toBe('someValue0');
$('#destroyDom').click();
expect(element.all(By.css('input[name=value0]')).count()).toBe(0);
});

[CreateAndDestroyWorker].forEach((worker) => {
describe(worker.id, () => {
it('should run for ng2', done => {
runLargeFormBenchmark({
id: `largeform.ng2.${worker.id}`,
url: 'all/benchmarks/src/largeform/ng2/index.html',
worker: worker
}).then(done, done.fail);
runLargeFormBenchmark({url: '/', id: `largeform.ng2.${worker.id}`, worker: worker})
.then(done, done.fail);
});
});
});
Expand Down