Skip to content

fix: cross-browser test determinism and missing FetchTransport coverage#1430

Merged
joaquin-diaz merged 2 commits into
mainfrom
joaquin-diaz/fix/embrace-page-manager-tests
Jul 16, 2026
Merged

fix: cross-browser test determinism and missing FetchTransport coverage#1430
joaquin-diaz merged 2 commits into
mainfrom
joaquin-diaz/fix/embrace-page-manager-tests

Conversation

@joaquin-diaz

@joaquin-diaz joaquin-diaz commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What problem is this solving?

Two unrelated test gaps found while working in this area:

  1. EmbracePageManager.test.ts's soft-navigation zero-time tests were flaky on Firefox and WebKit:
    • FakeNavigation.fire() constructed a currententrychange Event and invoked listeners directly instead of dispatching it through a real EventTarget. Some engines only populate Event.timeStamp on actual dispatch, leaving it at 0 otherwise.
    • The "advances the SDK zero time on soft navigation" test compared getZeroTime() before/after with no time gap in between, which could land in the same rounded timestamp bucket under WebKit's coarser timer resolution.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
Chrome DevTools Protocol Tracing (Script: 113.03ms, Heap: 13.14MB)
Number of Requests Size of Requests Script Duration Task Duration Heap Used Size
Requests +13 requests +42.78 KB
Page Loaded +20.59 ms +21.69 ms +1.19 MB
Generate 100 fetch requests +20.29 ms +79.34 ms +1.64 MB
Generate 100 XHR requests +38.01 ms +95.27 ms +2.85 MB
Click 100 buttons and generate 100 logs +24.99 ms +48.18 ms +2.58 MB
Throw a 100 exceptions -0.25 ms +38.96 ms +2.66 MB
End Session +9.40 ms +35.15 ms +2.22 MB
Total +13 requests +42.78 KB +113.03 ms +318.60 ms +13.14 MB
Lighthouse (Script Eval: 128.13ms)
Difference Description
Total Blocking Time +3 ms Difference in Total Blocking Time: Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds. Learn more about the Total Blocking Time metric.
Main Thread Time +101.44 ms Difference in Main Thread Time: Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to minimize main-thread work
Script Evaluation Time +128.13 ms Difference in Script Evaluation Time: Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to reduce Javascript execution time.
Platform Tests (vite-7 es2015 gzip: 70.77KB)

vite-6 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-6 - es2015 +209.27 KB +70.83 KB

vite-7 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-7 - es2015 +209.27 KB +70.77 KB

webpack-5 Platform Tests

Total Uncompressed Size Total Gzip Size
webpack-5 - es2015 0 KB 0 KB

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.87%. Comparing base (49ebdb2) to head (316a3ed).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1430      +/-   ##
==========================================
+ Coverage   96.74%   96.87%   +0.12%     
==========================================
  Files         233      233              
  Lines       10183    10183              
  Branches     1437     1440       +3     
==========================================
+ Hits         9852     9865      +13     
+ Misses        329      316      -13     
  Partials        2        2              

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joaquin-diaz joaquin-diaz changed the title fix: make EmbracePageManager soft-navigation tests deterministic across browsers fix: cross-browser test determinism and missing FetchTransport coverage Jul 16, 2026
@joaquin-diaz
joaquin-diaz merged commit 8f40c5c into main Jul 16, 2026
20 checks passed
@joaquin-diaz
joaquin-diaz deleted the joaquin-diaz/fix/embrace-page-manager-tests branch July 16, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants