@tramvai/test-pw 5.50.0 → 5.53.74
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 +2 -0
- package/lib/router.d.ts +1 -0
- package/lib/router.es.js +6 -0
- package/lib/router.js +6 -0
- package/lib/wrapper.d.ts +1 -0
- package/package.json +6 -6
package/lib/launch.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare const initPlaywright: (serverUrl: string, { enableLogging, ...opt
|
|
|
25
25
|
passphrase?: string | undefined;
|
|
26
26
|
}[] | undefined;
|
|
27
27
|
colorScheme?: "light" | "dark" | "no-preference" | null | undefined;
|
|
28
|
+
contrast?: "no-preference" | "more" | null | undefined;
|
|
28
29
|
deviceScaleFactor?: number | undefined;
|
|
29
30
|
extraHTTPHeaders?: {
|
|
30
31
|
[key: string]: string;
|
|
@@ -112,6 +113,7 @@ export declare const initPlaywright: (serverUrl: string, { enableLogging, ...opt
|
|
|
112
113
|
waitForUrl: (url: string) => Promise<import("playwright-core").JSHandle<boolean>>;
|
|
113
114
|
router: {
|
|
114
115
|
navigate: (options: string | import("@tinkoff/router").NavigateOptions) => Promise<any>;
|
|
116
|
+
back: (to: number) => Promise<any>;
|
|
115
117
|
navigateThenWaitForReload: (options: string | import("@tinkoff/router").NavigateOptions) => Promise<[void, import("playwright-core").Response | null]>;
|
|
116
118
|
updateCurrentRoute: (options: import("@tinkoff/router").BaseNavigateOptions) => Promise<any>;
|
|
117
119
|
getCurrentRoute: () => Promise<any>;
|
package/lib/router.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ type NavigateOptions = Parameters<PageService['navigate']>[0];
|
|
|
5
5
|
type UpdateCurrentRouteOptions = Parameters<PageService['updateCurrentRoute']>[0];
|
|
6
6
|
export declare const wrapRouter: (page: Page) => {
|
|
7
7
|
navigate: (options: NavigateOptions) => Promise<any>;
|
|
8
|
+
back: (to: number) => Promise<any>;
|
|
8
9
|
navigateThenWaitForReload: (options: NavigateOptions) => Promise<[void, import("playwright-core").Response | null]>;
|
|
9
10
|
updateCurrentRoute: (options: UpdateCurrentRouteOptions) => Promise<any>;
|
|
10
11
|
getCurrentRoute: () => Promise<any>;
|
package/lib/router.es.js
CHANGED
|
@@ -29,8 +29,14 @@ const wrapRouter = (page) => {
|
|
|
29
29
|
return window.contextExternal.di.get('router pageService').getCurrentUrl();
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
+
const back = async (to) => {
|
|
33
|
+
return page.evaluate((backTo) => {
|
|
34
|
+
return window.contextExternal.di.get('router pageService').back(backTo);
|
|
35
|
+
}, to);
|
|
36
|
+
};
|
|
32
37
|
return {
|
|
33
38
|
navigate,
|
|
39
|
+
back,
|
|
34
40
|
navigateThenWaitForReload,
|
|
35
41
|
updateCurrentRoute,
|
|
36
42
|
getCurrentRoute,
|
package/lib/router.js
CHANGED
|
@@ -33,8 +33,14 @@ const wrapRouter = (page) => {
|
|
|
33
33
|
return window.contextExternal.di.get('router pageService').getCurrentUrl();
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
+
const back = async (to) => {
|
|
37
|
+
return page.evaluate((backTo) => {
|
|
38
|
+
return window.contextExternal.di.get('router pageService').back(backTo);
|
|
39
|
+
}, to);
|
|
40
|
+
};
|
|
36
41
|
return {
|
|
37
42
|
navigate,
|
|
43
|
+
back,
|
|
38
44
|
navigateThenWaitForReload,
|
|
39
45
|
updateCurrentRoute,
|
|
40
46
|
getCurrentRoute,
|
package/lib/wrapper.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare const wrapPlaywrightPage: (page: Page) => {
|
|
|
11
11
|
waitForUrl: (url: string) => Promise<import("playwright-core").JSHandle<boolean>>;
|
|
12
12
|
router: {
|
|
13
13
|
navigate: (options: string | import("@tinkoff/router").NavigateOptions) => Promise<any>;
|
|
14
|
+
back: (to: number) => Promise<any>;
|
|
14
15
|
navigateThenWaitForReload: (options: string | import("@tinkoff/router").NavigateOptions) => Promise<[void, import("playwright-core").Response | null]>;
|
|
15
16
|
updateCurrentRoute: (options: import("@tinkoff/router").BaseNavigateOptions) => Promise<any>;
|
|
16
17
|
getCurrentRoute: () => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/test-pw",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.53.74",
|
|
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": "5.
|
|
22
|
-
"@tramvai/tokens-router": "5.
|
|
21
|
+
"@tramvai/test-integration": "5.53.74",
|
|
22
|
+
"@tramvai/tokens-router": "5.53.74",
|
|
23
23
|
"console-with-style": "^1.1.0",
|
|
24
24
|
"env-ci": "^5.0.2",
|
|
25
25
|
"execa": "^5.1.1",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"playwright-core": "*"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@playwright/test": "1.
|
|
36
|
-
"@tramvai/cli": "5.
|
|
35
|
+
"@playwright/test": "1.54.1",
|
|
36
|
+
"@tramvai/cli": "5.53.74",
|
|
37
37
|
"@types/env-ci": "^3.1.0",
|
|
38
38
|
"@types/supports-color": "^8.1.1",
|
|
39
39
|
"@types/wait-on": "^5.2.0",
|
|
40
|
-
"playwright-core": "1.
|
|
40
|
+
"playwright-core": "1.54.1"
|
|
41
41
|
},
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"module": "lib/index.es.js"
|