@nx/playwright 16.7.0-beta.4 → 16.7.0-beta.6
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/package.json +4 -4
- package/src/executors/playwright/playwright.js +7 -1
- package/src/generators/configuration/configuration.js +1 -1
- package/src/generators/configuration/files/__directory__/example.spec.ts.template +2 -2
- package/src/generators/configuration/files/playwright.config.ts.template +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/playwright",
|
|
3
|
-
"version": "16.7.0-beta.
|
|
3
|
+
"version": "16.7.0-beta.6",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"homepage": "https://nx.dev",
|
|
6
6
|
"private": false,
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"directory": "packages/playwright"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@nx/devkit": "16.7.0-beta.
|
|
36
|
-
"@nx/linter": "16.7.0-beta.
|
|
35
|
+
"@nx/devkit": "16.7.0-beta.6",
|
|
36
|
+
"@nx/linter": "16.7.0-beta.6",
|
|
37
37
|
"tslib": "^2.3.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"./executors/*/schema.json": "./src/executors/*/schema.json",
|
|
57
57
|
"./preset": "./src/utils/preset.js"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "d1ffe58644851335f18da1d60b1a60882347aff9"
|
|
60
60
|
}
|
|
@@ -21,6 +21,12 @@ function playwrightExecutor(options, context) {
|
|
|
21
21
|
}
|
|
22
22
|
const args = createArgs(options);
|
|
23
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
|
+
});
|
|
24
30
|
return new Promise((resolve) => {
|
|
25
31
|
p.on('close', (code) => {
|
|
26
32
|
resolve({ success: code === 0 });
|
|
@@ -54,7 +60,7 @@ function runPlaywright(args, cwd) {
|
|
|
54
60
|
try {
|
|
55
61
|
const cli = require.resolve('@playwright/test/cli');
|
|
56
62
|
return (0, child_process_1.fork)(cli, ['test', ...args], {
|
|
57
|
-
stdio: '
|
|
63
|
+
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
|
|
58
64
|
cwd,
|
|
59
65
|
});
|
|
60
66
|
}
|
|
@@ -64,7 +64,7 @@ Rename or remove the existing e2e target.`);
|
|
|
64
64
|
(_b = projectConfig.targets) !== null && _b !== void 0 ? _b : (projectConfig.targets = {});
|
|
65
65
|
projectConfig.targets.e2e = {
|
|
66
66
|
executor: '@nx/playwright:playwright',
|
|
67
|
-
outputs: [`dist/.playwright/${projectConfig.root}`],
|
|
67
|
+
outputs: [`{workspaceRoot}/dist/.playwright/${projectConfig.root}`],
|
|
68
68
|
options: {
|
|
69
69
|
config: `${projectConfig.root}/playwright.config.${options.js ? 'js' : 'ts'}`,
|
|
70
70
|
},
|
|
@@ -3,6 +3,6 @@ import { test, expect } from '@playwright/test';
|
|
|
3
3
|
test('has title', async ({ page }) => {
|
|
4
4
|
await page.goto('/');
|
|
5
5
|
|
|
6
|
-
// Expect
|
|
7
|
-
await
|
|
6
|
+
// Expect h1 to contain a substring.
|
|
7
|
+
expect(await page.locator('h1').innerText()).toContain('Welcome');
|
|
8
8
|
});
|
|
@@ -16,7 +16,7 @@ const baseURL = process.env['BASE_URL'] || '<% if(webServerAddress) {%><%= webSe
|
|
|
16
16
|
* See https://playwright.dev/docs/test-configuration.
|
|
17
17
|
*/
|
|
18
18
|
export default defineConfig({
|
|
19
|
-
...nxE2EPreset(__filename, { testDir: '
|
|
19
|
+
...nxE2EPreset(__filename, { testDir: './<%= directory %>' }),
|
|
20
20
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
21
21
|
use: {
|
|
22
22
|
baseURL,
|