Skip to content

ref(browser-tests): Add waitForMetricRequest helper #20003

Description

@github-actions

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

  • 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

  • Ran element timing tests 5x with --repeat-each=5 — all 10 runs pass consistently

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

javascriptPull requests that update javascript code

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions