@playwright/test 1.32.0-beta-1679348958000 → 1.32.0-beta-1679357626000

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.
Files changed (2) hide show
  1. package/lib/cli.js +2 -27
  2. package/package.json +2 -2
package/lib/cli.js CHANGED
@@ -32,14 +32,13 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
32
32
 
33
33
  function addTestCommands(program) {
34
34
  addTestCommand(program);
35
- addUICommand(program);
36
35
  addShowReportCommand(program);
37
36
  addListFilesCommand(program);
38
37
  }
39
38
  function addTestCommand(program) {
40
39
  const command = program.command('test [test-filter...]');
41
40
  command.description('run tests with Playwright Test');
42
- const options = [...sharedOptions, ...testOnlyOptions].sort((a, b) => a[0].replace(/-/g, '').localeCompare(b[0].replace(/-/g, '')));
41
+ const options = testOptions.sort((a, b) => a[0].replace(/-/g, '').localeCompare(b[0].replace(/-/g, '')));
43
42
  options.forEach(([name, description]) => command.option(name, description));
44
43
  command.action(async (args, opts) => {
45
44
  try {
@@ -59,29 +58,6 @@ Examples:
59
58
  $ npx playwright test --headed
60
59
  $ npx playwright test --project=webkit`);
61
60
  }
62
- function addUICommand(program) {
63
- const command = program.command('ui [test-filter...]');
64
- command.description('open Playwright Test interactive UI');
65
- sharedOptions.forEach(([name, description]) => command.option(name, description));
66
- command.action(async (args, opts) => {
67
- try {
68
- opts.ui = true;
69
- await runTests(args, opts);
70
- } catch (e) {
71
- console.error(e);
72
- process.exit(1);
73
- }
74
- });
75
- command.addHelpText('afterAll', `
76
- Arguments [test-filter...]:
77
- Pass arguments to filter test files. Each argument is treated as a regular expression. Matching is performed against the absolute file paths.
78
-
79
- Examples:
80
- $ npx playwright ui my.spec.ts
81
- $ npx playwright ui some.spec.ts:42
82
- $ npx playwright ui --headed
83
- $ npx playwright ui --project=webkit`);
84
- }
85
61
  function addListFilesCommand(program) {
86
62
  const command = program.command('list-files [file-filter...]', {
87
63
  hidden: true
@@ -231,5 +207,4 @@ function restartWithExperimentalTsEsm(configFile) {
231
207
  return true;
232
208
  }
233
209
  const kTraceModes = ['on', 'off', 'on-first-retry', 'retain-on-failure'];
234
- const sharedOptions = [['--headed', `Run tests in headed browsers (default: headless)`], ['-c, --config <file>', `Configuration file, or a test directory with optional ${_configLoader.kDefaultConfigFiles.map(file => `"${file}"`).join('/')}`], ['--fully-parallel', `Run all tests in parallel (default: false)`], ['--ignore-snapshots', `Ignore screenshot and snapshot expectations`], ['-j, --workers <workers>', `Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker (default: 50%)`], ['--max-failures <N>', `Stop after the first N failures`], ['--no-deps', 'Do not run project dependencies'], ['--output <dir>', `Folder for output artifacts (default: "test-results")`], ['--quiet', `Suppress stdio`], ['--reporter <reporter>', `Reporter to use, comma-separated, can be ${_configLoader.builtInReporters.map(name => `"${name}"`).join(', ')} (default: "${_configLoader.baseFullConfig.reporter[0]}")`], ['--project <project-name...>', `Only run tests from the specified list of projects (default: run all projects)`], ['--timeout <timeout>', `Specify test timeout threshold in milliseconds, zero for unlimited (default: ${_configLoader.defaultTimeout})`], ['-x', `Stop after the first failure`]];
235
- const testOnlyOptions = [['--browser <browser>', `Browser to use for tests, one of "all", "chromium", "firefox" or "webkit" (default: "chromium")`], ['--debug', `Run tests with Playwright Inspector. Shortcut for "PWDEBUG=1" environment variable and "--timeout=0 --max-failures=1 --headed --workers=1" options`], ['--forbid-only', `Fail if test.only is called (default: false)`], ['--global-timeout <timeout>', `Maximum time this test suite can run in milliseconds (default: unlimited)`], ['-g, --grep <grep>', `Only run tests matching this regular expression (default: ".*")`], ['-gv, --grep-invert <grep>', `Only run tests that do not match this regular expression`], ['--list', `Collect all the tests and report them, but do not run`], ['--pass-with-no-tests', `Makes test run succeed even if no tests were found`], ['--repeat-each <N>', `Run each test N times (default: 1)`], ['--retries <retries>', `Maximum retry count for flaky tests, zero for no retries (default: no retries)`], ['--shard <shard>', `Shard tests and execute only the selected shard, specify in the form "current/all", 1-based, for example "3/5"`], ['--trace <mode>', `Force tracing mode, can be ${kTraceModes.map(mode => `"${mode}"`).join(', ')}`], ['--ui', `Run tests in interactive UI mode`], ['-u, --update-snapshots', `Update snapshots with actual results (default: only create missing snapshots)`]];
210
+ const testOptions = [['--browser <browser>', `Browser to use for tests, one of "all", "chromium", "firefox" or "webkit" (default: "chromium")`], ['-c, --config <file>', `Configuration file, or a test directory with optional ${_configLoader.kDefaultConfigFiles.map(file => `"${file}"`).join('/')}`], ['--debug', `Run tests with Playwright Inspector. Shortcut for "PWDEBUG=1" environment variable and "--timeout=0 --max-failures=1 --headed --workers=1" options`], ['--forbid-only', `Fail if test.only is called (default: false)`], ['--fully-parallel', `Run all tests in parallel (default: false)`], ['--global-timeout <timeout>', `Maximum time this test suite can run in milliseconds (default: unlimited)`], ['-g, --grep <grep>', `Only run tests matching this regular expression (default: ".*")`], ['-gv, --grep-invert <grep>', `Only run tests that do not match this regular expression`], ['--headed', `Run tests in headed browsers (default: headless)`], ['--ignore-snapshots', `Ignore screenshot and snapshot expectations`], ['--list', `Collect all the tests and report them, but do not run`], ['--max-failures <N>', `Stop after the first N failures`], ['--no-deps', 'Do not run project dependencies'], ['--output <dir>', `Folder for output artifacts (default: "test-results")`], ['--pass-with-no-tests', `Makes test run succeed even if no tests were found`], ['--project <project-name...>', `Only run tests from the specified list of projects (default: run all projects)`], ['--quiet', `Suppress stdio`], ['--repeat-each <N>', `Run each test N times (default: 1)`], ['--reporter <reporter>', `Reporter to use, comma-separated, can be ${_configLoader.builtInReporters.map(name => `"${name}"`).join(', ')} (default: "${_configLoader.baseFullConfig.reporter[0]}")`], ['--retries <retries>', `Maximum retry count for flaky tests, zero for no retries (default: no retries)`], ['--shard <shard>', `Shard tests and execute only the selected shard, specify in the form "current/all", 1-based, for example "3/5"`], ['--timeout <timeout>', `Specify test timeout threshold in milliseconds, zero for unlimited (default: ${_configLoader.defaultTimeout})`], ['--trace <mode>', `Force tracing mode, can be ${kTraceModes.map(mode => `"${mode}"`).join(', ')}`], ['--ui', `Run tests in interactive UI mode`], ['-u, --update-snapshots', `Update snapshots with actual results (default: only create missing snapshots)`], ['-j, --workers <workers>', `Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker (default: 50%)`], ['-x', `Stop after the first failure`]];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playwright/test",
3
- "version": "1.32.0-beta-1679348958000",
3
+ "version": "1.32.0-beta-1679357626000",
4
4
  "description": "A high-level API to automate web browsers",
5
5
  "repository": "github:Microsoft/playwright",
6
6
  "homepage": "https://playwright.dev",
@@ -34,7 +34,7 @@
34
34
  "license": "Apache-2.0",
35
35
  "dependencies": {
36
36
  "@types/node": "*",
37
- "playwright-core": "1.32.0-beta-1679348958000"
37
+ "playwright-core": "1.32.0-beta-1679357626000"
38
38
  },
39
39
  "optionalDependencies": {
40
40
  "fsevents": "2.3.2"