When a nx-plugin containing a dash in its name, 'my-plugin' as an example, is generated, the default e2e tests fail because the generated schematic follows the same name as the plugin ('my-plugin') but the e2e tests try to execute the schematic using the property name version of the plugin.
Expected Behavior
e2e test for generated plugins should succeed if no changes has been made after the plugin generation.
Expand to see logs
```bash
➜ yarn e2e my-plugin-e2e
yarn run v1.22.5
$ nx e2e my-plugin-e2e
> nx run my-plugin-e2e:e2e
Compiling TypeScript files for library my-plugin...
Done compiling TypeScript files for library my-plugin
Copying asset files...
Done copying asset files.
FAIL my-plugin-e2e e2e/my-plugin-e2e/tests/my-plugin.test.ts (107.537 s)
my-plugin e2e
✕ should create my-plugin (10370 ms)
--directory
✕ should create src in the specified directory (24248 ms)
--tags
✕ should add tags to nx.json (72214 ms)
● my-plugin e2e › should create my-plugin
Command failed: yarn nx generate @my-org/my-plugin:myPlugin my-plugin3196994
Schematic "myPlugin" not found in collection "@my-org/my-plugin".
error Command failed with exit code 1.
● my-plugin e2e › --directory › should create src in the specified directory
Command failed: yarn nx generate @my-org/my-plugin:myPlugin my-plugin9725238 --directory subdir
Schematic "myPlugin" not found in collection "@my-org/my-plugin".
error Command failed with exit code 1.
● my-plugin e2e › --tags › should add tags to nx.json
Command failed: yarn nx generate @my-org/my-plugin:myPlugin my-plugin5442574 --tags e2etag,e2ePackage
Schematic "myPlugin" not found in collection "@my-org/my-plugin".
error Command failed with exit code 1.
Test Suites: 1 failed, 1 total
Tests: 3 failed, 3 total
Snapshots: 0 total
Time: 107.909 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
Environment
`nx report` output
```bash
➜ nx report
> NX Report complete - copy this into the issue template
nx : Not Found
@nrwl/angular : Not Found
@nrwl/cli : 10.3.1
@nrwl/cypress : Not Found
@nrwl/eslint-plugin-nx : 10.3.1
@nrwl/express : Not Found
@nrwl/jest : 10.3.1
@nrwl/linter : 10.3.1
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 10.3.1
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 10.3.1
@nrwl/web : Not Found
@nrwl/workspace : 10.3.1
typescript : 4.0.3
```
Current Behavior
When a nx-plugin containing a dash in its name, 'my-plugin' as an example, is generated, the default e2e tests fail because the generated schematic follows the same name as the plugin ('my-plugin') but the e2e tests try to execute the schematic using the property name version of the plugin.
Expected Behavior
e2e test for generated plugins should succeed if no changes has been made after the plugin generation.
Steps to Reproduce
Failure Logs
Expand to see logs
```bash ➜ yarn e2e my-plugin-e2e yarn run v1.22.5 $ nx e2e my-plugin-e2e > nx run my-plugin-e2e:e2e Compiling TypeScript files for library my-plugin... Done compiling TypeScript files for library my-plugin Copying asset files... Done copying asset files. FAIL my-plugin-e2e e2e/my-plugin-e2e/tests/my-plugin.test.ts (107.537 s) my-plugin e2e ✕ should create my-plugin (10370 ms) --directory ✕ should create src in the specified directory (24248 ms) --tags ✕ should add tags to nx.json (72214 ms) ● my-plugin e2e › should create my-plugin Command failed: yarn nx generate @my-org/my-plugin:myPlugin my-plugin3196994 Schematic "myPlugin" not found in collection "@my-org/my-plugin". error Command failed with exit code 1. ● my-plugin e2e › --directory › should create src in the specified directory Command failed: yarn nx generate @my-org/my-plugin:myPlugin my-plugin9725238 --directory subdir Schematic "myPlugin" not found in collection "@my-org/my-plugin". error Command failed with exit code 1. ● my-plugin e2e › --tags › should add tags to nx.json Command failed: yarn nx generate @my-org/my-plugin:myPlugin my-plugin5442574 --tags e2etag,e2ePackage Schematic "myPlugin" not found in collection "@my-org/my-plugin". error Command failed with exit code 1. Test Suites: 1 failed, 1 total Tests: 3 failed, 3 total Snapshots: 0 total Time: 107.909 s Ran all test suites. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```Environment
`nx report` output
```bash ➜ nx report > NX Report complete - copy this into the issue template nx : Not Found @nrwl/angular : Not Found @nrwl/cli : 10.3.1 @nrwl/cypress : Not Found @nrwl/eslint-plugin-nx : 10.3.1 @nrwl/express : Not Found @nrwl/jest : 10.3.1 @nrwl/linter : 10.3.1 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : 10.3.1 @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 10.3.1 @nrwl/web : Not Found @nrwl/workspace : 10.3.1 typescript : 4.0.3 ```