Skip to content

[Feature]: Enable configuration of updateSnapshots in test scope and UI Mode #37007

Closed

Description

🚀 Feature Request

Enable ad-hoc configuration of updateSnapshots in the following contexts:

  1. In the scope of a test, e.g. via test.use()
  2. When running tests in UI mode, via the settings

Example

test("snapshot test", async () => {
  test.use({
    updateSnapshots: "changed"
  });
  // test using snapshots
});

Motivation

updateSnapshots can currently either be enabled by passing --update-snapshots to the Playwright CLI or by configuration in the playwright.config.ts. These alternatives are harder to utilize in an ad-hoc fashion when developing tests in the IDE or running them in UI Mode. Providing options to dynamically configure updateSnapshots would provide more flexibility during development and could help to simplify updating snapshots.

Activity

  1. pavelfeldman commented on Aug 14, 2025

    @pavelfeldman
    Member

    There is a mode selector for that in the Playwright VS Code extension. Are you using it?

  2. foxable commented on Aug 15, 2025

    @foxable
    Author

    Which mode selector do you mean exactly? I couldn't find one in the VS Code extension. However, I'm mostly using IntelliJ IDEA while developing. But I also have developers using VS Code in my team. When running multiple tests or analyzing errors, I prefer to use the UI Mode though, which has the advantage of being independent of the used IDE.

  3. pavelfeldman commented on Aug 15, 2025

    @pavelfeldman
    Member

    We can add it in the UI mode

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions