Skip to content

Commit

Permalink
fix(e2e): support for A14
Browse files Browse the repository at this point in the history
  • Loading branch information
satanTime committed Feb 3, 2022
1 parent 5180a7c commit c0bdcbf
Show file tree
Hide file tree
Showing 32 changed files with 12,095 additions and 14 deletions.
62 changes: 62 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,59 @@ jobs:
- run:
name: Unit Tests
command: npm run test:a13es2015ivy
'Angular 14 Install':
docker:
- image: satantime/puppeteer-node:12.22.9
steps:
- checkout
- restore_cache:
key: a14-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a14/package-lock.json" }}
- run:
name: NPM Install
command: |
if [ ! -d "e2e/a14/node_modules/" ]; then
npm run i:ci:a14
fi
- save_cache:
key: a14-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a14/package-lock.json" }}
paths:
- ./e2e/a14/node_modules
'Angular 14 ES5':
docker:
- image: satantime/puppeteer-node:12.22.9
steps:
- checkout
- attach_workspace:
at: dist
- restore_cache:
key: a14-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a14/package-lock.json" }}
- run:
name: Spreading Build
command: npm run s:a14
- run:
name: Spreading Tests
command: npm run s:test:a14
- run:
name: Unit Tests
command: npm run test:a14es5
'Angular 14 ES2020':
docker:
- image: satantime/puppeteer-node:12.22.9
steps:
- checkout
- attach_workspace:
at: dist
- restore_cache:
key: a14-<< pipeline.parameters.lockindex >>-{{ arch }}-{{ checksum "e2e/a14/package-lock.json" }}
- run:
name: Spreading Build
command: npm run s:a14
- run:
name: Spreading Tests
command: npm run s:test:a14
- run:
name: Unit Tests
command: npm run test:a14es2015
'Angular Jasmine ES5 Ivy':
docker:
- image: satantime/puppeteer-node:14.18.3
Expand Down Expand Up @@ -927,6 +980,9 @@ workflows:
- 'Angular 13 Install':
requires:
- Core
- 'Angular 14 Install':
requires:
- Core
- 'Angular 5 ES5':
requires:
- Core
Expand Down Expand Up @@ -999,6 +1055,12 @@ workflows:
- 'Angular 13 ES2020 Ivy':
requires:
- Angular 13 Install
- 'Angular 14 ES5':
requires:
- Angular 14 Install
- 'Angular 14 ES2020':
requires:
- Angular 14 Install
- 'Angular Jasmine ES5 Ivy':
requires:
- Angular Install
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/e2e/a11/node_modules
/e2e/a12/node_modules
/e2e/a13/node_modules
/e2e/a14/node_modules
/e2e/a-jasmine/node_modules
/e2e/a-jest/node_modules
/e2e/a-min/node_modules
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,21 @@ jobs:
if: steps.a13.outputs.cache-hit != 'true'
run: npm run i:ci:a13

- name: e2e/a14/node_modules
id: a14
uses: actions/cache@v2
with:
path: e2e/a14/node_modules
key: ${{ runner.os }}-a14-v1-${{ hashFiles('./e2e/a14/package-lock.json') }}

- name: Install A12 dependencies
if: steps.a12.outputs.cache-hit != 'true'
run: npm run i:ci:a12

- name: Install A14 dependencies
if: steps.a14.outputs.cache-hit != 'true'
run: npm run i:ci:a14

- name: e2e/a-jasmine/node_modules
id: a-jasmine
uses: actions/cache@v2
Expand Down Expand Up @@ -1101,6 +1116,69 @@ jobs:
run: npm run s:test:a13
- name: Unit Tests
run: npm run test:a13es2015ivy
a14es5ivy:
needs: Install
runs-on: ubuntu-latest
name: A14 es5 Ivy

steps:
- uses: actions/checkout@v2
- name: Node
uses: actions/setup-node@v2
with:
node-version: 14.16.0

- name: e2e/a14/node_modules
id: cache
uses: actions/cache@v2
with:
path: e2e/a14/node_modules
key: ${{ runner.os }}-a14-v1-${{ hashFiles('./e2e/a14/package-lock.json') }}

- name: Workspace
uses: actions/download-artifact@v2
with:
name: workspace
path: dist

- name: Spreading Build
run: npm run s:a14
- name: Spreading Tests
run: npm run s:test:a14
- name: Unit Tests
run: npm run test:a14es5

a14es2015ivy:
needs: Install
runs-on: ubuntu-latest
name: A14 es2015 Ivy

steps:
- uses: actions/checkout@v2
- name: Node
uses: actions/setup-node@v2
with:
node-version: 14.16.0

- name: e2e/a14/node_modules
id: cache
uses: actions/cache@v2
with:
path: e2e/a14/node_modules
key: ${{ runner.os }}-a14-v1-${{ hashFiles('./e2e/a14/package-lock.json') }}

- name: Workspace
uses: actions/download-artifact@v2
with:
name: workspace
path: dist

- name: Spreading Build
run: npm run s:a14
- name: Spreading Tests
run: npm run s:test:a14
- name: Unit Tests
run: npm run test:a14es2015

ajasminees5ivy:
needs: Install
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ e2e/a10/src/test
e2e/a11/src/test
e2e/a12/src/test
e2e/a13/src/test
e2e/a14/src/test
e2e/a5es2015/src/test
e2e/a5es5/src/test
e2e/a6/src/test
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ VOLUME /app/e2e/a10/node_modules
VOLUME /app/e2e/a11/node_modules
VOLUME /app/e2e/a12/node_modules
VOLUME /app/e2e/a13/node_modules
VOLUME /app/e2e/a14/node_modules
VOLUME /app/e2e/a-jasmine/node_modules
VOLUME /app/e2e/a-jest/node_modules
VOLUME /app/e2e/a-min/node_modules
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The current version of the library **has been tested** and **can be used** with:

| Angular | ng-mocks | Jasmine | Jest | Ivy |
| ------: | :------: | :-----: | :--: | :-: |
| 14 | latest | yes | yes | yes |
| 13 | latest | yes | yes | yes |
| 12 | latest | yes | yes | yes |
| 11 | latest | yes | yes | yes |
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- /app/e2e/a11/node_modules
- /app/e2e/a12/node_modules
- /app/e2e/a13/node_modules
- /app/e2e/a14/node_modules
- /app/e2e/a-jasmine/node_modules
- /app/e2e/a-jest/node_modules
- /app/e2e/a-min/node_modules
1 change: 1 addition & 0 deletions docs/articles/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The current version of `ng-mocks` has been tested and **can be used** with:

| Angular | ng-mocks | Jasmine | Jest | Ivy |
| -------: | :-----------------------------------------------------------: | :-----: | :--: | :-: |
| 14 | latest | yes | yes | yes |
| 13 | latest | yes | yes | yes |
| 12 | latest | yes | yes | yes |
| 11 | latest | yes | yes | yes |
Expand Down
20 changes: 11 additions & 9 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions e2e/a14/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
16 changes: 16 additions & 0 deletions e2e/a14/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions e2e/a14/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/src/test
27 changes: 27 additions & 0 deletions e2e/a14/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# A14

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.0-next.0.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
62 changes: 62 additions & 0 deletions e2e/a14/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"a14": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/a14",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.json"
},
"configurations": {
"production": {
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "a14:build:production"
},
"development": {
"browserTarget": "a14:build:development"
}
},
"defaultConfiguration": "development"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.json",
"karmaConfig": "karma.conf.js"
}
}
}
}
},
"defaultProject": "a14"
}
11 changes: 11 additions & 0 deletions e2e/a14/jest.es2015ivy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/src/setup-jest.ts'],
testURL: 'http://localhost',
testPathIgnorePatterns: ['<rootDir>/src/test.ts'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.es2015ivy.spec.json',
},
},
};
Loading

0 comments on commit c0bdcbf

Please sign in to comment.