Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: lower screenshot count expectation (#10945)

Yury Semikhatskyce225e50f46b
diff --git a/tests/tracing.spec.ts b/tests/tracing.spec.ts
index ec23c1c224..6058e3eefe 100644
--- a/tests/tracing.spec.ts
+++ b/tests/tracing.spec.ts
@@ -150,7 +150,7 @@ test('should not include trace resources from the provious chunks', async ({ con
const { resources } = await parseTrace(testInfo.outputPath('trace1.zip'));
const names = Array.from(resources.keys());
expect(names.filter(n => n.endsWith('.html')).length).toBe(1);
- expect(names.filter(n => n.endsWith('.jpeg')).length).toBeGreaterThan(1);
+ expect(names.filter(n => n.endsWith('.jpeg')).length).toBeGreaterThan(0);
// 1 source file for the test.
expect(names.filter(n => n.endsWith('.txt')).length).toBe(1);
}
@@ -177,7 +177,7 @@ test('should overwrite existing file', async ({ context, page, server }, testInf
const { resources } = await parseTrace(path);
const names = Array.from(resources.keys());
expect(names.filter(n => n.endsWith('.html')).length).toBe(1);
- expect(names.filter(n => n.endsWith('.jpeg')).length).toBeGreaterThan(1);
+ expect(names.filter(n => n.endsWith('.jpeg')).length).toBeGreaterThan(0);
}
await context.tracing.start({ screenshots: true, snapshots: true, sources: true });