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: support Next.JS version 14 #29558

Merged
merged 4 commits into from
May 29, 2024
Merged

feat: support Next.JS version 14 #29558

merged 4 commits into from
May 29, 2024

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented May 22, 2024

Additional details

Adds CT support for Next.JS version 14. The main code change here is to make the CLI not complain when a user has Next.JS 14 installed since the support of wds 5 in #29306 and fixing resolution with moduleResolution: "bundler" in #28709 otherwise make Next.JS 14 work OOTB.

In addition, a lot of our tests have been updated to at least use the last two versions of Next.JS (13 & 14) to make sure compatibility works, including a Next.JS 14 test with tailwind and default typescript configuration to make sure CT testing works out of the box. Other tests have also been additionally updated.

Steps to test

How has the user experience changed?

Users of Next.JS Component Testing will no longer see the support banner warning in the app.

PR Tasks

@AtofStryker
Copy link
Contributor Author

NOTE: this does not resolve #29552

@AtofStryker AtofStryker changed the title feat: support Next.JS version 14 [run ci] feat: support Next.JS version 14 May 22, 2024
Copy link

cypress bot commented May 22, 2024

7 failed and 1 flaky tests on run #55592 ↗︎

7 286 7 22 Flakiness 1

Details:

Update cli/CHANGELOG.md
Project: cypress Commit: 5d14066d7a
Status: Failed Duration: 13:17 💡
Started: May 29, 2024 7:07 PM Ended: May 29, 2024 7:20 PM
Failed  cypress\e2e\specs.cy.ts • 7 failed tests • app-e2e

View Output

Test Artifacts
... > shows create first spec page with scaffold and create template spec options Test Replay Screenshots
... > scaffold starter spec > should generate starter spec for a TS project Test Replay Screenshots
... > shows No Specs page with specPattern from config Test Replay Screenshots
... > scaffold example files > should create example files on an empty project Test Replay Screenshots
... > shows Create new spec card Test Replay Screenshots
... > shows No Specs page with specPattern from config Test Replay Screenshots
App: Specs > Spec Watcher > updates spec list when files are added to/removed from areas matching specPattern Test Replay Screenshots
Failed  cypress\e2e\runner\runner.ui.cy.ts • 0 failed tests • app-e2e

View Output

Test Artifacts
Failed  cypress\e2e\runner\sessions.ui.cy.ts • 0 failed tests • app-e2e

View Output

Test Artifacts
Failed  cypress\e2e\specs_list_e2e.cy.ts • 0 failed tests • app-e2e

View Output

Test Artifacts
Failed  cypress\e2e\top-nav.cy.ts • 0 failed tests • app-e2e

View Output

Test Artifacts

The first 5 failed specs are shown, see all 54 specs in Cypress Cloud.

Flakiness  cypress\e2e\project-setup.cy.ts • 1 flaky test • launchpad-e2e

View Output

Test Artifacts
... > can reconfigure config after CT has been set up Test Replay Screenshots

Review all test suite changes for PR #29558 ↗︎

@AtofStryker AtofStryker marked this pull request as ready for review May 23, 2024 14:12
module.exports = {
component: {
experimentalSingleTabRunMode: true,
devServer: {},
devServer: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this was just missed previously when we added next support

@@ -2408,7 +2408,7 @@ Your configFile threw an error from: cypress-webpack.config.ts
We stopped running your tests because your config file crashed.

CypressWebpackDevServerError: Incompatible major versions of webpack and webpack-dev-server!
webpack-dev-server major version 5 only works with major versions of webpack 4 - saw webpack-dev-server version 5.0.4.
webpack-dev-server major version 5 only works with major versions of webpack 5 - saw webpack-dev-server version 5.0.4.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

noticed this error was wrong so fixed it here

cli/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mschile mschile left a comment

Choose a reason for hiding this comment

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

Looks good! Added a couple comments.

AtofStryker and others added 2 commits May 29, 2024 11:02
Co-authored-by: Matt Schile <mschile@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
@AtofStryker AtofStryker merged commit cf6b29d into develop May 29, 2024
114 of 124 checks passed
@AtofStryker AtofStryker deleted the feat/support_next_14 branch May 29, 2024 19:28
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 4, 2024

Released in 13.11.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 4, 2024
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.

Add support of Next.JS 14
3 participants