Skip to content

Conversation

@AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Nov 14, 2025

Additional details

Adds component testing support for Next.js 16 (still needs tests). Based on the feedback in #32857, the underlying webpack implementation has changed slightly, where as an init() function no longer exists but invokes what we need on require().

Screenshot 2025-11-14 at 3 04 11 PM

Steps to test

How has the user experience changed?

PR Tasks


Note

Adds Next.js 16 support for component testing (via webpack) with updates to webpack integration, scaffolding/detection, tests, CI filters, and changelog.

  • Features / Integration
    • Add Next.js 16 support in component testing using webpack.
    • Update nextHandler to handle Next 16’s compiled webpack loading (use semver, call init() only for <16) and make hasReactRoot check robust.
  • Tests / Fixtures
    • Add system-tests/projects/next-16-tsconfig-tailwind (React 19, Tailwind 4) and wire into CT e2e (next.cy.ts).
    • Adjust error assertions for Next 15/16 (code frame vs. message).
  • Scaffold / Detection
    • Allow Next ^16.0.0 in wizard dependencies; update detection specs; expand README supported matrix to "Next.js 14, 15, 16".
  • CI
    • Include feat/support_next_16 in CircleCI workflow filters and artifact persistence conditions.
  • Docs
    • Update CLI CHANGELOG.md (15.7.0) to announce Next 16 CT support and note Turbopack is not supported.

Written by Cursor Bugbot for commit 372cd17. This will update automatically on new commits. Configure here.

@AtofStryker AtofStryker self-assigned this Nov 14, 2025
@AtofStryker AtofStryker force-pushed the feat/support_next_16 branch 2 times, most recently from 8ce0a5d to cb3758a Compare November 14, 2025 20:57
@cypress
Copy link

cypress bot commented Nov 14, 2025

cypress    Run #67421

Run Properties:  status check failed Failed #67421  •  git commit 372cd17abd: Merge branch 'develop' into feat/support_next_16
Project cypress
Branch Review feat/support_next_16
Run status status check failed Failed #67421
Run duration 22m 14s
Commit git commit 372cd17abd: Merge branch 'develop' into feat/support_next_16
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 7
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 25
Tests that did not run due to a failure in a mocha hook  Skipped 15
Tests that passed  Passing 562
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  0%
  Untested elements 4  
  Tested elements 0  
Accessibility  100%
  Failed rules  0 critical   0 serious   0 moderate   0 minor
  Failed elements 0  

Tests for review

Failed  cypress\e2e\runner\retries.experimentalRetries.mochaEvents.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
... > does not try to serialize error with err.actual as DOM node Test Replay Screenshots
Failed  cypress\e2e\runner\runner.ui.cy.ts • 3 failed tests • app-e2e

View Output

Test Artifacts
src/cypress/runner > tests finish with correct state > no tests Test Replay Screenshots
src/cypress/runner > other specs > file with empty suites only displays no tests found Test Replay Screenshots
src/cypress/runner > reporter interaction > user can stop test execution Test Replay Screenshots
Failed  cypress\e2e\runner\ct-framework-errors.cy.ts • 2 failed tests • app-e2e

View Output

Test Artifacts
Angular 18 > error conditions Test Replay Screenshots
Angular 19 > error conditions Test Replay Screenshots
Failed  cypress\e2e\runner\cloud-debug-filter.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
cloud debug test filtering > filter is maintained across cross-domain reinitialization Test Replay Screenshots
Failed  cypress\e2e\cypress-in-cypress-run-mode.cy.ts • 0 failed tests • app-e2e

View Output

Test Artifacts

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

Flakiness  cypress\e2e\runner\runner.experimentalRetries.mochaEvents.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
... > hook failures > fail in [beforeEach] Test Replay Screenshots
Flakiness  cypress\e2e\studio\studio-new-tests.cy.ts • 1 flaky test • app-e2e

View Output

Test Artifacts
Cypress Studio - New Test Creation > creates a new test from an empty spec Test Replay Screenshots
Flakiness  cypress\e2e\cypress-origin-communicator.cy.ts • 2 flaky tests • app-e2e

View Output

Test Artifacts
Cypress In Cypress Origin Communicator > primary origin memory leak prevention > cleans up the primaryOriginCommunicator events when navigating away from the /specs to /runs Test Replay Screenshots
Cypress In Cypress Origin Communicator > primary origin memory leak prevention > cleans up the primaryOriginCommunicator events when navigating to run a different spec Test Replay Screenshots

@MikeMcC399
Copy link
Contributor

@AtofStryker AtofStryker changed the title feat (WIP): support Next.js 16 within component testing feat: support Next.js 16 within component testing Nov 18, 2025
@jennifer-shehane jennifer-shehane self-requested a review November 18, 2025 18:16
@AtofStryker AtofStryker merged commit 12f72f2 into develop Nov 19, 2025
125 of 132 checks passed
@AtofStryker AtofStryker deleted the feat/support_next_16 branch November 19, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Next.js 16 for Component Testing

4 participants