Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: playwright.config.ts - updateSnapshots: "missing" will always make the test fail, when there is no existing snapshot #31503

Open
radekcols opened this issue Jul 1, 2024 · 0 comments
Assignees
Labels

Comments

@radekcols
Copy link

Version

1.44.1

Steps to reproduce

  1. have some test with toHaveScreenshot() method
  2. delete the current snapshot (if there is any)
    3 . in playwright.config.ts file have updateSnapshots set to "missing"
  3. the test from point 1 will fail. the new snapshot will be created, though and next run will be successful

Expected behavior

new snapshot should be created and the test should pass

Actual behavior

the test will always fail.

Additional context

pls note, that if we set updateSnapshots to 'all', the new snapshot will be also created, but the test will pass.

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
    Memory: 6.79 GB / 15.79 GB
  Binaries:
    Node: 22.2.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    VSCode: 1.90.2 - C:\Users\borsky\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  npmPackages:
    @playwright/test: ^1.44.1 => 1.44.1
    playwright: ^1.39.0 => 1.44.1
@mxschmitt mxschmitt added the v1.46 label Jul 1, 2024
@mxschmitt mxschmitt self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants