Skip to content

✅ Add E2E tests for embedded config scenarios#4242

Draft
mormubis wants to merge 1 commit intoadlrb/ssi-endpoint-pkgfrom
adlrb/ssi-e2e
Draft

✅ Add E2E tests for embedded config scenarios#4242
mormubis wants to merge 1 commit intoadlrb/ssi-endpoint-pkgfrom
adlrb/ssi-e2e

Conversation

@mormubis
Copy link
Contributor

Motivation

Validate that the full embedded config pipeline works end-to-end: generate a bundle with @datadog/browser-sdk-endpoint, serve it via the test server, and verify the SDK initializes correctly with the embedded configuration.

Changes

New E2E scenarios (15 tests total)

embeddedConfig.scenario.ts (8 tests):

  • SDK loads with embedded config (rum and rum-slim variants)
  • No remote config network requests during page load (config is pre-embedded)
  • Bundle metadata verified (applicationId, configId)

embeddedConfigDynamic.scenario.ts (7 tests):

  • Dynamic value markers ($cookie:name, $dom:selector, $js:path) preserved in bundle
  • Mixed static/dynamic values work correctly
  • Nested dynamic values in configuration objects

Framework additions

  • createTest.ts, pageSetups.ts, mock.ts — support for serving pre-generated bundles in E2E tests

Disabled

  • remoteConfiguration.scenario.ts.disabled (superseded by new package approach)

Testing

yarn test:e2e -g "embedded configuration"
yarn typecheck

Part of SSI Phase 6 stacked PRs. Stacks on: ✨ @datadog/browser-sdk-endpoint (#4241). Next: rum-core removal (breaking).

Adds 15 E2E tests proving the embedded config approach works end-to-end:

### embeddedConfig.scenario.ts (8 tests)
- SDK loads with embedded config (rum variant)
- SDK loads with embedded config (rum-slim variant)
- No remote config requests made during page load
- Bundle metadata verification (applicationId, configId in bundle)
- Config values applied to SDK initialization

### embeddedConfigDynamic.scenario.ts (7 tests)
- Dynamic value markers preserved in bundle (cookie, DOM selector, JS path)
- Mixed static/dynamic values work correctly
- Nested dynamic values in configuration objects

Also disables remoteConfiguration.scenario.ts (superseded by the new package approach).
@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 25, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 172.22 KiB 172.22 KiB 0 B 0.00%
Rum Profiler 4.71 KiB 4.71 KiB 0 B 0.00%
Rum Recorder 24.88 KiB 24.88 KiB 0 B 0.00%
Logs 56.30 KiB 56.30 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 128.00 KiB 128.00 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0047 0.0045 -4.26%
RUM - add action 0.0147 0.0134 -8.84%
RUM - add error 0.015 0.0148 -1.33%
RUM - add timing 0.0028 0.0025 -10.71%
RUM - start view 0.0135 0.0138 +2.22%
RUM - start/stop session replay recording 0.0007 0.0006 -14.29%
Logs - log message 0.0237 0.0155 -34.60%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 26.79 KiB 27.09 KiB +301 B
RUM - add action 108.59 KiB 108.77 KiB +178 B
RUM - add timing 25.98 KiB 26.22 KiB +242 B
RUM - add error 117.13 KiB 118.93 KiB +1.80 KiB
RUM - start/stop session replay recording 26.30 KiB 25.55 KiB -764 B
RUM - start view 506.68 KiB 511.27 KiB +4.60 KiB
Logs - log message 45.10 KiB 44.38 KiB -737 B

🔗 RealWorld

@datadog-datadog-prod-us1-2
Copy link

datadog-datadog-prod-us1-2 bot commented Feb 25, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.16% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ee71250 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

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