mbolotov / intellij-cypress

IntelliJ-Cypress plugin: https://plugins.jetbrains.com/plugin/13819-intellij-cypress Pro version: https://plugins.jetbrains.com/plugin/13987-cypress-support-pro
MIT License
35 stars 5 forks source link

Intellij cypress plugin not running #7

Closed pcouas closed 4 years ago

pcouas commented 4 years ago

"C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npx-cli.js" cypress run --reporter D:/zpoubelle/pogues5/node_modules/cypress-intellij-reporter --spec D:/zpoubelle/pogues5/cypress/integration/examples/window.spec.js

Warning: We failed to trash the existing run results.

This error will not alter the exit code.

Error: Command failed: C:\Users\COUAS\AppData\Local\Cypress\Cache\4.5.0\Cypress\resources\app\packages\server\node_modules\trash\lib\win-trash.exe C:\zpoubelle\pogues5\cypress\screenshots\examples

at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

Can't run because no spec files were found.

We searched for any files matching this glob pattern:

D:\zpoubelle\pogues5\cypress\integration\examples\window.spec.js

Process finished with exit code 1

Regards

mbolotov commented 4 years ago

Hi @pcouas! Thanks for reporting this. Is that possible to provide a repo to reproduce the issue? I just have no clue what could be wrong reading the description. And have you run your case successfully from the command line?

pcouas commented 4 years ago

Hi I have tested succesfully from command line

npx cypress open --env EXTERNAL_API=localhost:3000 Cypress open browser window

mbolotov commented 4 years ago

can you run successfully it with just npx cypress run?

if EXTERNAL_API evn variable is required, you may set it the IDE's run configuration. if it can be run using 'open' cypress command only you can set in the run configuration as well by using 'interactive' mode selector

pcouas commented 4 years ago

Hi

 

Open command is running outside IntelliJ

Configuration contains environment variable,

But i have flagged repository no spec file ?

 

Regards

 

 

 

 

Message du 20/05/20 11:27 De : "Mikhail Bolotov" A : "mbolotov/intellij-cypress" Copie à : "pcouas" , "Mention" Objet : Re: [mbolotov/intellij-cypress] Intellij cypress plugin not running (#7)

can you run successfully it with just npx cypress run?

if EXTERNAL_API evn variable is required, you may set it the IDE's run configuration. if it can be run using 'open' cypress command only you can set in the run configuration as well by using 'interactive' mode selector

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-631357178", "url": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-631357178", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

mbolotov commented 4 years ago

could you please attach a screenshot of your run configuration in InteliJ? and what about running just npx cypress run from command line?

pcouas commented 4 years ago

Hi

 

Open command is running outside IntelliJ

Configuration contains environment variable,

But i have flagged repository no spec file ?

Error message is on spec file ?

 

 

 

Regards

 

 

 

 

Message du 20/05/20 11:27 De : "Mikhail Bolotov" A : "mbolotov/intellij-cypress" Copie à : "pcouas" , "Mention" Objet : Re: [mbolotov/intellij-cypress] Intellij cypress plugin not running (#7)

can you run successfully it with just npx cypress run?

if EXTERNAL_API evn variable is required, you may set it the IDE's run configuration. if it can be run using 'open' cypress command only you can set in the run configuration as well by using 'interactive' mode selector

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-631357178", "url": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-631357178", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

pcouas commented 4 years ago

 

 from command line, it's Ok

 

 

 

Message du 20/05/20 12:17 De : "Mikhail Bolotov" A : "mbolotov/intellij-cypress" Copie à : "pcouas" , "Mention" Objet : Re: [mbolotov/intellij-cypress] Intellij cypress plugin not running (#7)

could you please attach a screenshot of your run configuration in InteliJ? and what about running just npx cypress run from command line?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-631383793", "url": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-631383793", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

mbolotov commented 4 years ago

okay, in sum, I need a reproducible repo to debug the problem.

pcouas commented 4 years ago

Yes test project is on https://github.com/EmmanuelDemey/Pogues/tree/cypress cypress 4.4.1 on windows10 Pro intelliJ ultimate 2020

D:\zpoubelle\pogues>npm version { pogues: '0.0.2', npm: '6.14.5', ares: '1.16.0', brotli: '1.0.7', cldr: '36.0', http_parser: '2.9.3', icu: '65.1', llhttp: '2.0.4', modules: '72', napi: '5', nghttp2: '1.40.0', node: '12.16.3', openssl: '1.1.1g', tz: '2019c', unicode: '12.1', uv: '1.34.2', v8: '7.8.279.23-node.35', zlib: '1.2.11' }

mbolotov commented 4 years ago

I tried the repo (on the 'cypress' branch) It works okay on my side with one issue: Cypress expects a process environment variable to be set with the CYPRESS_ prefix. But currently the plugin does not add this prefix automatically. So at the moment the correct way to set the EXTERNAL_API variable either this way: image or directly via the cypress arguments: image

But anyway, I could not reproduce the error you mentioned: Can't run because no spec files were found

When no EXTERNAL_API set, I got the following:

CypressError: `cy.visit()` must be called with a `url` or an `options` object containing a `url` as its 1st argument

https://on.cypress.io/visit

Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Demo Cypress`

So you could try to set the env variable correctly but I'm not sure if this could help in fact.

mbolotov commented 4 years ago

Hey @pcouas, Are you still experiencing the issue? If yes, could you please attach a zip of your project?

mbolotov commented 4 years ago

closing as not reproducible @pcouas feel free to reopen if you can provide a project for reproducing the problem.

pcouas commented 4 years ago

Hi

 

it's not my project, it"s an webminar project

https://github.com/EmmanuelDemey/Pogues/tree/cypress

 

Regards

 

 

 

 

 

Message du 28/05/20 22:11 De : "Mikhail Bolotov" A : "mbolotov/intellij-cypress" Copie à : "pcouas" , "Mention" Objet : Re: [mbolotov/intellij-cypress] Intellij cypress plugin not running (#7)

Hey @pcouas, Are you still experiencing the issue? If yes, could you please attach a zip of your project?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-635575305", "url": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-635575305", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

mbolotov commented 4 years ago

Hi @pcouas! yes, I have already tried the repository you mentioned. It works nice for me. What I did:

  1. checkout
  2. npm install
  3. npm start
  4. in IDEA, create a run configuration via line marker provider: image
  5. add the environment variable in the config: image
  6. Run!

And finally get it passed: image

So I unable to reproduce you problem via the repository. Could you check you do the similar steps?

pcouas commented 4 years ago

Hi

 

Problem is resolved now, but on Windows i need to use cypress 4.4.1 not cypress 4.5.0 and not cypress 4.6.0

 

Regards

 

 

 

 

Message du 08/06/20 23:04 De : "Mikhail Bolotov" A : "mbolotov/intellij-cypress" Copie à : "pcouas" , "Mention" Objet : Re: [mbolotov/intellij-cypress] Intellij cypress plugin not running (#7)

Hi @pcouas! yes, I have already tried the repository you mentioned. It works nice form me. What I did:

checkout npm install npm start in IDEA, create a run configuration via line marker provider:

add the environment variable in the config:

Run!

And finally get it passed:

So I unable to reproduce you problem via the repository. Could you check you do the similar steps?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-640885804", "url": "https://github.com/mbolotov/intellij-cypress/issues/7#issuecomment-640885804", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]