mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
Iterate
This commit is contained in:
parent
a6f851bbdf
commit
78bc53ef0a
@ -70,8 +70,7 @@ export const expect = baseExpect.extend<Expectations>({
|
||||
testInfo.annotations.push({
|
||||
// `_` prefix hides it from the HTML reporter
|
||||
type: "_screenshot",
|
||||
// include a path relative to `playwright/snapshots/`
|
||||
description: testInfo.snapshotPath(screenshotName).split("/playwright/snapshots/", 2)[1],
|
||||
description: testInfo.snapshotPath(screenshotName),
|
||||
});
|
||||
|
||||
return { pass: true, message: (): string => "", name: "toMatchScreenshot" };
|
||||
|
||||
@ -12,6 +12,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { glob } from "glob";
|
||||
import path from "node:path";
|
||||
import { type Reporter, type TestCase } from "@playwright/test/reporter";
|
||||
import { type FullConfig } from "@playwright/test";
|
||||
|
||||
@ -58,7 +59,7 @@ class StaleScreenshotReporter implements Reporter {
|
||||
for (const snapshotRoot of this.snapshotRoots) {
|
||||
const files = await glob(`**/*.png`, { cwd: snapshotRoot });
|
||||
for (const file of files) {
|
||||
screenshotFiles.add(file);
|
||||
screenshotFiles.add(path.join(snapshotRoot, file));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user