@nx/playwright 0.0.0-pr-22179-271588f
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/LICENSE +22 -0
- package/README.md +66 -0
- package/executors.json +9 -0
- package/generators.json +16 -0
- package/index.d.ts +3 -0
- package/index.js +9 -0
- package/migrations.json +16 -0
- package/package.json +66 -0
- package/plugin.d.ts +1 -0
- package/plugin.js +6 -0
- package/preset.d.ts +1 -0
- package/preset.js +4 -0
- package/src/executors/playwright/playwright.impl.d.ts +37 -0
- package/src/executors/playwright/playwright.impl.js +77 -0
- package/src/executors/playwright/schema.json +168 -0
- package/src/generators/configuration/configuration.d.ts +5 -0
- package/src/generators/configuration/configuration.js +153 -0
- package/src/generators/configuration/files/__directory__/example.spec.ts.template +8 -0
- package/src/generators/configuration/files/playwright.config.ts.template +75 -0
- package/src/generators/configuration/schema.d.ts +27 -0
- package/src/generators/configuration/schema.json +73 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +51 -0
- package/src/generators/init/schema.d.ts +7 -0
- package/src/generators/init/schema.json +34 -0
- package/src/migrations/update-17-3-1/add-project-to-config.d.ts +2 -0
- package/src/migrations/update-17-3-1/add-project-to-config.js +95 -0
- package/src/migrations/update-18-1-0/remove-baseUrl-from-project-json.d.ts +2 -0
- package/src/migrations/update-18-1-0/remove-baseUrl-from-project-json.js +42 -0
- package/src/plugins/plugin.d.ts +7 -0
- package/src/plugins/plugin.js +205 -0
- package/src/utils/add-linter.d.ts +16 -0
- package/src/utils/add-linter.js +52 -0
- package/src/utils/preset.d.ts +30 -0
- package/src/utils/preset.js +60 -0
- package/src/utils/versions.d.ts +3 -0
- package/src/utils/versions.js +6 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2023 Narwhal Technologies Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<p style="text-align: center;">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
+
<img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<div style="text-align: center;">
|
|
9
|
+
|
|
10
|
+
[](https://circleci.com/gh/nrwl/nx)
|
|
11
|
+
[]()
|
|
12
|
+
[](https://www.npmjs.com/@nx/workspace)
|
|
13
|
+
[]()
|
|
14
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
15
|
+
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
16
|
+
[](https://go.nx.dev/community)
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<hr>
|
|
22
|
+
|
|
23
|
+
# Nx: Smart Monorepos · Fast CI
|
|
24
|
+
|
|
25
|
+
Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
|
|
26
|
+
|
|
27
|
+
## Getting Started
|
|
28
|
+
|
|
29
|
+
### Creating an Nx Workspace
|
|
30
|
+
|
|
31
|
+
**Using `npx`**
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx create-nx-workspace
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Using `npm init`**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm init nx-workspace
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Using `yarn create`**
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
yarn create nx-workspace
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Adding Nx to an Existing Repository
|
|
50
|
+
|
|
51
|
+
Run:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx nx@latest init
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Documentation & Resources
|
|
58
|
+
|
|
59
|
+
- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
|
|
60
|
+
- [Intro to Nx](https://nx.dev/getting-started/intro)
|
|
61
|
+
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
|
|
62
|
+
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
63
|
+
|
|
64
|
+
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
65
|
+
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
|
|
66
|
+
|
package/executors.json
ADDED
package/generators.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Nx Playwright",
|
|
3
|
+
"version": "0.1",
|
|
4
|
+
"generators": {
|
|
5
|
+
"configuration": {
|
|
6
|
+
"factory": "./src/generators/configuration/configuration#configurationGeneratorInternal",
|
|
7
|
+
"schema": "./src/generators/configuration/schema.json",
|
|
8
|
+
"description": "Add Nx Playwright configuration to your project"
|
|
9
|
+
},
|
|
10
|
+
"init": {
|
|
11
|
+
"factory": "./src/generators/init/init#initGeneratorInternal",
|
|
12
|
+
"schema": "./src/generators/init/schema.json",
|
|
13
|
+
"description": "Initializes a Playwright project in the current workspace"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configurationGenerator = exports.initGenerator = exports.playwrightExecutor = void 0;
|
|
4
|
+
var playwright_impl_1 = require("./src/executors/playwright/playwright.impl");
|
|
5
|
+
Object.defineProperty(exports, "playwrightExecutor", { enumerable: true, get: function () { return playwright_impl_1.playwrightExecutor; } });
|
|
6
|
+
var init_1 = require("./src/generators/init/init");
|
|
7
|
+
Object.defineProperty(exports, "initGenerator", { enumerable: true, get: function () { return init_1.initGenerator; } });
|
|
8
|
+
var configuration_1 = require("./src/generators/configuration/configuration");
|
|
9
|
+
Object.defineProperty(exports, "configurationGenerator", { enumerable: true, get: function () { return configuration_1.configurationGenerator; } });
|
package/migrations.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generators": {
|
|
3
|
+
"17-3-1-add-project-to-config": {
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"version": "17.3.1-beta.0",
|
|
6
|
+
"description": "Add project property to playwright config",
|
|
7
|
+
"implementation": "./src/migrations/update-17-3-1/add-project-to-config"
|
|
8
|
+
},
|
|
9
|
+
"18-1-0-remove-baseUrl-from-project-json": {
|
|
10
|
+
"cli": "nx",
|
|
11
|
+
"version": "18.1.0-beta.3",
|
|
12
|
+
"description": "Remove invalid baseUrl option from @nx/playwright:playwright targets in project.json.",
|
|
13
|
+
"implementation": "./src/migrations/update-18-1-0/remove-baseUrl-from-project-json"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nx/playwright",
|
|
3
|
+
"version": "0.0.0-pr-22179-271588f",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"homepage": "https://nx.dev",
|
|
6
|
+
"private": false,
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"description": "The Nx Plugin for Playwright contains executors and generators allowing your workspace to use the powerful Playwright integration testing capabilities.",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"Monorepo",
|
|
13
|
+
"Angular",
|
|
14
|
+
"React",
|
|
15
|
+
"Web",
|
|
16
|
+
"Node",
|
|
17
|
+
"Nest",
|
|
18
|
+
"Jest",
|
|
19
|
+
"Playwright",
|
|
20
|
+
"CLI"
|
|
21
|
+
],
|
|
22
|
+
"main": "./index.js",
|
|
23
|
+
"typings": "./index.d.ts",
|
|
24
|
+
"author": "Victor Savkin",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/nrwl/nx/issues"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/nrwl/nx.git",
|
|
32
|
+
"directory": "packages/playwright"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
36
|
+
"@nx/devkit": "0.0.0-pr-22179-271588f",
|
|
37
|
+
"@nx/eslint": "0.0.0-pr-22179-271588f",
|
|
38
|
+
"@nx/js": "0.0.0-pr-22179-271588f",
|
|
39
|
+
"tslib": "^2.3.0",
|
|
40
|
+
"minimatch": "9.0.3"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@playwright/test": "^1.36.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"@playwright/test": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"executors": "./executors.json",
|
|
51
|
+
"generators": "./generators.json",
|
|
52
|
+
"exports": {
|
|
53
|
+
".": "./index.js",
|
|
54
|
+
"./package.json": "./package.json",
|
|
55
|
+
"./migrations.json": "./migrations.json",
|
|
56
|
+
"./generators.json": "./generators.json",
|
|
57
|
+
"./generators/*/schema.json": "./src/generators/*/schema.json",
|
|
58
|
+
"./executors.json": "./executors.json",
|
|
59
|
+
"./executors/*/schema.json": "./src/executors/*/schema.json",
|
|
60
|
+
"./plugin": "./plugin.js",
|
|
61
|
+
"./preset": "./src/utils/preset.js"
|
|
62
|
+
},
|
|
63
|
+
"nx-migrations": {
|
|
64
|
+
"migrations": "./migrations.json"
|
|
65
|
+
}
|
|
66
|
+
}
|
package/plugin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createNodes, PlaywrightPluginOptions, createDependencies, } from './src/plugins/plugin';
|
package/plugin.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDependencies = exports.createNodes = void 0;
|
|
4
|
+
var plugin_1 = require("./src/plugins/plugin");
|
|
5
|
+
Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
|
|
6
|
+
Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });
|
package/preset.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/utils/preset';
|
package/preset.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
export interface PlaywrightExecutorSchema {
|
|
3
|
+
browser?: 'all' | 'chromium' | 'firefox' | 'webkit' | string;
|
|
4
|
+
config?: string;
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
forbidOnly?: boolean;
|
|
7
|
+
fullyParallel?: boolean;
|
|
8
|
+
grep?: string;
|
|
9
|
+
globalTimeout?: number;
|
|
10
|
+
grepInvert?: string;
|
|
11
|
+
testFiles?: string[];
|
|
12
|
+
headed?: boolean;
|
|
13
|
+
ignoreSnapshots?: boolean;
|
|
14
|
+
workers?: string;
|
|
15
|
+
list?: boolean;
|
|
16
|
+
maxFailures?: number | boolean;
|
|
17
|
+
noDeps?: boolean;
|
|
18
|
+
output?: string;
|
|
19
|
+
passWithNoTests?: boolean;
|
|
20
|
+
project?: string[];
|
|
21
|
+
quiet?: boolean;
|
|
22
|
+
repeatEach?: number;
|
|
23
|
+
reporter?: 'list' | 'line' | 'dot' | 'json' | 'junit' | 'null' | 'github' | 'html' | 'blob';
|
|
24
|
+
retries?: number;
|
|
25
|
+
shard?: string;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
trace?: 'on' | 'off' | 'on-first-retry' | 'on-all-retries' | 'retain-on-failure';
|
|
28
|
+
updateSnapshots?: boolean;
|
|
29
|
+
ui?: boolean;
|
|
30
|
+
uiHost?: string;
|
|
31
|
+
uiPort?: string;
|
|
32
|
+
skipInstall?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function playwrightExecutor(options: PlaywrightExecutorSchema, context: ExecutorContext): Promise<{
|
|
35
|
+
success: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
export default playwrightExecutor;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.playwrightExecutor = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
async function playwrightExecutor(options, context) {
|
|
7
|
+
const projectRoot = context.projectGraph?.nodes?.[context?.projectName]?.data?.root;
|
|
8
|
+
if (!projectRoot) {
|
|
9
|
+
throw new Error(`Unable to find the Project Root for ${context.projectName}. Is it set in the project.json?`);
|
|
10
|
+
}
|
|
11
|
+
if (!options.skipInstall) {
|
|
12
|
+
devkit_1.output.log({
|
|
13
|
+
title: 'Ensuring Playwright is installed.',
|
|
14
|
+
bodyLines: ['use --skipInstall to skip installation.'],
|
|
15
|
+
});
|
|
16
|
+
const pmc = (0, devkit_1.getPackageManagerCommand)();
|
|
17
|
+
(0, child_process_1.execSync)(`${pmc.exec} playwright install`, {
|
|
18
|
+
cwd: devkit_1.workspaceRoot,
|
|
19
|
+
stdio: 'inherit',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const args = createArgs(options);
|
|
23
|
+
const p = runPlaywright(args, context.root);
|
|
24
|
+
p.stdout.on('data', (message) => {
|
|
25
|
+
process.stdout.write(message);
|
|
26
|
+
});
|
|
27
|
+
p.stderr.on('data', (message) => {
|
|
28
|
+
process.stderr.write(message);
|
|
29
|
+
});
|
|
30
|
+
return new Promise((resolve) => {
|
|
31
|
+
p.on('close', (code) => {
|
|
32
|
+
resolve({ success: code === 0 });
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
exports.playwrightExecutor = playwrightExecutor;
|
|
37
|
+
function createArgs(opts, exclude = ['skipInstall']) {
|
|
38
|
+
const args = [];
|
|
39
|
+
const { testFiles, ...rest } = opts;
|
|
40
|
+
if (testFiles) {
|
|
41
|
+
args.push(...testFiles);
|
|
42
|
+
}
|
|
43
|
+
for (const key in rest) {
|
|
44
|
+
if (exclude.includes(key))
|
|
45
|
+
continue;
|
|
46
|
+
const value = opts[key];
|
|
47
|
+
// NOTE: playwright doesn't accept pascalCase args, only kebab-case
|
|
48
|
+
const arg = (0, devkit_1.names)(key).fileName;
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
args.push(...value.map((v) => `--${arg}=${v.trim()}`));
|
|
51
|
+
}
|
|
52
|
+
else if (typeof value === 'boolean') {
|
|
53
|
+
// NOTE: playwright don't accept --arg=false, instead just don't pass the arg.
|
|
54
|
+
if (value) {
|
|
55
|
+
args.push(`--${arg}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
args.push(`--${arg}=${value}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return args;
|
|
63
|
+
}
|
|
64
|
+
function runPlaywright(args, cwd) {
|
|
65
|
+
try {
|
|
66
|
+
const cli = require.resolve('@playwright/test/cli');
|
|
67
|
+
return (0, child_process_1.fork)(cli, ['test', ...args], {
|
|
68
|
+
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
|
|
69
|
+
cwd,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
catch (e) {
|
|
73
|
+
console.error(e);
|
|
74
|
+
throw new Error('Unable to run playwright. Is @playwright/test installed?');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.default = playwrightExecutor;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"title": "Playwright executor",
|
|
5
|
+
"description": "Run Playwright tests.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"browser": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"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'",
|
|
11
|
+
"x-priority": "important"
|
|
12
|
+
},
|
|
13
|
+
"config": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Configuration file, or a test directory with optional",
|
|
16
|
+
"x-completion-type": "file",
|
|
17
|
+
"x-completion-glob": "playwright?(*)@(.js|.cjs|.mjs|.ts|.cts|.mtx)",
|
|
18
|
+
"x-priority": "important"
|
|
19
|
+
},
|
|
20
|
+
"debug": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options"
|
|
23
|
+
},
|
|
24
|
+
"forbidOnly": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Fail if test.only is called"
|
|
27
|
+
},
|
|
28
|
+
"fullyParallel": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Run all tests in parallel"
|
|
31
|
+
},
|
|
32
|
+
"grep": {
|
|
33
|
+
"alias": "g",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Only run tests matching this regular expression"
|
|
36
|
+
},
|
|
37
|
+
"globalTimeout": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"description": "Maximum time this test suite can run in milliseconds"
|
|
40
|
+
},
|
|
41
|
+
"grepInvert": {
|
|
42
|
+
"alias": "gv",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Only run tests that do not match this regular expression"
|
|
45
|
+
},
|
|
46
|
+
"testFiles": {
|
|
47
|
+
"alias": "t",
|
|
48
|
+
"type": "array",
|
|
49
|
+
"description": "Test files to run",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"headed": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Run tests in headed browsers",
|
|
57
|
+
"x-priority": "important"
|
|
58
|
+
},
|
|
59
|
+
"ignoreSnapshots": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"description": "Ignore screenshot and snapshot expectations"
|
|
62
|
+
},
|
|
63
|
+
"workers": {
|
|
64
|
+
"alias": "j",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "Number of concurrent workers or percentage of logical CPU cores, use 1 to run in a single worker"
|
|
67
|
+
},
|
|
68
|
+
"list": {
|
|
69
|
+
"type": "boolean",
|
|
70
|
+
"description": "Collect all the tests and report them, but do not run"
|
|
71
|
+
},
|
|
72
|
+
"maxFailures": {
|
|
73
|
+
"alias": "x",
|
|
74
|
+
"oneOf": [{ "type": "number" }, { "type": "boolean" }],
|
|
75
|
+
"description": "Stop after the first N failures"
|
|
76
|
+
},
|
|
77
|
+
"noDeps": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"description": "Do not run project dependencies"
|
|
80
|
+
},
|
|
81
|
+
"output": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "Folder for output artifacts"
|
|
84
|
+
},
|
|
85
|
+
"passWithNoTests": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Makes test run succeed even if no tests were found",
|
|
88
|
+
"default": true
|
|
89
|
+
},
|
|
90
|
+
"project": {
|
|
91
|
+
"description": "Only run tests from the specified list of projects",
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"quiet": {
|
|
98
|
+
"alias": "q",
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "Suppress stdio"
|
|
101
|
+
},
|
|
102
|
+
"repeatEach": {
|
|
103
|
+
"type": "number",
|
|
104
|
+
"description": "Run each test N times"
|
|
105
|
+
},
|
|
106
|
+
"reporter": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"enum": [
|
|
109
|
+
"list",
|
|
110
|
+
"line",
|
|
111
|
+
"dot",
|
|
112
|
+
"json",
|
|
113
|
+
"junit",
|
|
114
|
+
"null",
|
|
115
|
+
"github",
|
|
116
|
+
"html",
|
|
117
|
+
"blob"
|
|
118
|
+
],
|
|
119
|
+
"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."
|
|
120
|
+
},
|
|
121
|
+
"retries": {
|
|
122
|
+
"type": "number",
|
|
123
|
+
"description": "Maximum retry count for flaky tests, zero for no retries"
|
|
124
|
+
},
|
|
125
|
+
"shard": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"description": "Shard tests and execute only the selected shard, specify in the form 'current/all', 1-based, for example '3/5'"
|
|
128
|
+
},
|
|
129
|
+
"timeout": {
|
|
130
|
+
"type": "number",
|
|
131
|
+
"description": "Specify test timeout threshold in milliseconds, zero for unlimited"
|
|
132
|
+
},
|
|
133
|
+
"trace": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enum": [
|
|
136
|
+
"on",
|
|
137
|
+
"off",
|
|
138
|
+
"on-first-retry",
|
|
139
|
+
"on-all-retries",
|
|
140
|
+
"retain-on-failure"
|
|
141
|
+
],
|
|
142
|
+
"description": "Force tracing mode, can be 'on', 'off', 'on-first-retry', 'on-all-retries', 'retain-on-failure'"
|
|
143
|
+
},
|
|
144
|
+
"updateSnapshots": {
|
|
145
|
+
"alias": "u",
|
|
146
|
+
"type": "boolean",
|
|
147
|
+
"description": "Update snapshots with actual results. Snapshots will be created if missing."
|
|
148
|
+
},
|
|
149
|
+
"ui": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"description": "Run tests in interactive UI mode"
|
|
152
|
+
},
|
|
153
|
+
"uiHost": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "Host to serve UI on; specifying this option opens UI in a browser tab"
|
|
156
|
+
},
|
|
157
|
+
"uiPort": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "Port to serve UI on, 0 for any free port; specifying this option opens UI in a browser tab"
|
|
160
|
+
},
|
|
161
|
+
"skipInstall": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"description": "Skip running playwright install before running playwright tests. This is to ensure that playwright browsers are installed before running tests.",
|
|
164
|
+
"default": false
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": []
|
|
168
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
|
+
import { ConfigurationGeneratorSchema } from './schema';
|
|
3
|
+
export declare function configurationGenerator(tree: Tree, options: ConfigurationGeneratorSchema): Promise<GeneratorCallback>;
|
|
4
|
+
export declare function configurationGeneratorInternal(tree: Tree, options: ConfigurationGeneratorSchema): Promise<GeneratorCallback>;
|
|
5
|
+
export default configurationGenerator;
|