Skip to content

[Bug]: UI test runner - multiple api calls are added to the network tab after the test execution by using a new request context on test.beforeAll #34404

@dbarrientostk

Description

@dbarrientostk

Version

1.49.1

Steps to reproduce

  1. clone this repo: https://github.com/dbarrientostk/api-issue
  2. npm install
  3. npx playwright test --ui
  4. Run the test
  5. You should see the duplicate calls on the network tab.
    Image
Screen.Recording.2025-01-20.at.3.25.39.PM.mov

Expected behavior

I expect so see only one api call to the specific endpoint.

Actual behavior

Duplicate api calls appear after the test ran.

Additional context

No response

Environment

System:
    OS: macOS 15.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 2.18 GB / 32.00 GB
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.49.1 => 1.49.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions