diff --git a/playwright/stale-screenshot-reporter.ts b/playwright/stale-screenshot-reporter.ts index 3e38f78ca9..dc934827c1 100644 --- a/playwright/stale-screenshot-reporter.ts +++ b/playwright/stale-screenshot-reporter.ts @@ -23,6 +23,7 @@ class StaleScreenshotReporter implements Reporter { private success = true; public onTestEnd(test: TestCase): void { + if (!test.ok()) return; for (const annotation of test.annotations) { if (annotation.type === "_screenshot") { this.screenshots.add(annotation.description);