Summary
- Adds a shared
waitForMetricRequest helper to browser integration test utils, following the same page.waitForRequest pattern as waitForErrorRequest, waitForTransactionRequest, etc.
- Refactors element timing tests to use
waitForMetricRequest instead of a custom createMetricCollector with polling-based waitForIdentifiers
- The new helper accumulates
SerializedMetric[] across envelope requests and resolves when the callback returns true for the full collected set
Test plan
🤖 Generated with Claude Code
Note
The pull request "ref(browser-tests): Add waitForMetricRequest helper" was created by @logaretm but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.
Summary
waitForMetricRequesthelper to browser integration test utils, following the samepage.waitForRequestpattern aswaitForErrorRequest,waitForTransactionRequest, etc.waitForMetricRequestinstead of a customcreateMetricCollectorwith polling-basedwaitForIdentifiersSerializedMetric[]across envelope requests and resolves when the callback returnstruefor the full collected setTest plan
--repeat-each=5— all 10 runs pass consistently🤖 Generated with Claude Code