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

fix: plugin file in angular schematics #17141

Merged
merged 1 commit into from
Jun 29, 2021

Conversation

cexbrayat
Copy link
Contributor

User facing changelog

Additional details

Running ng add @cypress/schematic --defaults --skip-confirmation in a new Angular 12 application results in a broken setup for cypress,
as the plugin file does not have any export.

When running ng e2e, Cypress complains with:

The plugins file is missing or invalid.

Your `pluginsFile` is set to `/Users/ced-pro/Code/angular/angular-cli-diff/ponyracer/cypress/plugins/index.js`, but either the file is missing, it contains a syntax error, or threw an error when required. The `pluginsFile` must be a `.js`, `.ts`, or `.coffee` file.

Or you might have renamed the extension of your `pluginsFile`. If that's the case, restart the test runner.

Please fix this, or set `pluginsFile` to `false` if a plugins file is not necessary for your project.

This commit reverts the changes to the plugin file made in 96a9db4
and fixes the issue.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 29, 2021

Thanks for taking the time to open a PR!

@cexbrayat
Copy link
Contributor Author

@admah This should fix the broken release 1.4.0. We used to have integration tests in the briebug schematics to avoid these kinds of regressions. Are they running here?

@admah admah changed the base branch from develop to master June 29, 2021 11:25
@admah admah requested a review from a team as a code owner June 29, 2021 11:25
@admah admah requested review from chrisbreiding and kuceb and removed request for a team, chrisbreiding and kuceb June 29, 2021 11:25
@admah admah changed the base branch from master to develop June 29, 2021 11:25
@admah
Copy link
Contributor

admah commented Jun 29, 2021

@cexbrayat thank you for reporting this and creating the PR. I definitely agree that we should have a test on the entire install process to avoid these types of issues in the future, and I will make sure that we have it in there.

For this PR, it looks like there are 2 outstanding issues before I can approve/merge:

  1. it's failing the linter (new line needed at the end of the plugins.ts file)
  2. the base branch for changes like this should be master

@admah admah self-requested a review June 29, 2021 11:56
@admah admah added the npm: @cypress/schematic @cypress/schematic package issues label Jun 29, 2021
Runnin g`ng add @cypress/schematic --defaults --skip-confirmation` in a new Angular 12 application results in a broken setup for cypress,
as the plugin file does not have any export.

When running `ng e2e`, Cypress complains with:

```
The plugins file is missing or invalid.

Your `pluginsFile` is set to `/Users/ced-pro/Code/angular/angular-cli-diff/ponyracer/cypress/plugins/index.js`, but either the file is missing, it contains a syntax error, or threw an error when required. The `pluginsFile` must be a `.js`, `.ts`, or `.coffee` file.

Or you might have renamed the extension of your `pluginsFile`. If that's the case, restart the test runner.

Please fix this, or set `pluginsFile` to `false` if a plugins file is not necessary for your project.
```

This commit reverts the changes to the plugin file made in 96a9db4
and fixes the issue.
@cexbrayat cexbrayat changed the base branch from develop to master June 29, 2021 12:12
@cexbrayat
Copy link
Contributor Author

@admah 👌

  • lint issue fixed
  • based branch switched to master

@admah admah merged commit 7b4d694 into cypress-io:master Jun 29, 2021
tgriesser added a commit that referenced this pull request Jun 29, 2021
* develop:
  fix: plugin file in angular schematics (#17141)
  chore(runner): render spec list inline (behind feature flag) (#17069)
  refactor: remove junk test (#17125)
  chore(server): collapse project-ct and project-e2e into project-base (#17115)
  chore: release @cypress/schematic-v1.4.0
tgriesser added a commit that referenced this pull request Jun 29, 2021
* develop:
  fix: plugin file referenced by cypress config in angular schematics (#17143)
  refactor: @packages/runner-shared should also be devDependencies (#17133)
  chore: release @cypress/schematic-v1.4.1
  fix: plugin file in angular schematics (#17141)
  chore(runner): render spec list inline (behind feature flag) (#17069)
  refactor: remove junk test (#17125)
  chore(server): collapse project-ct and project-e2e into project-base (#17115)
  chore: release @cypress/schematic-v1.4.0
tgriesser added a commit that referenced this pull request Jun 30, 2021
* develop:
  fix: prevent saved state errors for deprecated keys (#17093)
  fix(studio): restore intro modal styles (#17118)
  refactor: add @packages/resolve-dist to isolate client/server code (#17109)
  fix: plugin file referenced by cypress config in angular schematics (#17143)
  refactor: @packages/runner-shared should also be devDependencies (#17133)
  chore: release @cypress/schematic-v1.4.1
  fix: plugin file in angular schematics (#17141)
  chore(runner): render spec list inline (behind feature flag) (#17069)
  refactor: remove junk test (#17125)
  chore(server): collapse project-ct and project-e2e into project-base (#17115)
  fix: make dev-server error message appear only once when CT is not configured (#17090)
  chore: release @cypress/schematic-v1.4.0
  feat: add ng generate to @cypress/schematic to generate e2e spec files (#16962)
  feat(studio): add ability to copy commands to clipboard (#16912)
  chore: release @cypress/webpack-preprocessor-v5.9.1
  chore: release @cypress/webpack-batteries-included-preprocessor-v2.2.2
  chore: release @cypress/vue-v3.0.0-beta.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm: @cypress/schematic @cypress/schematic package issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants