-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(testing): set playwright to public and restrict exports (#18275)
- Loading branch information
Showing
10 changed files
with
423 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
docs/generated/packages/playwright/executors/playwright.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"name": "playwright", | ||
"implementation": "/packages/playwright/src/executors/playwright/playwright.ts", | ||
"schema": { | ||
"$schema": "http://json-schema.org/schema", | ||
"version": 2, | ||
"title": "Playwright executor", | ||
"description": "Run Playwright tests.", | ||
"type": "object", | ||
"properties": { | ||
"browser": { | ||
"type": "string", | ||
"description": "Browser to use for tests, one of 'all', 'chromium', 'firefox' or 'webkit'. If a playwright config is provided/discovered then the browserName value is expected from the configured 'projects'", | ||
"x-priority": "important" | ||
}, | ||
"config": { | ||
"type": "string", | ||
"description": "Configuration file, or a test directory with optional", | ||
"x-completion-type": "file", | ||
"x-completion-glob": "playwright?(*)@(.js|.cjs|.mjs|.ts|.cts|.mtx)", | ||
"x-priority": "important" | ||
}, | ||
"debug": { | ||
"type": "boolean", | ||
"description": "Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options" | ||
}, | ||
"forbidOnly": { | ||
"type": "boolean", | ||
"description": "Fail if test.only is called" | ||
}, | ||
"fullyParallel": { | ||
"type": "boolean", | ||
"description": "Run all tests in parallel" | ||
}, | ||
"grep": { | ||
"alias": "g", | ||
"type": "string", | ||
"description": "Only run tests matching this regular expression" | ||
}, | ||
"globalTimeout": { | ||
"type": "number", | ||
"description": "Maximum time this test suite can run in milliseconds" | ||
}, | ||
"grepInvert": { | ||
"alias": "gv", | ||
"type": "string", | ||
"description": "Only run tests that do not match this regular expression" | ||
}, | ||
"headed": { | ||
"type": "boolean", | ||
"description": "Run tests in headed browsers", | ||
"x-priority": "important" | ||
}, | ||
"ignoreSnapshots": { | ||
"type": "boolean", | ||
"description": "Ignore screenshot and snapshot expectations" | ||
}, | ||
"workers": { | ||
"alias": "j", | ||
"type": "string", | ||
"description": "Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker" | ||
}, | ||
"list": { | ||
"type": "boolean", | ||
"description": "Collect all the tests and report them, but do not run" | ||
}, | ||
"maxFailures": { | ||
"alias": "x", | ||
"oneOf": [{ "type": "number" }, { "type": "boolean" }], | ||
"description": "Stop after the first N failures" | ||
}, | ||
"noDeps": { | ||
"type": "boolean", | ||
"description": "Do not run project dependencies" | ||
}, | ||
"output": { | ||
"type": "string", | ||
"description": "Folder for output artifacts" | ||
}, | ||
"passWithNoTests": { | ||
"type": "boolean", | ||
"description": "Makes test run succeed even if no tests were found", | ||
"default": true | ||
}, | ||
"project": { | ||
"description": "Only run tests from the specified list of projects", | ||
"type": "array", | ||
"items": { "type": "string" } | ||
}, | ||
"quiet": { | ||
"alias": "q", | ||
"type": "boolean", | ||
"description": "Suppress stdio" | ||
}, | ||
"repeatEach": { | ||
"type": "number", | ||
"description": "Run each test N times" | ||
}, | ||
"reporter": { | ||
"type": "string", | ||
"enum": [ | ||
"list", | ||
"line", | ||
"dot", | ||
"json", | ||
"junit", | ||
"null", | ||
"github", | ||
"html", | ||
"blob" | ||
], | ||
"description": "Reporter to use, comma-separated, can be 'list', 'line', 'dot', 'json', 'junit', 'null', 'github', 'html', 'blob'. To configure reporter options, use the playwright configuration." | ||
}, | ||
"retries": { | ||
"type": "number", | ||
"description": "Maximum retry count for flaky tests, zero for no retries" | ||
}, | ||
"shard": { | ||
"type": "string", | ||
"description": "Shard tests and execute only the selected shard, specify in the form 'current/all', 1-based, for example '3/5'" | ||
}, | ||
"timeout": { | ||
"type": "number", | ||
"description": "Specify test timeout threshold in milliseconds, zero for unlimited" | ||
}, | ||
"trace": { | ||
"type": "string", | ||
"enum": [ | ||
"on", | ||
"off", | ||
"on-first-retry", | ||
"on-all-retries", | ||
"retain-on-failure" | ||
], | ||
"description": "Force tracing mode, can be 'on', 'off', 'on-first-retry', 'on-all-retries', 'retain-on-failure'" | ||
}, | ||
"updateSnapshots": { | ||
"alias": "u", | ||
"type": "boolean", | ||
"description": "Update snapshots with actual results. Snapshots will be created if missing." | ||
}, | ||
"ui": { | ||
"type": "boolean", | ||
"description": "Run tests in interactive UI mode" | ||
}, | ||
"uiHost": { | ||
"type": "string", | ||
"description": "Host to serve UI on; specifying this option opens UI in a browser tab" | ||
}, | ||
"uiPort": { | ||
"type": "string", | ||
"description": "Port to serve UI on, 0 for any free port; specifying this option opens UI in a browser tab" | ||
} | ||
}, | ||
"required": [], | ||
"presets": [] | ||
}, | ||
"description": "Run Playwright tests.", | ||
"aliases": [], | ||
"hidden": false, | ||
"path": "/packages/playwright/src/executors/playwright/schema.json", | ||
"type": "executor" | ||
} |
70 changes: 70 additions & 0 deletions
70
docs/generated/packages/playwright/generators/configuration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"name": "configuration", | ||
"factory": "./src/generators/configuration/configuration", | ||
"schema": { | ||
"$schema": "http://json-schema.org/schema", | ||
"$id": "NxPlaywrightConfiguration", | ||
"description": "Add a Playwright configuration.", | ||
"title": "Add a Playwright configuration", | ||
"type": "object", | ||
"properties": { | ||
"project": { | ||
"type": "string", | ||
"description": "The project to add a Playwright configuration to", | ||
"$default": { "$source": "projectName" }, | ||
"x-priority": "important", | ||
"x-prompt": "What is the name of the project to set up Playwright for?" | ||
}, | ||
"directory": { | ||
"type": "string", | ||
"description": "A directory where the project is placed relative from the project root", | ||
"x-priority": "important", | ||
"default": "playwright" | ||
}, | ||
"js": { | ||
"type": "boolean", | ||
"description": "Generate JavaScript files rather than TypeScript files.", | ||
"default": false | ||
}, | ||
"webServerCommand": { | ||
"type": "string", | ||
"description": "The command to start the web server." | ||
}, | ||
"webServerAddress": { | ||
"type": "string", | ||
"description": "The address of the web server." | ||
}, | ||
"linter": { | ||
"description": "The tool to use for running lint checks.", | ||
"type": "string", | ||
"enum": ["eslint", "none"], | ||
"default": "eslint" | ||
}, | ||
"setParserOptionsProject": { | ||
"type": "boolean", | ||
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", | ||
"default": false | ||
}, | ||
"skipFormat": { | ||
"description": "Skip formatting files.", | ||
"type": "boolean", | ||
"default": false, | ||
"x-priority": "internal" | ||
}, | ||
"skipPackageJson": { | ||
"type": "boolean", | ||
"default": false, | ||
"description": "Do not add dependencies to `package.json`.", | ||
"x-priority": "internal" | ||
} | ||
}, | ||
"required": ["project"], | ||
"presets": [] | ||
}, | ||
"description": "Add Nx Playwright configuration to your project", | ||
"implementation": "/packages/playwright/src/generators/configuration/configuration.ts", | ||
"aliases": [], | ||
"hidden": false, | ||
"path": "/packages/playwright/src/generators/configuration/schema.json", | ||
"type": "generator" | ||
} |
Oops, something went wrong.
8adee8e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev
nx-five.vercel.app