Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

resetContext should accept options for new context #212

@creage

Description

@creage

Is your feature request related to a problem? Please describe.
In our tests we need to run a page using different users, and we used to reset context, and set new HTTP credentials. But recent version of Playwright warns that

warning: method |context.setHTTPCredentials()| is deprecated. Instead of changing credentials, create another browser context with new credentials.

Describe the solution you'd like
jestPlaywright.resetContext() creates new context already, but with context options defined in its initial config. It would be nice if this method can accept additional context options, and merge them with initial options.

Describe alternatives you've considered
We are already using custom Playwright environment, and we can just overwrite resetContext method with our custom implementation, but we believe this feature would give value to entire community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions