🚀 Feature Request
If a user specifies a create-playwright option (eg. --no-browsers), create-playwright should use this option value and skip the interactive question.
This effectively makes the create-playwright behavior the same as setting the --quiet option, if users pass all required options (see below, from the options list):
Usage: npx create-playwright@latest [options] [rootDir]
Available options are:
...
--quiet: do not ask for interactive input prompts
Implementation
enquirer supports skipping prompts in the prompt options if certain criteria is met:
Example
$ pnpm create playwright --test-dir=test --lang=ts --browsers
# This will set custom options non-interactively and skip the interactive prompts
The example above requires the create-playwright flags --test-dir and --browsers, which are feature requests here:
Motivation
This will cause the create-playwright behavior to match intuitive behavior of other well-known CLIs in the JS/TS ecosystem
Alternatives Considered
Use the verbose, undocumented environment variable TEST_OPTIONS which can be set to a JSON string:
TEST_OPTIONS='{"installGitHubActions": true, "language": "TypeScript", "installPlaywrightDependencies": false, "testDir": "playwright", "installPlaywrightBrowsers": true}' pnpm create playwright
Related
🚀 Feature Request
If a user specifies a
create-playwrightoption (eg.--no-browsers),create-playwrightshould use this option value and skip the interactive question.This effectively makes the
create-playwrightbehavior the same as setting the--quietoption, if users pass all required options (see below, from the options list):Implementation
enquirersupports skipping prompts in the prompt options if certain criteria is met:Example
$ pnpm create playwright --test-dir=test --lang=ts --browsers # This will set custom options non-interactively and skip the interactive promptsThe example above requires the
create-playwrightflags--test-dirand--browsers, which are feature requests here:Motivation
This will cause the
create-playwrightbehavior to match intuitive behavior of other well-known CLIs in the JS/TS ecosystemAlternatives Considered
Use the verbose, undocumented environment variable
TEST_OPTIONSwhich can be set to a JSON string:TEST_OPTIONS='{"installGitHubActions": true, "language": "TypeScript", "installPlaywrightDependencies": false, "testDir": "playwright", "installPlaywrightBrowsers": true}' pnpm create playwrightRelated