test: roll test runner 0.9.16 (#3998)
65
package-lock.json
generated
|
|
@ -1187,22 +1187,22 @@
|
|||
}
|
||||
},
|
||||
"@playwright/test": {
|
||||
"version": "0.9.6",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-0.9.6.tgz",
|
||||
"integrity": "sha512-T3mHVXIKRBfKmd7cTxlB8WmPtqvz5q/1yBTYcDQHUv51vfaP4xciK1bg0N1VJTjqzQ9ytBp1CTwgOgrA4or29w==",
|
||||
"version": "0.9.7",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-0.9.7.tgz",
|
||||
"integrity": "sha512-llqV967KlRZ5mWNm0DpEkqi/42UBIssM/JzZ83KbTQdbmGhmx8L4hcJ6c1ExeFe/qq5uvL0mae1yuKfqxPBrPg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"jpeg-js": "^0.4.2",
|
||||
"pixelmatch": "^5.2.1",
|
||||
"playwright": "^1.3.0",
|
||||
"playwright": "1.4.0-next.1601161680085",
|
||||
"pngjs": "^5.0.0",
|
||||
"rimraf": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"@playwright/test-runner": {
|
||||
"version": "0.9.15",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.9.15.tgz",
|
||||
"integrity": "sha512-1ilbB+ZDDmr4GnT/7omtGUTthcdAOLvMSOqqUd11OhNOo0IgYn3T6Iu8lwO+gdWYyALwyzk5OKIHldRV33ULXw==",
|
||||
"version": "0.9.16",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.9.16.tgz",
|
||||
"integrity": "sha512-dbuF01oydF3uV6K24LnFpy6CIRULIjZK4YainHPgpmjDBpU5/BukTdW6xcJDHPSj4hbs9ycIDHvz6YCS5pMxew==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
|
|
@ -2029,16 +2029,6 @@
|
|||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
||||
|
|
@ -3003,9 +2993,9 @@
|
|||
}
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.573",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.573.tgz",
|
||||
"integrity": "sha512-oypaNmexr8w0m2GX67fGLQ0Xgsd7uXz7GcwaHZ9eW3ZdQ8uA2+V/wXmLdMTk3gcacbqQGAN7CXWG3fOkfKYftw==",
|
||||
"version": "1.3.575",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.575.tgz",
|
||||
"integrity": "sha512-031VrjcilnE8bXivDGhEeuGjMZrjTAeyAKm3XWPY9SvGYE6Hn8003gCqoNszFu6lh1v0gDx5hrM0VE1cPSMUkQ==",
|
||||
"dev": true
|
||||
},
|
||||
"elliptic": {
|
||||
|
|
@ -3211,9 +3201,9 @@
|
|||
}
|
||||
},
|
||||
"eslint": {
|
||||
"version": "7.9.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz",
|
||||
"integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==",
|
||||
"version": "7.10.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.10.0.tgz",
|
||||
"integrity": "sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
|
|
@ -3224,7 +3214,7 @@
|
|||
"debug": "^4.0.1",
|
||||
"doctrine": "^3.0.0",
|
||||
"enquirer": "^2.3.5",
|
||||
"eslint-scope": "^5.1.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"eslint-utils": "^2.1.0",
|
||||
"eslint-visitor-keys": "^1.3.0",
|
||||
"espree": "^7.3.0",
|
||||
|
|
@ -3728,13 +3718,6 @@
|
|||
"flat-cache": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
|
|
@ -5388,13 +5371,6 @@
|
|||
"readable-stream": "^2.0.5"
|
||||
}
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.14.1",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
|
||||
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
|
|
@ -5996,9 +5972,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"playwright": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.4.2.tgz",
|
||||
"integrity": "sha512-qiQHrhU4JBxup9JoGZff6hdFL2VrD+ae5QLELGHwRq/vYNQFeJF10Z3ENnQ6hWJmG+YnpfzgoBvX+cUg4WHwTw==",
|
||||
"version": "1.4.0-next.1601161680085",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.4.0-next.1601161680085.tgz",
|
||||
"integrity": "sha512-IpBNNG8vPVjm5SeGzzwCrz2aMv1K8KMyUvEsAYJnkDOwgOIVECtdJkM6WZmvIjw2bxS+QxHsX7mA9y42C1B+Qg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
|
|
@ -6008,6 +5984,7 @@
|
|||
"mime": "^2.4.6",
|
||||
"pngjs": "^5.0.0",
|
||||
"progress": "^2.0.3",
|
||||
"proper-lockfile": "^4.1.1",
|
||||
"proxy-from-env": "^1.1.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"ws": "^7.3.1"
|
||||
|
|
@ -7809,11 +7786,7 @@
|
|||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
"optional": true
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "3.1.0",
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@
|
|||
"ws": "^7.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^0.9.6",
|
||||
"@playwright/test-runner": "^0.9.15",
|
||||
"@playwright/test": "^0.9.7",
|
||||
"@playwright/test-runner": "^0.9.16",
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/extract-zip": "^1.6.2",
|
||||
"@types/mime": "^2.0.3",
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
"socksv5": "0.0.6",
|
||||
"ts-loader": "^8.0.3",
|
||||
"typescript": "^4.0.2",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack": "^4.44.2",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"yaml": "^1.10.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,11 +38,15 @@ import { ChromiumCoverage } from './chromiumCoverage';
|
|||
import { Waiter } from './waiter';
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as util from 'util';
|
||||
import { Size, URLMatch, Headers, LifecycleEvent, WaitForEventOptions, SelectOption, SelectOptionOptions, FilePayload, WaitForFunctionOptions } from './types';
|
||||
import { evaluationScript, urlMatches } from './clientHelper';
|
||||
import { isString, isRegExp, isObject, mkdirIfNeeded, headersObjectToArray } from '../utils/utils';
|
||||
|
||||
const fsWriteFileAsync = util.promisify(fs.writeFile.bind(fs));
|
||||
const mkdirAsync = util.promisify(fs.mkdir);
|
||||
|
||||
type PDFOptions = Omit<channels.PagePdfParams, 'width' | 'height' | 'margin'> & {
|
||||
width?: string | number,
|
||||
height?: string | number,
|
||||
|
|
@ -56,8 +60,6 @@ type PDFOptions = Omit<channels.PagePdfParams, 'width' | 'height' | 'margin'> &
|
|||
};
|
||||
type Listener = (...args: any[]) => void;
|
||||
|
||||
const fsWriteFileAsync = util.promisify(fs.writeFile.bind(fs));
|
||||
|
||||
export class Page extends ChannelOwner<channels.PageChannel, channels.PageInitializer> {
|
||||
private _browserContext: BrowserContext;
|
||||
_ownedContext: BrowserContext | undefined;
|
||||
|
|
@ -581,8 +583,10 @@ export class Page extends ChannelOwner<channels.PageChannel, channels.PageInitia
|
|||
}
|
||||
const result = await this._channel.pdf(transportOptions);
|
||||
const buffer = Buffer.from(result.pdf, 'base64');
|
||||
if (options.path)
|
||||
if (options.path) {
|
||||
await mkdirAsync(path.dirname(options.path), { recursive: true });
|
||||
await fsWriteFileAsync(options.path, buffer);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class Tracer implements ContextListener {
|
|||
async onContextCreated(context: BrowserContext): Promise<void> {
|
||||
if (!context._options.recordTrace)
|
||||
return;
|
||||
const traceStorageDir = path.join(context._browser._options.artifactsPath!, '.playwright-shared');
|
||||
const traceStorageDir = path.join(context._browser._options.artifactsPath!, 'trace-resources');
|
||||
const traceFile = path.join(context._artifactsPath!, 'playwright.trace');
|
||||
const contextTracer = new ContextTracer(context, traceStorageDir, traceFile);
|
||||
this._contextTracers.set(context, contextTracer);
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
|
After Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 153 B After Width: | Height: | Size: 153 B |
|
After Width: | Height: | Size: 179 B |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 153 B |
|
After Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 445 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 445 B |
|
After Width: | Height: | Size: 143 B |
|
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 113 B |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 138 B |
|
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 109 B |
|
After Width: | Height: | Size: 134 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 175 B |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 560 B |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 81 B |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 911 B After Width: | Height: | Size: 911 B |
|
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 923 B |
|
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 908 B |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
|
After Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 923 B |
|
After Width: | Height: | Size: 908 B |
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
|
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 333 B |
|
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 296 B |
|
After Width: | Height: | Size: 301 B |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 296 B |