-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[cypress] test:e2e doesn't run in headless mode if project uses cli-plugin-typescript #2903
Comments
@sodatea This is another issue that the webpack preprocessor introduces And as far as I understand it, we only added it to support aliases (that was the feature request mentioned in the commit, at least). So I think we should consider dropping this thing if that's the only real selling point (or go in deep and figure out how to make this work reliably) People who want to use it can add those 2-3 lines themselves, we could even keep them in the cypress config file commented out, with a hint to install the preprocessor package to make it work. But right now, this preprocessor seems to cause more problems than it adds value |
@LinusBorg 👍 do you want me to submit a PR that removes the |
I'd like to get @sodatea's view on this first. If he's on the same page, you can submit a PR, sure. |
@LinusBorg Yeah I think so. There are so many bug in the webpack preprocessor that I think we'd better make it opt in. @cexbrayat Go ahead please. (Note: the lines in IMO commenting them out could be a semver minor now that they only present in the generator folder. Any thoughts on this? |
Removes the `@cypress/webpack-preprocessor` from the generated cypress configuration, as it leads to several issues regarding file watching, headless mode and TS support. Note that the dependency is still there, so any user needng it back just have to uncomment the lines in the generated config. Fixes vuejs#2903
Hm, not sure. Existing projects that currently have this preprocessor configured would have their builds fail after updating the cypress package, since fresh We could keep the dependency so existing projects don't break, and remove it in the next major? Or we take the position that removing this dependency is necessary to fix some serious bugs, and that solving the problem this change creates for existing projects ( IMHO it's not easy to decide what's a semver breaking change for a project like vue-cli |
Removes the `@cypress/webpack-preprocessor` from the generated cypress configuration, as it leads to several issues regarding file watching, headless mode and TS support. Fixes vuejs#2903
@sodatea @LinusBorg Ok done in #2904 I kept the dependency for now. This is my first contribution to vue-cli but I contribute quite often to Angular CLI and this would be a breaking change to remove the dep, and would only be done in the next major (they have a 6 months cycle per major release). Let me know how the PR can be improved (I also added a test for cypress and TS). |
Actually this dependency is injected into vue-cli/packages/@vue/cli-plugin-e2e-cypress/generator/index.js Lines 7 to 10 in 662b1d3
|
@sodatea 👌 I'm going to remove the dependency in the PR then. |
Removes the `@cypress/webpack-preprocessor` from the generated cypress configuration, as it leads to several issues regarding file watching, headless mode and TS support. Fixes vuejs#2903
Correct if I'm wrong, but isn't the preprocessor essentially required for every test file that has to be transpiled in some way to work in a browser, regardless of Personally, I've had way less issues with that preprocessor when using a very minimal |
@DorianGrey |
This doc entry mentions that:
So |
@DorianGrey Considering there're so many issues caused by this plugin, we don't have the capacity to fix all the upstream issues or to maintain a separate config for cypress in parallel at the moment, I think it's better to make this plugin opt-in. |
Note that we're talking about a really small
(Had a small testing setup for this, which only has some problems with linting left: DorianGrey/vue-ts-playground#12) Yet - I understand that it causes more problems than it solves, esp. since its directy dependencies are using fixed version, which may conflict with |
@DorianGrey Would you mind opening a new issue as a feature request with these suggestions? We will soon close this issue here once the fix is merged/published. So we should track the improvement of typescript support for Cypress in a feature issue. |
Sure - #2913. |
* test: add cypress test for TS * fix: remove webpack-preprocessor from cypress config Removes the `@cypress/webpack-preprocessor` from the generated cypress configuration, as it leads to several issues regarding file watching, headless mode and TS support. Fixes #2903
How can I run headless cypress with typescript? |
@sava-vidakovic I have the same Issue do you have the config ? |
Version
3.1.1
Reproduction link
https://github.com/cexbrayat/vue-cypress-e2e-issue
Node and OS info
Node 8.11, npm 6.4, macOS 10.14
Steps to reproduce
What is expected?
When running
npm run test:e2e -- --headless
, the test should complete.What is actually happening?
The task hangs and never runs the test nor fails or completes.
It logs:
And hangs there indefinitely.
Note that it works well if not in headless mode.
The project uses
cli-plugin-typescript
. The e2e tests run fine if not in headless mode.If TypeScript is not used, the e2e tests are fine in headless mode or not.
Workaround
Commenting:
in
tests/e2e/plugins/index.js
fixes the issue.The task then run fine in headless mode as well.
Might be related to #2783 but in this case I never have a complete run not even the first one.
The text was updated successfully, but these errors were encountered: