@tramvai/test-pw 4.24.1 → 4.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/launch.d.ts +85 -1
- package/lib/launch.es.js +2 -2
- package/lib/launch.js +2 -2
- package/package.json +4 -4
package/lib/launch.d.ts
CHANGED
|
@@ -9,7 +9,91 @@ type Options = PWOptions & {
|
|
|
9
9
|
*/
|
|
10
10
|
export declare const initPlaywright: (serverUrl: string, { enableLogging, ...options }?: Options) => Promise<{
|
|
11
11
|
browser: Browser;
|
|
12
|
-
getPageWrapper: (url?: string
|
|
12
|
+
getPageWrapper: (url?: string, pageOptions?: {
|
|
13
|
+
acceptDownloads?: boolean | undefined;
|
|
14
|
+
baseURL?: string | undefined;
|
|
15
|
+
bypassCSP?: boolean | undefined;
|
|
16
|
+
colorScheme?: "light" | "dark" | "no-preference" | null | undefined;
|
|
17
|
+
deviceScaleFactor?: number | undefined;
|
|
18
|
+
extraHTTPHeaders?: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
} | undefined;
|
|
21
|
+
forcedColors?: "none" | "active" | null | undefined;
|
|
22
|
+
geolocation?: {
|
|
23
|
+
latitude: number;
|
|
24
|
+
longitude: number;
|
|
25
|
+
accuracy?: number | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
hasTouch?: boolean | undefined;
|
|
28
|
+
httpCredentials?: {
|
|
29
|
+
username: string;
|
|
30
|
+
password: string;
|
|
31
|
+
} | undefined;
|
|
32
|
+
ignoreHTTPSErrors?: boolean | undefined;
|
|
33
|
+
isMobile?: boolean | undefined;
|
|
34
|
+
javaScriptEnabled?: boolean | undefined;
|
|
35
|
+
locale?: string | undefined;
|
|
36
|
+
logger?: import("playwright-core").Logger | undefined;
|
|
37
|
+
offline?: boolean | undefined;
|
|
38
|
+
permissions?: string[] | undefined;
|
|
39
|
+
proxy?: {
|
|
40
|
+
server: string;
|
|
41
|
+
bypass?: string | undefined;
|
|
42
|
+
username?: string | undefined;
|
|
43
|
+
password?: string | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
recordHar?: {
|
|
46
|
+
omitContent?: boolean | undefined;
|
|
47
|
+
content?: "omit" | "embed" | "attach" | undefined;
|
|
48
|
+
path: string;
|
|
49
|
+
mode?: "full" | "minimal" | undefined;
|
|
50
|
+
urlFilter?: string | RegExp | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
recordVideo?: {
|
|
53
|
+
dir: string;
|
|
54
|
+
size?: {
|
|
55
|
+
width: number;
|
|
56
|
+
height: number;
|
|
57
|
+
} | undefined;
|
|
58
|
+
} | undefined;
|
|
59
|
+
reducedMotion?: "reduce" | "no-preference" | null | undefined;
|
|
60
|
+
screen?: {
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
} | undefined;
|
|
64
|
+
serviceWorkers?: "allow" | "block" | undefined;
|
|
65
|
+
storageState?: string | {
|
|
66
|
+
cookies: {
|
|
67
|
+
name: string;
|
|
68
|
+
value: string;
|
|
69
|
+
domain: string;
|
|
70
|
+
path: string;
|
|
71
|
+
expires: number;
|
|
72
|
+
httpOnly: boolean;
|
|
73
|
+
secure: boolean;
|
|
74
|
+
sameSite: "Strict" | "Lax" | "None";
|
|
75
|
+
}[];
|
|
76
|
+
origins: {
|
|
77
|
+
origin: string;
|
|
78
|
+
localStorage: {
|
|
79
|
+
name: string;
|
|
80
|
+
value: string;
|
|
81
|
+
}[];
|
|
82
|
+
}[];
|
|
83
|
+
} | undefined;
|
|
84
|
+
strictSelectors?: boolean | undefined;
|
|
85
|
+
timezoneId?: string | undefined;
|
|
86
|
+
userAgent?: string | undefined;
|
|
87
|
+
videoSize?: {
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
} | undefined;
|
|
91
|
+
videosPath?: string | undefined;
|
|
92
|
+
viewport?: {
|
|
93
|
+
width: number;
|
|
94
|
+
height: number;
|
|
95
|
+
} | null | undefined;
|
|
96
|
+
} | undefined) => Promise<{
|
|
13
97
|
page: import("playwright-core").Page;
|
|
14
98
|
reset: (url?: string) => Promise<import("playwright-core").Response | null>;
|
|
15
99
|
waitForUrl: (url: string) => Promise<import("playwright-core").JSHandle<false> | import("playwright-core").JSHandle<true>>;
|
package/lib/launch.es.js
CHANGED
|
@@ -32,8 +32,8 @@ const initPlaywright = async (serverUrl, { enableLogging = true, ...options } =
|
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
34
|
browser,
|
|
35
|
-
getPageWrapper: async (url) => {
|
|
36
|
-
const page = await browser.newPage();
|
|
35
|
+
getPageWrapper: async (url, pageOptions) => {
|
|
36
|
+
const page = await browser.newPage(pageOptions);
|
|
37
37
|
await page.setDefaultNavigationTimeout(60000);
|
|
38
38
|
const wrapper = wrapPlaywrightPage(page);
|
|
39
39
|
if (url) {
|
package/lib/launch.js
CHANGED
|
@@ -36,8 +36,8 @@ const initPlaywright = async (serverUrl, { enableLogging = true, ...options } =
|
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
38
|
browser,
|
|
39
|
-
getPageWrapper: async (url) => {
|
|
40
|
-
const page = await browser.newPage();
|
|
39
|
+
getPageWrapper: async (url, pageOptions) => {
|
|
40
|
+
const page = await browser.newPage(pageOptions);
|
|
41
41
|
await page.setDefaultNavigationTimeout(60000);
|
|
42
42
|
const wrapper$1 = wrapper.wrapPlaywrightPage(page);
|
|
43
43
|
if (url) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-pw",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.26.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tinkoff/utils": "^2.1.2",
|
|
21
|
-
"@tramvai/test-integration": "4.
|
|
22
|
-
"@tramvai/tokens-router": "4.
|
|
21
|
+
"@tramvai/test-integration": "4.26.0",
|
|
22
|
+
"@tramvai/tokens-router": "4.26.0",
|
|
23
23
|
"console-with-style": "^1.1.0",
|
|
24
24
|
"supports-color": "8.1.1",
|
|
25
25
|
"env-ci": "^5.0.2",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/supports-color": "^8.1.1",
|
|
33
33
|
"@types/env-ci": "^3.1.0",
|
|
34
|
-
"@tramvai/cli": "4.
|
|
34
|
+
"@tramvai/cli": "4.26.0",
|
|
35
35
|
"@playwright/test": "1.29.0",
|
|
36
36
|
"playwright-core": "1.29.0"
|
|
37
37
|
},
|