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

feat: add support for next 13 #24396

Merged
merged 5 commits into from Nov 10, 2022
Merged

feat: add support for next 13 #24396

merged 5 commits into from Nov 10, 2022

Conversation

ZachJW34
Copy link
Contributor

@ZachJW34 ZachJW34 commented Oct 25, 2022

User facing changelog

Support Next.js v13

Additional details

Bring our current support for Next.js 11 + 12 to v13. No support for turbopack or React SC (yet).

Steps to test

  • Run npx create-next-app@latest my-app
  • cd into app and run npm i -D cypress
  • Check out this branch, run yarn && yarn cypress:open, choose my-app
  • Walk through setup
  • Add a test, I added pages/index.cy.tsx and run it
import Home from './index'

it('should render', () => {
  cy.mount(<Home />)
})

How has the user experience changed?

Screen.Recording.2022-10-26.at.4.51.29.PM.mov

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

@cypress-bot
Copy link

cypress-bot bot commented Oct 25, 2022

Thanks for taking the time to open a PR!

@Divlo
Copy link

Divlo commented Nov 7, 2022

Any way we can help? Is this can be prioritized?
Thanks! 😄

@ZachJW34
Copy link
Contributor Author

ZachJW34 commented Nov 7, 2022

The check for React 18 has been removed recently, need to verify if our internal check needs to stick around. Might need it to support 13.0.0 (no longer needed in 13.0.1)

@Divlo
Copy link

Divlo commented Nov 8, 2022

The check for React 18 has been removed recently, need to verify if our internal check needs to stick around. Might need it to support 13.0.0 (no longer needed in 13.0.1)

Awesome! I just tested, and indeed, I can confirm that updating Next.js (v13.0.2), works!

@ZachJW34 ZachJW34 marked this pull request as ready for review November 8, 2022 16:08
@cypress
Copy link

cypress bot commented Nov 8, 2022



Test summary

46471 1 4336 0Flakiness 20


Run details

Project cypress
Status Failed
Commit 4bf4bd1
Started Nov 10, 2022 3:20 PM
Ended Nov 10, 2022 3:38 PM
Duration 17:48 💡
OS Linux Debian -
Browser Multiple

View run in Cypress Dashboard ➡️


Failures

cypress/e2e/e2e/origin/commands/navigation.cy.ts Failed
1 cy.origin navigation > #consoleProps > .go()

Flakiness

scaffold-component-testing.cy.ts Flakiness
1 scaffolding component testing > vuecli4vue2 > scaffolds component testing for Vue CLI 4 w/ Vue 2 project
e2e/origin/cookie_behavior.cy.ts Flakiness
1 ... > same site / cross origin > XMLHttpRequest > sets cookie on same-site request if withCredentials is true, and attaches to same-site request if withCredentials is true
2 ... > same site / cross origin > fetch > sets same-site cookies if "include" credentials option is specified from request, but does not attach same-site cookies to request by default (same-origin)
3 ... > same site / cross origin > XMLHttpRequest > sets cookie on same-site request if withCredentials is true, and attaches to same-site request if withCredentials is true
4 ... > same site / cross origin > fetch > sets same-site cookies if "include" credentials option is specified from request, but does not attach same-site cookies to request by default (same-origin)
This comment includes only the first 5 flaky tests. See all 20 flaky tests in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@astone123
Copy link
Contributor

@ZachJW34 looks like everything was working fine with Next 13 except for the dependency version warning. So this PR is mainly just adding 13 in the versions list and adding a system test, right?

@ZachJW34
Copy link
Contributor Author

ZachJW34 commented Nov 8, 2022

@astone123 It wasn't working for Next.js v13.0.0, but v13.0.1 + didn't need any source code changes (other than the deps warning). Good to be safe, and the hasReactRoot property is something we missed for v12 so makes sense to keep in.

Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems fine, one comment/question - I think we need to get CI under control, it's getting slower and slower, any chance to reduce the amount of projects?

If not, all good, let's keep it in mind for other PRs.

npm/webpack-dev-server/cypress/e2e/next.cy.ts Outdated Show resolved Hide resolved
@ZachJW34 ZachJW34 merged commit cc4244d into develop Nov 10, 2022
77 of 82 checks passed
@ZachJW34 ZachJW34 deleted the zachw/next-13 branch November 10, 2022 15:46
@cypress-bot
Copy link

cypress-bot bot commented Nov 15, 2022

Released in 11.1.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 15, 2022
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 this pull request may close these issues.

None yet

4 participants