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

E2E tests failing for fresh generated plugin #3933

Closed
sebastiandg7 opened this issue Oct 17, 2020 · 2 comments · Fixed by #3934
Closed

E2E tests failing for fresh generated plugin #3933

sebastiandg7 opened this issue Oct 17, 2020 · 2 comments · Fixed by #3934

Comments

@sebastiandg7
Copy link
Contributor

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

$ npx create-nx-plugin my-org --pluginName my-plugin
$ cd my-org
$ yarn e2e my-plugin-e2e

Failure Logs

Expand to see logs
➜ 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
➜ 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
@sebastiandg7
Copy link
Contributor Author

Opening PR with this fix

@sebastiandg7 sebastiandg7 changed the title e2e tests failing for fresh generated plugin E2E tests failing for fresh generated plugin Oct 17, 2020
vsavkin pushed a commit that referenced this issue Oct 29, 2020
replace the property name version with the plain version of the plugin name in the plugins e2e tests
in order to coincide with the generated schematic name

ISSUES CLOSED: #3933
vsavkin pushed a commit that referenced this issue Oct 29, 2020
replace the property name version with the plain version of the plugin name in the plugins e2e
tests
in order to coincide with the generated schematic name
ISSUES CLOSED: #3933

ISSUES CLOSED: #3933
Doginal pushed a commit to Doginal/nx that referenced this issue Nov 25, 2020
replace the property name version with the plain version of the plugin name in the plugins e2e tests
in order to coincide with the generated schematic name

ISSUES CLOSED: nrwl#3933
Doginal pushed a commit to Doginal/nx that referenced this issue Nov 25, 2020
replace the property name version with the plain version of the plugin name in the plugins e2e
tests
in order to coincide with the generated schematic name
ISSUES CLOSED: nrwl#3933

ISSUES CLOSED: nrwl#3933
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants