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] snapshot updating causes failures for all tries except the last #9760

Closed
abierbaum opened this issue Oct 25, 2021 · 0 comments · Fixed by #9799
Closed

[BUG] snapshot updating causes failures for all tries except the last #9760

abierbaum opened this issue Oct 25, 2021 · 0 comments · Fixed by #9799
Assignees

Comments

@abierbaum
Copy link

Context:

  • Playwright Version: 16.1
  • Operating System: Linux
  • Node.js version: 14
  • Browser: Chromium

Reproduction

Configure playwright to have 2 or more retries. Then run any tests that use screenshot snapshots. Run playwright using --update-snapshots flag. Notice that the first N-1 runs will have failures even though you have marked to update the snapshots. It will only update and pass the last try.

Describe the bug

I think this PR broke the normal behavior of snapshot updating on the CLI using --update-snapshots. (#9246)

I think the desired logic is something more like:

testInfo.config.updateSnapshots ? true :  testInfo.retry < testInfo.project.retries ? 'none' : testInfo.config.updateSnapshots,

Basically some type of logic to detect the case when the user has explicitly said to update the snapshots and thus we should do that instead of 'none' for all the tries.

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

Successfully merging a pull request may close this issue.

2 participants