@applitools/spec-driver-playwright 1.3.13 → 1.3.15
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/CHANGELOG.md +20 -0
- package/dist/spec-driver.js +8 -1
- package/package.json +13 -21
- package/types/index.d.ts +2 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.3.15](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-playwright@1.3.14...js/spec-driver-playwright@1.3.15) (2023-06-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/driver bumped from 1.12.2 to 1.12.3
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [1.3.14](https://github.com/applitools/eyes.sdk.javascript1/compare/js/spec-driver-playwright-v1.3.13...js/spec-driver-playwright@1.3.14) (2023-06-13)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Dependencies
|
|
15
|
+
|
|
16
|
+
* update some dependencies
|
|
17
|
+
* The following workspace dependencies were updated
|
|
18
|
+
* dependencies
|
|
19
|
+
* @applitools/driver bumped from 1.12.1 to 1.12.2
|
|
20
|
+
* @applitools/utils bumped from 1.3.37 to 1.4.0
|
package/dist/spec-driver.js
CHANGED
|
@@ -226,7 +226,14 @@ const browserNames = {
|
|
|
226
226
|
* installed in the SDK, then this function will error.
|
|
227
227
|
*/
|
|
228
228
|
async function build(env) {
|
|
229
|
-
|
|
229
|
+
let frameworkPath;
|
|
230
|
+
try {
|
|
231
|
+
frameworkPath = require.resolve('playwright', { paths: [`${process.cwd()}/node_modules`] });
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
frameworkPath = 'playwright';
|
|
235
|
+
}
|
|
236
|
+
const playwright = require(frameworkPath);
|
|
230
237
|
const parseEnv = require('@applitools/test-utils/src/parse-env');
|
|
231
238
|
const { browser, device, url, attach, proxy, args = [], headless, extension } = parseEnv(env, 'cdp');
|
|
232
239
|
const launcher = playwright[browserNames[browser] || browser];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/spec-driver-playwright",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"playwright",
|
|
6
6
|
"chrome devtools protocol",
|
|
@@ -25,9 +25,6 @@
|
|
|
25
25
|
"name": "Applitools Team",
|
|
26
26
|
"email": "team@applitools.com"
|
|
27
27
|
},
|
|
28
|
-
"aliases": [
|
|
29
|
-
"spec-playwright"
|
|
30
|
-
],
|
|
31
28
|
"main": "./dist/index.js",
|
|
32
29
|
"types": "./types/index.d.ts",
|
|
33
30
|
"files": [
|
|
@@ -35,35 +32,30 @@
|
|
|
35
32
|
"types"
|
|
36
33
|
],
|
|
37
34
|
"scripts": {
|
|
38
|
-
"lint": "
|
|
39
|
-
"build": "
|
|
40
|
-
"test": "
|
|
41
|
-
"test:sanity": "yarn test",
|
|
35
|
+
"lint": "run --top-level eslint '**/*.ts'",
|
|
36
|
+
"build": "run --top-level tspc --project ./tsconfig.build.json",
|
|
37
|
+
"test": "run --top-level mocha './test/**/*.spec.ts' --exit",
|
|
42
38
|
"setup": "yarn playwright:setup",
|
|
43
39
|
"playwright:setup": "sudo npx playwright install-deps",
|
|
44
|
-
"
|
|
45
|
-
"deps": "bongo deps",
|
|
46
|
-
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='spec-playwright' -f links='types utils test-utils'",
|
|
47
|
-
"gh:publish": "gh workflow run publish-spec-playwright.yml --ref $(git rev-parse --abbrev-ref HEAD)",
|
|
48
|
-
"preversion": "bongo preversion",
|
|
49
|
-
"version": "bongo version",
|
|
50
|
-
"postversion": "bongo postversion"
|
|
40
|
+
"up:framework": "run --top-level add-silent playwright"
|
|
51
41
|
},
|
|
52
42
|
"dependencies": {
|
|
53
|
-
"@applitools/driver": "1.12.
|
|
54
|
-
"@applitools/utils": "1.
|
|
43
|
+
"@applitools/driver": "1.12.3",
|
|
44
|
+
"@applitools/utils": "1.4.0"
|
|
55
45
|
},
|
|
56
46
|
"devDependencies": {
|
|
57
47
|
"@applitools/api-extractor": "^1.2.21",
|
|
58
|
-
"@applitools/
|
|
59
|
-
"@applitools/test-utils": "1.5.17",
|
|
48
|
+
"@applitools/test-utils": "^1.5.17",
|
|
60
49
|
"@types/node": "^12.20.55",
|
|
61
|
-
"playwright": "^1.
|
|
50
|
+
"playwright": "^1.34.3"
|
|
62
51
|
},
|
|
63
52
|
"peerDependencies": {
|
|
64
53
|
"playwright": ">=1.0.0"
|
|
65
54
|
},
|
|
66
55
|
"engines": {
|
|
67
56
|
"node": ">=12.13.0"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
68
60
|
}
|
|
69
|
-
}
|
|
61
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export function executeScript(frame: Context, script: string | ((arg: any) => an
|
|
|
12
12
|
export function mainContext(frame: Context): Promise<Context>;
|
|
13
13
|
export function parentContext(frame: Context): Promise<Context>;
|
|
14
14
|
export function childContext(_frame: Context, element: Element<Node>): Promise<Context>;
|
|
15
|
-
export function findElement(frame: Context, selector: Selector, parent?: undefined | Element<Node>): Promise<null | Element<
|
|
16
|
-
export function findElements(frame: Context, selector: Selector, parent?: undefined | Element<Node>): Promise<Array<Element<
|
|
15
|
+
export function findElement(frame: Context, selector: Selector, parent?: undefined | Element<Node>): Promise<null | Element<SVGElement | HTMLElement>>;
|
|
16
|
+
export function findElements(frame: Context, selector: Selector, parent?: undefined | Element<Node>): Promise<Array<Element<SVGElement | HTMLElement>>>;
|
|
17
17
|
export function setElementText(frame: Context, element: Selector | Element<Node>, text: string): Promise<void>;
|
|
18
18
|
export function getViewportSize(page: Driver): Promise<{ width: number; height: number; }>;
|
|
19
19
|
export function setViewportSize(page: Driver, size: { width: number; height: number; }): Promise<void>;
|