Skip to content

[Bug]: --update-snapshots parse from CLI seems broken #36297

Closed
@ogonkov

Description

@ogonkov

Version

1.52.0

Steps to reproduce

run

playwright test --project=chromium --workers=8 --retries=2 --update-snapshots tests/test.e2e.ts:23

Expected behavior

Only selected tests running

Actual behavior

All tests started

Additional context

If i move flag --update-snapshots between two other, like

- playwright test --project=chromium --workers=8 --retries=2 --update-snapshots tests/test.e2e.ts:23
+ playwright test --project=chromium --workers=8 --update-snapshots --retries=2 tests/test.e2e.ts:23

or add explicitly set some value to it, like

- playwright test --project=chromium --workers=8 --retries=2 --update-snapshots tests/test.e2e.ts:23
+ playwright test --project=chromium --workers=8 --retries=2 --update-snapshots=all tests/test.e2e.ts:23

Then only selected tests running.

Looks like that in problematic case tests list is interpreted like value for --update-snapshots, so there is also flag value validation missing.

Environment

System:
    OS: macOS 15.3.1
    CPU: (12) arm64 Apple M3 Pro
    Memory: 662.17 MB / 36.00 GB
  Binaries:
    Node: 20.18.2 - ~/.nvm/versions/node/v20.18.2/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.18.2/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions