-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Playwright tests do not work on Github CI #31513
Comments
I tried to reproduce the bug and it only failed for mobile tests. I fixed it by adding
in the media query of the "Home.modules.css" file (line 116) |
@oliverpaulsen I confess that I am ashamed. I've been working with CSS for years and I haven't thought about that detail. Thank you very much! |
@etc-tiago how did you resolved it? how to make it work in GitHub action? |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
12.0.4
What version of Node.js are you using?
14.x
What browser are you using?
Chrome Headless
What operating system are you using?
Ubuntu 18/20
How are you deploying your application?
Vercel
Describe the Bug
I did several tests this week and couldn't find the reason why nextjs doesn't work with headless on CI.
The test code can be found at https://github.com/etc-tiago/demo-nextjs-playwright-github-workflow
The start code is https://github.com/vercel/next.js/tree/canary/examples/with-playwright
Among the attempts are:
next dev
command to start and test with playwrightnext build
andnext start
and then start playwright.next build
command and startnext start
within playwright's web server settings.Apparently there's something with react's hooks. Because the clicks on the button that use the next/router and switch of states are not working. Clicks on links work normally.
I did other tests using create-react-app, to validate if it's something related to react or nextjs, and the tests worked.
Expected Behavior
Tests pass when executing actions using hooks, such as useRouter (next/router) during tests with playwright
To Reproduce
The test code can be found at https://github.com/etc-tiago/demo-nextjs-playwright-github-workflow
The text was updated successfully, but these errors were encountered: