Skip to content

Commit

Permalink
feat(testing): set playwright to public and restrict exports (#18275)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Jul 31, 2023
1 parent 9c7ded0 commit 8adee8e
Show file tree
Hide file tree
Showing 10 changed files with 423 additions and 2 deletions.
51 changes: 51 additions & 0 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -6814,6 +6814,57 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "playwright",
"path": "/packages/playwright",
"name": "playwright",
"children": [
{
"id": "executors",
"path": "/packages/playwright/executors",
"name": "executors",
"children": [
{
"id": "playwright",
"path": "/packages/playwright/executors/playwright",
"name": "playwright",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "generators",
"path": "/packages/playwright/generators",
"name": "generators",
"children": [
{
"id": "configuration",
"path": "/packages/playwright/generators/configuration",
"name": "configuration",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "init",
"path": "/packages/playwright/generators/init",
"name": "init",
"children": [],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
}
],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "plugin",
"path": "/packages/plugin",
Expand Down
41 changes: 41 additions & 0 deletions docs/generated/manifests/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,47 @@
"generators": {},
"path": "/packages/nx"
},
"playwright": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "playwright",
"packageName": "@nx/playwright",
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
"documents": {},
"root": "/packages/playwright",
"source": "/packages/playwright/src",
"executors": {
"/packages/playwright/executors/playwright": {
"description": "Run Playwright tests.",
"file": "generated/packages/playwright/executors/playwright.json",
"hidden": false,
"name": "playwright",
"originalFilePath": "/packages/playwright/src/executors/playwright/schema.json",
"path": "/packages/playwright/executors/playwright",
"type": "executor"
}
},
"generators": {
"/packages/playwright/generators/configuration": {
"description": "Add Nx Playwright configuration to your project",
"file": "generated/packages/playwright/generators/configuration.json",
"hidden": false,
"name": "configuration",
"originalFilePath": "/packages/playwright/src/generators/configuration/schema.json",
"path": "/packages/playwright/generators/configuration",
"type": "generator"
},
"/packages/playwright/generators/init": {
"description": "Initializes a Playwright project in the current workspace",
"file": "generated/packages/playwright/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/packages/playwright/src/generators/init/schema.json",
"path": "/packages/playwright/generators/init",
"type": "generator"
}
},
"path": "/packages/playwright"
},
"plugin": {
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "plugin",
Expand Down
40 changes: 40 additions & 0 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,46 @@
"root": "/packages/nx",
"source": "/packages/nx/src"
},
{
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
"documents": [],
"executors": [
{
"description": "Run Playwright tests.",
"file": "generated/packages/playwright/executors/playwright.json",
"hidden": false,
"name": "playwright",
"originalFilePath": "/packages/playwright/src/executors/playwright/schema.json",
"path": "playwright/executors/playwright",
"type": "executor"
}
],
"generators": [
{
"description": "Add Nx Playwright configuration to your project",
"file": "generated/packages/playwright/generators/configuration.json",
"hidden": false,
"name": "configuration",
"originalFilePath": "/packages/playwright/src/generators/configuration/schema.json",
"path": "playwright/generators/configuration",
"type": "generator"
},
{
"description": "Initializes a Playwright project in the current workspace",
"file": "generated/packages/playwright/generators/init.json",
"hidden": false,
"name": "init",
"originalFilePath": "/packages/playwright/src/generators/init/schema.json",
"path": "playwright/generators/init",
"type": "generator"
}
],
"githubRoot": "https://github.com/nrwl/nx/blob/master",
"name": "playwright",
"packageName": "@nx/playwright",
"root": "/packages/playwright",
"source": "/packages/playwright/src"
},
{
"description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
"documents": [
Expand Down
163 changes: 163 additions & 0 deletions docs/generated/packages/playwright/executors/playwright.json
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 docs/generated/packages/playwright/generators/configuration.json
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"
}

1 comment on commit 8adee8e

@vercel
Copy link

@vercel vercel bot commented on 8adee8e Jul 31, 2023

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

Please sign in to comment.