playwright 1.62.1 → 1.65.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 🎭 Playwright
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-151.0.7922.34-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-153.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-26.5-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop --> [![Join Discord](https://img.shields.io/badge/join-discord-informational)](https://aka.ms/playwright/discord)
3
+ [![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-158.0.8127.18-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-159.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-27.2-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop --> [![Join Discord](https://img.shields.io/badge/join-discord-informational)](https://aka.ms/playwright/discord)
4
4
 
5
5
  ## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)
6
6
 
@@ -296,9 +296,9 @@ The [Playwright VS Code extension](https://marketplace.visualstudio.com/items?it
296
296
 
297
297
  | | Linux | macOS | Windows |
298
298
  | :--- | :---: | :---: | :---: |
299
- | Chromium<sup>1</sup> <!-- GEN:chromium-version -->151.0.7922.34<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
300
- | WebKit <!-- GEN:webkit-version -->26.5<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
301
- | Firefox <!-- GEN:firefox-version -->153.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
299
+ | Chromium<sup>1</sup> <!-- GEN:chromium-version -->158.0.8127.18<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
300
+ | WebKit <!-- GEN:webkit-version -->27.2<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
301
+ | Firefox <!-- GEN:firefox-version -->159.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
302
302
 
303
303
  Headless and headed execution on all platforms. <sup>1</sup> Uses [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing) by default.
304
304
 
@@ -68,7 +68,7 @@ application behavior.
68
68
  // seed: tests/seed.spec.ts
69
69
 
70
70
  test.describe('Adding New Todos', () => {
71
- test('Add Valid Todo', async { page } => {
71
+ test('Add Valid Todo', async ({ page }) => {
72
72
  // 1. Click in the "What needs to be done?" input field
73
73
  await page.click(...);
74
74
 
@@ -38,9 +38,7 @@ var import_path = __toESM(require("path"));
38
38
  var import_common = require("../common");
39
39
  var import_runner = require("../runner");
40
40
  const { gracefullyProcessExitDoNotHang } = require("playwright-core/lib/coreBundle").utils;
41
- const { startProfiling, stopProfiling } = require("playwright-core/lib/coreBundle").utils;
42
41
  async function runTests(args, opts) {
43
- await startProfiling();
44
42
  const cliOverrides = overridesFromOptions(opts);
45
43
  cliOverrides.argv = process.argv;
46
44
  const config = await import_common.configLoader.loadConfigFromFile(opts.config, cliOverrides, opts.deps === false);
@@ -71,7 +69,6 @@ async function runTests(args, opts) {
71
69
  project: opts.project || void 0,
72
70
  reporter: Array.isArray(opts.reporter) ? opts.reporter : opts.reporter ? [opts.reporter] : void 0
73
71
  });
74
- await stopProfiling("runner");
75
72
  const exitCode2 = status2 === "interrupted" ? 130 : status2 === "passed" ? 0 : 1;
76
73
  gracefullyProcessExitDoNotHang(exitCode2);
77
74
  return;
@@ -87,13 +84,11 @@ async function runTests(args, opts) {
87
84
  grep: opts.grep
88
85
  }
89
86
  );
90
- await stopProfiling("runner");
91
87
  const exitCode2 = status2 === "interrupted" ? 130 : status2 === "passed" ? 0 : 1;
92
88
  gracefullyProcessExitDoNotHang(exitCode2);
93
89
  return;
94
90
  }
95
91
  const status = await import_runner.testRunner.runAllTestsWithConfig(config, options);
96
- await stopProfiling("runner");
97
92
  const exitCode = status === "interrupted" ? 130 : status === "passed" ? 0 : 1;
98
93
  gracefullyProcessExitDoNotHang(exitCode);
99
94
  }
@@ -123,12 +118,13 @@ function overridesFromOptions(options) {
123
118
  globalTimeout: options.globalTimeout ? parseInt(options.globalTimeout, 10) : void 0,
124
119
  maxFailures: options.x ? 1 : options.maxFailures ? parseInt(options.maxFailures, 10) : void 0,
125
120
  outputDir: options.output ? import_path.default.resolve(process.cwd(), options.output) : void 0,
126
- pause: !!process.env.PWPAUSE,
127
121
  quiet: options.quiet ? options.quiet : void 0,
128
122
  repeatEach: options.repeatEach ? parseInt(options.repeatEach, 10) : void 0,
129
123
  retries: options.retries ? parseInt(options.retries, 10) : void 0,
130
124
  reporter: resolveReporterOption(options.reporter),
125
+ additionalReporters: resolveReporterOption(options.addReporter),
131
126
  shard: resolveShardOption(options.shard),
127
+ shuffle: resolveShuffleOption(options.shuffle),
132
128
  timeout: options.timeout ? parseInt(options.timeout, 10) : void 0,
133
129
  tsconfig: options.tsconfig ? import_path.default.resolve(process.cwd(), options.tsconfig) : void 0,
134
130
  ignoreSnapshots: options.ignoreSnapshots ? !!options.ignoreSnapshots : void 0,
@@ -166,6 +162,13 @@ function resolveReporterOption(reporter) {
166
162
  return void 0;
167
163
  return reporter.split(",").map((r) => [resolveReporter(r)]);
168
164
  }
165
+ function resolveShuffleOption(shuffle) {
166
+ if (!shuffle)
167
+ return void 0;
168
+ if (shuffle === true)
169
+ return String(Math.floor(Math.random() * 1e9));
170
+ return shuffle;
171
+ }
169
172
  function resolveShardOption(shard) {
170
173
  if (!shard)
171
174
  return void 0;