This is enables the use of Cypress as e2e test runner for a new
application in the Nx workspace.
The Cypress command is hidden as a flag in the main application
schematics. Meaning, the only thing needed to enable this feature is to
add the `--e2eTestRunner=cypress` flag at your command when creating
a new application.
Example:
```shell
$ ng generate application myApp --e2eTestRunner=cypress
```
By default `ng e2e my-app-e2e` will start Cypress in the application
mode. You will see the desktop application and will be able to check all
the tests and run them as you which.
If you want to run the Cypress tests in headless mode (while being on CI
for example), you can do so by passing the `--headless` to the command.
You will see all the test results live in the terminal.
```shell
$ ng e2e my-app-e2e --headless
```
The Cypress configuration files and folders are present in the new
`my-app-e2e` folder created. Every file are written in typescript and
will be compiled into the `/dist/apps/my-app-e2e` folder before starting
Cypress.
If you need to fine tunes the options of Cypress, you can do so by
modifying directly the `cypress.json` file in the related project.
The build steps are has follow:
• compile typescript files into javascript inside the
`/dist/app/my-app-e2e` folder
• build a dev server (using the default AngularCLI dev target build)
• run Cypress with the compiled e2e files
Screenshots and Videos will be accessible respectively in
`/dist/apps/homer-app-e2e/screenshots` and
`/dist/apps/homer-app-e2e/videos`.
This PR requires https://github.com/nrwl/nx/pull/758
## Current Behavior
The option to generate an application with a unit-test-runner of jest is not available
## Expected Behavior
User is able to generate an application which uses jest to run unit tests via:
```sh
ng g jest
ng g app jest-app --unit-test-runner jest
ng test jest-app
```
Angular CLI now supports `host.delete()`. `updateProject()` now properly removes
the library generated service and component files.
> Earlier workarounds using `unlink()` were not working.
Refs #650.
Add support to generate NgRx facade classes when the command `--facade` boolean option
is used.
```console
ng g ngrx <feature> --facade
```
> Note this will not generate facades for existing ngrx features; this option
is currently only available for *new* ngrx scaffolding.
* Add code generators for `<feature>.facade.ts` + `<feature>.facade.spec.ts`
Fixes#629. Fixes#638.
use entity
The ngrx schematic templates have some minor lint errors that manfiest in new ngrx generated code.
* In the ngrx e2e tests, add check for tsLint errors in the generated code
* Fix lint issues for the upgrade-module and associated tests.
@nrwl/schematics no longer uses the @ngrx/schematics to generate NgRx feature files.
* `ngrx/files/__directory__` templates are used
* Templates replicate the simple outputs generated from @ngrx/schematics:feature
* Templates add significant Nx enhancements.
The following standard files will be scaffolded:
* `<feature>.actions.ts`
* `<feature>.effects.ts` + `<feature>.effects.spec.ts`
* `<feature>.reducer.ts` + `<feature>.reducer.spec.ts`
The following new files will also be scaffolded:
* `<feature>.selectors.ts` + `<feature>.selectors.spec.ts`
Changes include:
* Change the action/enums to generate a trio of enums for each *feature*: `Load<Feature>`, `<Feature>Loaded`, and `<Feature>LoadError`
* Add code generators for `<feature>.selectors.ts`
* Add code generators for unit and integration testing `*.spec.ts` files
* Update the public barrel [`index.ts`] when adding ngrx to a library
* Use `StoreModule.forFeature()` when adding ngrx feature (without using the `--root` option)
* Use the Effect to respond tp `load<Feature>$` and dispatch `<Feature>Loaded` or `<Feature>LoadError`
* Update the Action to export `<feature>Actions` map of all action classes
* fix `ng-add.test.ts` tests for latest Angular CLI scaffolding
* fix `application.spec.ts` expect fails
Fixes#472, Fixes#618, Fixes#317, Fixes#561, Refs #380.
This PR introduces the yargs package as our CLI command handler.
We build up commands using yargs to take advantage of its built
in --help flag formatter.
* ngrx collection now extends @ngrx/schematics
* modify the nrwl `ngrx` schematic to use `@ngrx/schematics` to generate the initial source for actions, reducers, and effects
* modify the generated source to conform to Nx standards
* generate init and interface files
* remove template files for action, effect, and reducer scaffolding
* modify collection to extend `@ngrx/schematics` so the ngrx commands are also easily accessible
* inject dataloaded enums into action class
* configure nx workspace devDep on @ngrx/schematics version
* override ngrx effects.spec.ts with nx templated version
fixes#174.