Skip to content

test(e2e): Add e2e coverage for Next.js 15.3 - #5308

Open
thomas-lebeau wants to merge 2 commits into
mainfrom
thomas.lebeau/RUM-20310-nextjs-15-e2e
Open

thomas-lebeau wants to merge 2 commits into
mainfrom
thomas.lebeau/RUM-20310-nextjs-15-e2e

Conversation

@thomas-lebeau

@thomas-lebeau thomas-lebeau commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

RUM-20310: the only Next.js e2e app, test/apps/nextjs, runs Next 16. This PR also runs the Next.js plugin e2e scenarios against Next.js 15.3, the first version with the documented instrumentation-client.js and onRouterTransitionStart setup.

Next 14 and older (the next >=13.0.0 peer range, and the support policy's latest major plus the two before it) are left for later. Those versions need an init workaround, and App Router view URLs can't be tracked correctly there. The peer dependency is unchanged in this PR.

Changes

  • packages/browser-rum-nextjs: add a next-15-3 devDependency alias (npm:next@15.3.9). This is the same alias pattern as #5273 and #5305.
  • renovate.json: disable major and minor updates for next-15-3, so it stays on 15.3 and still gets patches.
  • scripts/build/build-test-apps.ts: new nextjs-v15-app builder. It copies test/apps/nextjs and takes next from the alias. The app code needs no changes.
    • The builder deletes the copied .next folder. It holds symlinks to node_modules packages, and fs.cpSync makes them absolute, so they still point into the base app. next build followed them while cleaning .next and emptied the base app's node_modules/@datadog/browser-rum-nextjs.
  • e2e: add a nextjs v15 app web server (NEXTJS_V15_APP_PORT) and a withNextjsApp(router, nextjsVersion = 'v16') argument. Every nextjsPlugin.scenario.ts test runs for both v16 and v15, including the nextjs-v15 integration check in configuration telemetry. The v16 test names now include v16.
  • .gitlab-ci.yml: raise the default job memory to 8Gi. On the previous runs of this PR, yarn install was killed for running out of memory at 6Gi.

Test instructions

yarn build
yarn build:apps
yarn test:e2e test/e2e/scenario/plugins/nextjsPlugin.scenario.ts

Locally (chromium) this gives 36 passed: 18 tests for v16 and 18 for v15.

This change has no UI, so there are no screenshots.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

Refs: RUM-20310

@thomas-lebeau
thomas-lebeau requested a review from a team as a code owner November 20, 2026 14:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T13:17:53.722503Z a5c3f38 New commits
🔒 Security Review ✅ Completed 2026-11-23T13:21:47.838159Z a5c3f38 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum Salesforce 194.06 KiB 194.06 KiB 0 B 0.00% ✅
Rum 194.04 KiB 194.04 KiB 0 B 0.00% ✅
Rum Salesforce Profiler 8.01 KiB 8.01 KiB 0 B 0.00% ✅
Rum Profiler 8.01 KiB 8.01 KiB 0 B 0.00% ✅
Rum Salesforce Recorder 32.80 KiB 32.80 KiB 0 B 0.00% ✅
Rum Recorder 32.80 KiB 32.80 KiB 0 B 0.00% ✅
Logs 60.25 KiB 60.25 KiB 0 B 0.00% ✅
Rum Slim 149.86 KiB 149.86 KiB 0 B 0.00% ✅
Worker 24.23 KiB 24.23 KiB 0 B 0.00% ✅
Rum Shopify 225.58 KiB 225.58 KiB 0 B 0.00% ✅
Rum Shopify Profiler 8.00 KiB 8.00 KiB 0 B 0.00% ✅
Rum Shopify Recorder 4.85 KiB 4.85 KiB 0 B 0.00% ✅

@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 77.89% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a5c3f38 | Docs | View more details | Give us feedback!

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The generated Next.js 15.3 app, server configuration, and versioned scenarios are consistently wired together. Static review identified no actionable defects; build and end-to-end execution remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 8b64b09

@thomas-lebeau
thomas-lebeau force-pushed the thomas.lebeau/RUM-20310-nextjs-15-e2e branch from 8b64b09 to 58a2da7 Compare November 20, 2026 15:37
@thomas-lebeau thomas-lebeau changed the title ✅ [RUM-20310] Add e2e coverage for Next.js 15.3, the oldest supported version ✅ [RUM-20310] Add e2e coverage for Next.js 13, the oldest supported version Nov 20, 2026

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The reviewed revision adds Next.js 13 coverage through a legacy initialization path, whereas the PR description targets 15.3. The static reviewer reported no actionable defects; browser execution remains unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 58a2da7

@thomas-lebeau
thomas-lebeau force-pushed the thomas.lebeau/RUM-20310-nextjs-15-e2e branch from 9e0b870 to 94a9c20 Compare November 20, 2026 19:03

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The static review found no actionable issue in fixture generation, server wiring, or scenario expansion. The documented Next.js 13 App Router URL exclusions remain scoped to that version; build and browser execution remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 94a9c20

@thomas-lebeau
thomas-lebeau force-pushed the thomas.lebeau/RUM-20310-nextjs-15-e2e branch from 8169bf6 to c85d0e9 Compare November 23, 2026 11:46
@thomas-lebeau thomas-lebeau changed the title ✅ [RUM-20310] Add e2e coverage for Next.js 13, the oldest supported version ✅ [RUM-20310] Add e2e coverage for Next.js 15.3 Nov 23, 2026

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The supplied head adds coverage for Next.js 15.3, despite the PR description referring to Next.js 13. The static review identified no actionable defects in the generated-app builder, server configuration, or scenario wiring.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit c85d0e9

@thomas-lebeau
thomas-lebeau force-pushed the thomas.lebeau/RUM-20310-nextjs-15-e2e branch from c85d0e9 to 743663f Compare November 23, 2026 12:49

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The static reviewer found no actionable defects: the v15 scenarios select the separate Next.js 15.3 app and expect version-specific configuration telemetry. Build and e2e execution remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 743663f

Run the Next.js plugin e2e scenarios against a nextjs-v15-app generated from
test/apps/nextjs, pinned to the next-15-3 alias kept in browser-rum-nextjs.
@thomas-lebeau
thomas-lebeau force-pushed the thomas.lebeau/RUM-20310-nextjs-15-e2e branch from 9ba12cd to a5c3f38 Compare November 23, 2026 13:16

@datadog-datadog-us1-prod datadog-datadog-us1-prod Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The v15 scenarios select the generated Next.js 15.3 server and assert version-specific integration telemetry, consistent with the intended coverage. Builds and browser execution remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit a5c3f38

@thomas-lebeau thomas-lebeau changed the title ✅ [RUM-20310] Add e2e coverage for Next.js 15.3 test(e2e): Add e2e coverage for Next.js 15.3 Nov 24, 2026

This branch has not been deployed

No deployments
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.

1 participant