@applitools/spec-driver-playwright 1.3.3 → 1.3.4
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/dist/spec-driver.js +6 -2
- package/package.json +8 -8
- package/types/index.d.ts +5 -5
package/dist/spec-driver.js
CHANGED
|
@@ -159,7 +159,7 @@ exports.setViewportSize = setViewportSize;
|
|
|
159
159
|
async function getCookies(page) {
|
|
160
160
|
const cookies = await page.context().cookies();
|
|
161
161
|
return cookies.map(cookie => {
|
|
162
|
-
const copy =
|
|
162
|
+
const copy = { ...cookie, expiry: cookie.expires };
|
|
163
163
|
delete copy.expires;
|
|
164
164
|
return copy;
|
|
165
165
|
});
|
|
@@ -248,7 +248,11 @@ async function build(env) {
|
|
|
248
248
|
}
|
|
249
249
|
let driver, context;
|
|
250
250
|
if (extension) {
|
|
251
|
-
context = await launcher.launchPersistentContext(fs.mkdtempSync(path.join(os.tmpdir(), 'chrome-user-data-dir')),
|
|
251
|
+
context = await launcher.launchPersistentContext(fs.mkdtempSync(path.join(os.tmpdir(), 'chrome-user-data-dir')), {
|
|
252
|
+
...options,
|
|
253
|
+
viewport: null,
|
|
254
|
+
...(device ? playwright.devices[device] : {}),
|
|
255
|
+
});
|
|
252
256
|
}
|
|
253
257
|
else {
|
|
254
258
|
if (url) {
|
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.4",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"playwright",
|
|
6
6
|
"chrome devtools protocol",
|
|
@@ -55,14 +55,14 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@applitools/
|
|
59
|
-
"@applitools/utils": "1.3.
|
|
58
|
+
"@applitools/driver": "1.11.0",
|
|
59
|
+
"@applitools/utils": "1.3.13"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@applitools/api-extractor": "^1.2.
|
|
63
|
-
"@applitools/bongo": "^2.
|
|
64
|
-
"@applitools/scripts": "1.
|
|
65
|
-
"@applitools/test-utils": "1.
|
|
62
|
+
"@applitools/api-extractor": "^1.2.11",
|
|
63
|
+
"@applitools/bongo": "^2.2.0",
|
|
64
|
+
"@applitools/scripts": "1.2.0",
|
|
65
|
+
"@applitools/test-utils": "1.5.2",
|
|
66
66
|
"@types/mocha": "^9.0.0",
|
|
67
67
|
"@types/node": "12",
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"prettier": "^2.6.2",
|
|
79
79
|
"ts-node": "^10.8.0",
|
|
80
80
|
"ttypescript": "^1.5.13",
|
|
81
|
-
"typescript": "^4.
|
|
81
|
+
"typescript": "^4.8.4"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"playwright": ">=1.0.0"
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import('@applitools/
|
|
1
|
+
declare const _default: import('@applitools/driver').SpecDriver<Driver, Context, Element, Selector>;
|
|
2
2
|
export default _default;
|
|
3
3
|
export function isDriver(page: any): page is Driver;
|
|
4
4
|
export function isContext(frame: any): frame is Context;
|
|
@@ -14,10 +14,10 @@ export function parentContext(frame: Context): Promise<Context>;
|
|
|
14
14
|
export function childContext(_frame: Context, element: Element): Promise<Context>;
|
|
15
15
|
export function findElement(frame: Context, selector: Selector, parent?: Element): Promise<Element>;
|
|
16
16
|
export function findElements(frame: Context, selector: Selector, parent?: Element): Promise<Array<Element>>;
|
|
17
|
-
export function getViewportSize(page: Driver): Promise<
|
|
18
|
-
export function setViewportSize(page: Driver, size:
|
|
19
|
-
export function getCookies(page: Driver): Promise<Array<import('@applitools/
|
|
20
|
-
export function getDriverInfo(_page: Driver): Promise<import('@applitools/
|
|
17
|
+
export function getViewportSize(page: Driver): Promise<{ width: number; height: number; }>;
|
|
18
|
+
export function setViewportSize(page: Driver, size: { width: number; height: number; }): Promise<void>;
|
|
19
|
+
export function getCookies(page: Driver): Promise<Array<import('@applitools/driver').Cookie>>;
|
|
20
|
+
export function getDriverInfo(_page: Driver): Promise<import('@applitools/driver').DriverInfo>;
|
|
21
21
|
export function getTitle(page: Driver): Promise<string>;
|
|
22
22
|
export function getUrl(page: Driver): Promise<string>;
|
|
23
23
|
export function visit(page: Driver, url: string): Promise<void>;
|