forked from lost-pixel/lost-pixel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
44 lines (39 loc) · 918 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import z from 'zod';
import type { BrowserContextOptions } from 'playwright-core';
export const BrowserSchema = z.enum(['chromium', 'firefox', 'webkit']);
export const ShotModeSchema = z.enum([
'storybook',
'ladle',
'histoire',
'page',
'custom',
]);
export type ShotMode = z.infer<typeof ShotModeSchema>;
export type ShotItem = {
shotMode: ShotMode;
id: string;
shotName: string;
url: string;
filePathBaseline: string;
filePathCurrent: string;
filePathDifference: string;
browserConfig?: BrowserContextOptions;
threshold: number;
waitBeforeScreenshot?: number;
importPath?: string;
mask?: Array<{
selector: string;
}>;
viewport?: {
width: number;
height?: number;
};
breakpoint?: number;
breakpointGroup?: string;
elementLocator?: string;
waitForSelector?: string;
};
export type ExtendedShotItem = ShotItem & {
uniqueName: string;
hash: string;
};