-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(e2e): add nrwl-nx to e2e external test cases (#1519)
- Loading branch information
Showing
63 changed files
with
22,053 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module.exports = { | ||
rootDir: '../', | ||
globals: { | ||
'ts-jest': { | ||
stringifyContentPathRegex: '\\.html?$', | ||
tsConfig: '<rootDir>/.debug/tsconfig.spec.json', | ||
astTransformers: [ | ||
'jest-preset-angular/build/InlineFilesTransformer', | ||
'jest-preset-angular/build/StripStylesTransformer' | ||
] | ||
} | ||
}, | ||
testEnvironment: 'jest-environment-jsdom-sixteen', | ||
preset: 'jest-preset-angular', | ||
testURL: 'http://localhost/', | ||
transform: { | ||
'^.+\\.(ts|html)$': 'ts-jest' | ||
}, | ||
setupFilesAfterEnv: ['<rootDir>/.debug/test-setup.ts'], | ||
silent: false, | ||
transformIgnorePatterns: ['node_modules/(?!@ngrx)', '<rootDir>/dist/'], | ||
moduleNameMapper: { | ||
'^@ccxp-client/(.*)$': '<rootDir>/libs/$1/src/index.ts', | ||
'^@ccxp-client-testing/(.*)$': '<rootDir>/libs/$1/src/testing.ts', | ||
'^tools/(.*)$': '<rootDir>/tools/$1', | ||
'\\.svg$': 'identity-obj-proxy' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import 'jest-preset-angular'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"types": ["jest", "node"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Add files here to ignore them from prettier formatting | ||
|
||
/dist | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# TsjestCannotFindSourceFile | ||
|
||
This project was generated using [Nx](https://nx.dev). | ||
|
||
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/nx-logo.png" width="450"></p> | ||
|
||
🔎 **Nx is a set of Extensible Dev Tools for Monorepos.** | ||
|
||
## Quick Start & Documentation | ||
|
||
[Nx Documentation](https://nx.dev/angular) | ||
|
||
[10-minute video showing all Nx features](https://nx.dev/angular/getting-started/what-is-nx) | ||
|
||
[Interactive Tutorial](https://nx.dev/angular/tutorial/01-create-application) | ||
|
||
## Adding capabilities to your workspace | ||
|
||
Nx supports many plugins which add capabilities for developing different types of applications and different tools. | ||
|
||
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well. | ||
|
||
Below are some plugins which you can add to your workspace: | ||
|
||
- [Angular](https://angular.io) | ||
- `ng add @nrwl/angular` | ||
- [React](https://reactjs.org) | ||
- `ng add @nrwl/react` | ||
- Web (no framework frontends) | ||
- `ng add @nrwl/web` | ||
- [Nest](https://nestjs.com) | ||
- `ng add @nrwl/nest` | ||
- [Express](https://expressjs.com) | ||
- `ng add @nrwl/express` | ||
- [Node](https://nodejs.org) | ||
- `ng add @nrwl/node` | ||
|
||
## Generate an application | ||
|
||
Run `ng g @nrwl/angular:app my-app` to generate an application. | ||
|
||
> You can use any of the plugins above to generate applications as well. | ||
When using Nx, you can create multiple applications and libraries in the same workspace. | ||
|
||
## Generate a library | ||
|
||
Run `ng g @nrwl/angular:lib my-lib` to generate a library. | ||
|
||
> You can also use any of the plugins above to generate libraries as well. | ||
Libraries are sharable across libraries and applications. They can be imported from `@tsjest-cannot-find-source-file/mylib`. | ||
|
||
## Development server | ||
|
||
Run `ng serve my-app` 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 g component my-component --project=my-app` to generate a new component. | ||
|
||
## Build | ||
|
||
Run `ng build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. | ||
|
||
## Running unit tests | ||
|
||
Run `ng test my-app` to execute the unit tests via [Jest](https://jestjs.io). | ||
|
||
Run `nx affected:test` to execute the unit tests affected by a change. | ||
|
||
## Running end-to-end tests | ||
|
||
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io). | ||
|
||
Run `nx affected:e2e` to execute the end-to-end tests affected by a change. | ||
|
||
## Understand your workspace | ||
|
||
Run `nx dep-graph` to see a diagram of the dependencies of your projects. | ||
|
||
## Further help | ||
|
||
Visit the [Nx Documentation](https://nx.dev/angular) to learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"version": 1, | ||
"projects": { | ||
"nrwl-nx": { | ||
"projectType": "application", | ||
"schematics": { | ||
"@nrwl/angular:component": { | ||
"style": "scss" | ||
} | ||
}, | ||
"root": "apps/nrwl-nx", | ||
"sourceRoot": "apps/nrwl-nx/src", | ||
"prefix": "nrwl-nx", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist/apps/nrwl-nx", | ||
"index": "apps/nrwl-nx/src/index.html", | ||
"main": "apps/nrwl-nx/src/main.ts", | ||
"polyfills": "apps/nrwl-nx/src/polyfills.ts", | ||
"tsConfig": "apps/nrwl-nx/tsconfig.app.json", | ||
"aot": true, | ||
"assets": [ | ||
"apps/nrwl-nx/src/favicon.ico", | ||
"apps/nrwl-nx/src/assets" | ||
], | ||
"styles": ["apps/nrwl-nx/src/styles.scss"], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"production": { | ||
"fileReplacements": [ | ||
{ | ||
"replace": "apps/nrwl-nx/src/environments/environment.ts", | ||
"with": "apps/nrwl-nx/src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"extractCss": true, | ||
"namedChunks": false, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "2mb", | ||
"maximumError": "5mb" | ||
}, | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "6kb", | ||
"maximumError": "10kb" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "nrwl-nx:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "nrwl-nx:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "nrwl-nx:build" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"apps/nrwl-nx/tsconfig.app.json", | ||
"apps/nrwl-nx/tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**", | ||
"!apps/nrwl-nx/**" | ||
] | ||
} | ||
}, | ||
"test": { | ||
"builder": "@nrwl/jest:jest", | ||
"options": { | ||
"jestConfig": "apps/nrwl-nx/jest.config.js", | ||
"tsConfig": "apps/nrwl-nx/tsconfig.spec.json", | ||
"passWithNoTests": true, | ||
"setupFile": "apps/nrwl-nx/src/test-setup.ts" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"defaultCollection": "@nrwl/angular", | ||
"analytics": false | ||
}, | ||
"schematics": { | ||
"@nrwl/angular:application": { | ||
"unitTestRunner": "jest", | ||
"e2eTestRunner": "cypress" | ||
}, | ||
"@nrwl/angular:library": { | ||
"unitTestRunner": "jest" | ||
} | ||
}, | ||
"defaultProject": "nrwl-nx" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# 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 | ||
|
||
# You can see what browsers were selected by your queries by running: | ||
# npx browserslist | ||
|
||
> 0.5% | ||
last 2 versions | ||
Firefox ESR | ||
not dead | ||
not IE 9-11 # For IE 9-11 support, remove 'not'. |
10 changes: 10 additions & 0 deletions
10
e2e/__external-repos__/nrwl-nx/apps/nrwl-nx/jest.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
name: 'tsjest-cannot-find-source-file', | ||
preset: '../../jest.config.js', | ||
coverageDirectory: '../../coverage/apps/tsjest-cannot-find-source-file', | ||
snapshotSerializers: [ | ||
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', | ||
'jest-preset-angular/build/AngularSnapshotSerializer.js', | ||
'jest-preset-angular/build/HTMLCommentSerializer.js', | ||
], | ||
} |
Oops, something went wrong.