-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtypes.ts
109 lines (98 loc) · 2.16 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import type { Region } from '@saucelabs/testcomposer';
export interface RunnerConfig {
// NOTE: Kind is serialized by saucectl with a capital 'K' ¯\_(ツ)_/¯
Kind: 'playwright';
sauce: {
region?: Region;
metadata?: {
build?: string;
tags?: string[];
};
};
suites: Suite[];
playwright: {
configFile?: string;
version: string;
};
// WARN: The following properties are set dynamically by the runner and are not
// deserialized from the runner config json. They should technically be marked
// as optional, but the runners treat them as required so type them as such.
assetsDir: string;
junitFile: string;
sauceReportFile: string;
preExecTimeout: number;
path: string;
projectPath: string;
playwrightOutputFolder: string;
suite: Suite;
args: Record<string, unknown>;
artifacts: Artifacts;
}
export interface Suite {
name: string;
param: SuiteConfig;
testMatch: string[] | string;
platformName: string;
env?: Record<string, string>;
preExec: string[];
testIgnore?: string[];
timeout?: number;
}
export interface SuiteConfig {
browserName?: string;
headless?: boolean;
project?: string;
globalTimeout?: number;
timeout?: number;
browser: string;
headed?: boolean;
headful?: boolean;
}
export interface CucumberRunnerConfig {
Kind: 'playwright-cucumberjs';
sauce: {
metadata?: {
build?: string;
tags?: string[];
};
region?: Region;
};
playwright: {
configFile?: string;
version: string;
};
suite: CucumberSuite;
assetsDir: string;
sauceReportFile: string;
path: string;
preExecTimeout: number;
projectPath: string;
artifacts?: Artifacts;
}
export interface CucumberSuite {
browserName?: string;
browserOptions?: string;
name: string;
env: Record<string, string>;
preExec: string[];
param: {
browserName: string;
};
options: {
config?: string;
name?: string;
backtrace?: boolean;
require?: string[];
import?: string[];
tags?: string[];
format?: string[];
parallel?: number;
paths: string[];
};
timeout?: number;
}
export interface Artifacts {
retain?: {
[key: string]: string;
};
}