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

[7.0.0] Doesn't display list of specs in Cypress Component Test Runner #15842

Closed
taninnazar opened this issue Apr 7, 2021 · 21 comments · Fixed by #15889
Closed

[7.0.0] Doesn't display list of specs in Cypress Component Test Runner #15842

taninnazar opened this issue Apr 7, 2021 · 21 comments · Fixed by #15889
Assignees

Comments

@taninnazar
Copy link

taninnazar commented Apr 7, 2021

Hello Cypress team,

I have a problem with displaying spec files in new Cypress Component Test Runner even if I use this example of component testing - https://github.com/lmiller1990/cypress-react-template
Also there is an error in terminal after yarn cypress open-ct started

Current behavior

Screenshot_2
Screenshot_1
Screenshot_3

Desired behavior

Should display spec files in new Cypress Component Test Runner and should not be an error in terminal

Test code to reproduce

https://github.com/lmiller1990/cypress-react-template

Versions

Cypress version - 7.0.0,
Browser Chrome Version - 89.0.4389.114
Operating System - windows10
Node version - v15.13.0

@taninnazar
Copy link
Author

Windows related issue because on Mac it's working as expected

@agg23
Copy link
Contributor

agg23 commented Apr 7, 2021

Looks like it's an issue with lazy-compile-webpack-plugin setting up Webpack paths on Windows liximomo/lazy-compile-webpack-plugin#12. We're currently investigating a fix.

@elevatebart
Copy link
Contributor

I investigated the problem a little here on windows.

I feel the problem might very well be on these lines.

https://github.com/liximomo/lazy-compile-webpack-plugin/blob/addca4335403ac41e66649a29974da5669988ff6/lib/loaders/module-loader.js#L46-L51

and these lines

https://github.com/liximomo/lazy-compile-webpack-plugin/blob/addca4335403ac41e66649a29974da5669988ff6/lib/loaders/entry-loader.js#L11-L12

I will suggest the author of the plugin to replace this with a JSON.strigify() like so

// modified from https://matthewrayfield.com/articles/animating-urls-with-javascript-and-emojis
var api = require(${JSON.stringify(`!!${apiPath}`)}');
var stopAnimation = api.startAnimation();
var compilation = api.compile(${JSON.stringify(ips)}, '${activationUrl}');
${hmr ? hmrCode : refreshCode}

@lmiller1990
Copy link
Contributor

This will be fixed in our next release (next week) in #15889

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 10, 2021

The code for this is done in cypress-io/cypress#15889, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@taninnazar
Copy link
Author

taninnazar commented Apr 13, 2021

Hello @elevatebart , @lmiller1990 , @agg23
Did you guys try to run component tests on Windows OS after you released 7.1.0 ? I'm facing pretty much the same issue as described above. The only thing - in 7.1.0 I can see my spec files in new Cypress Component Test Runner. But tests still are not running!
Cypress_open
Cypress_open2

@lmiller1990
Copy link
Contributor

cc @elevatebart, this was tested on windows. Any ideas what might be causing this?
@taninnazar do you see lazy-compile-webpack-plugin in node_modules/@cypress?

@taninnazar
Copy link
Author

taninnazar commented Apr 13, 2021

I've removed node_modules totally and then install everything again together with cypress 7.1.0
lazy-compile-webpack-plugin is only in dependencies for @cypress/webpack-dev-server
Screenshot_1

@agg23
Copy link
Contributor

agg23 commented Apr 13, 2021

It appears that @cypress/webpack-dev-server did not in fact release with 7.1. This is the package that contains the necessary fix, which is why you're still seeing this issue.

@taninnazar
Copy link
Author

Could you, please, fix that?

@agg23
Copy link
Contributor

agg23 commented Apr 13, 2021

@cypress/webpack-dev-server@1.1.3 has now been released. This should resolve the issue. We apologize for the delay.

@timfisher
Copy link

Can confirm @cypress/webpack-dev-server@1.1.3 fixes this. Cypress run-ct seems to be broken on windows for me though and it times out

@elevatebart
Copy link
Contributor

@timfisher What version of cypress are you using?
Know that every version of CT before 7.1.0 is busted on windows.
I am checking 7.1.0 that should fix it.

@elevatebart
Copy link
Contributor

I checked and 7.1.0 does work on my windows.
Can you install 7.1.0 and try again please ?

Can't wait to have you making tests with it.

@elevatebart
Copy link
Contributor

Oh... it is hanging forever...

@elevatebart
Copy link
Contributor

If you can clear webpack's cache (delete your node_modules directory if necessary), it works on my side.

Sorry for the SPAM.
Hope this helps.

@taninnazar
Copy link
Author

Hello @elevatebart , @lmiller1990 , @agg23
That's not funny...
With all the latests changes I can see spec files and can run them in Cypress Component Test Runner (but with issues - at least I see that fonts are not applying in the tests). But if you will try to run tests with npx cypress run-ct command you will see that tests are not running at all(
Could you, please, test your tool more carefully for Windows OS ?
Screenshot_2

I will create new bugs for that issues

@timfisher
Copy link

@elevatebart Hey, using 7.10 gets the same issue as @taninnazar with npx cypress run-ct and the updated @cypress/webpack-dev-server@1.1.3 (deleted node_modules first) seems he is making an issue so will check there :) thanks for making this tool though it's great :) sure it will be working on Windows fine soon! Don't forget @taninnazar it's an Alpha release so bound to be bugs on things like Windows :)

@lmiller1990
Copy link
Contributor

We opened this on windows and it was 👌 on our end, I wonder what's going on here. There is also CI running against windows machines, but evidently something is different here.

Can you try running DEBUG=* yarn cypress run-ct and pasting the entire output here (not screenshot - there should be a LOT of debug logs). That will give lots of information about what Cypress is doing in the background, and why browser isn't about to start up. Seems like this is a different issue - the browser cannot be started remotely.

@taninnazar
Copy link
Author

@lmiller1990 added here - #15976

@jennifer-shehane
Copy link
Member

The fix for this has been released.

This comment thread has been locked. If you are still experiencing this issue after upgrading, please open a new issue.

@cypress-io cypress-io locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants