intellij-cypress
intellij-cypress copied to clipboard
Allow adding '--component' flag in the additional parameters for running Cypress Component tests (base version)
Cypress does support component tests (currently in beta)
To run a component test, one has to add the --component
flag to the cypress run
command.
However, it seems like the plugin always adds the --e2e
flag by default.
Thus, adding --component
as a program argument results in the following error:
`--e2e` and `--component` cannot both be passed.
Either pass `--e2e` or `--component`, but not both.
Maybe there are further issues related to component tests.
Hi @manuelkroiss! Please make sure you have configured your spec to be run in the component mode in the cypress config file. The plugin should automatically add the correct flag to the command line depending on the spec pattern in the config. Please also make sure you have the 'automatic' mode selected in the 'Misc' tab of the run configuration.
Hi
I did, everything works fine running the tests without the plugin.
Here is my cypress.config.ts
export default defineConfig({
component: {
devServer: {
framework: "angular",
bundler: "webpack",
},
specPattern: "**/*.cy.ts"
}
});
Furthermore, I looked for the 'Misc' tab in the run config, but only found a 'General' and a 'Runner' tab. (I am using the newest WebStorm version)
I looked for the 'Misc' tab in the run config, but only found a 'General' and a 'Runner' tab
Ohh, that's really strange.
What version of the plugin do you use?
Can you share the screenshot of your configuration?
This is mine:
Well, I just realized you're probably talking about the base version of plugin, right?
You can try this bundle with the fix:
Cypress Support-1.5.1-EAP.zip
It will not add --e2e
parameter if you set --component
flag in the additional parameters
You were right, I was talking about the base version.
Your EAP version now works as expected. Thanks.
fixed in 1.5.1 version
Well, I just realized you're probably talking about the base version of plugin, right? You can try this bundle with the fix: Cypress Support-1.5.1-EAP.zip It will not add
--e2e
parameter if you set--component
flag in the additional parameters
I have the same issue, and I'm using the latest version 1.5.1. Unfortunately I can't find any additional parameters, this is what I get:
If I add --component
as a program argument, it doesn't recognize it and runs again with --e2e
argument.
I can't see anything as well on the Webstorm 2023.1, and Cypress Support 1.5.2