@lvce-editor/test-with-playwright 20.1.0 → 21.0.0
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/README.md +1 -1
- package/dist/main.js +4 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ test('sample.hello-world', async () => {
|
|
|
33
33
|
- `--server-path`: explicit server entry point
|
|
34
34
|
- `--filter`: run only matching tests
|
|
35
35
|
- `--headless`: run Playwright in headless mode
|
|
36
|
-
- `--browser`: browser engine to launch
|
|
36
|
+
- `--browser`: browser engine to launch: `chromium`, `firefox`, or `webkit`
|
|
37
37
|
- `--trace-focus`: add `traceFocus=true` to test URLs
|
|
38
38
|
- `--electron-path`: path to an existing Electron app executable
|
|
39
39
|
- `--electron-version`: Lvce release version to download, required for `--runtime=electron` when `--electron-path` is not provided
|
package/dist/main.js
CHANGED
|
@@ -120,7 +120,7 @@ const getHelpMessage = () => {
|
|
|
120
120
|
return `Usage: test-with-playwright [options]
|
|
121
121
|
|
|
122
122
|
Options:
|
|
123
|
-
--browser=<browser> Browser to run tests in: chromium or
|
|
123
|
+
--browser=<browser> Browser to run tests in: chromium, firefox, or webkit
|
|
124
124
|
--runtime=<runtime> Runtime to run tests in: browser or electron
|
|
125
125
|
--filter=<pattern> Only run tests matching the filter
|
|
126
126
|
--headless Run the browser in headless mode
|
|
@@ -456,6 +456,7 @@ const parseEnv = env => {
|
|
|
456
456
|
return options;
|
|
457
457
|
};
|
|
458
458
|
|
|
459
|
+
const browsers = ['chromium', 'firefox', 'webkit'];
|
|
459
460
|
const defaultOptions = {
|
|
460
461
|
browser: 'chromium',
|
|
461
462
|
extensionPath: '',
|
|
@@ -465,7 +466,7 @@ const defaultOptions = {
|
|
|
465
466
|
testPath: ''
|
|
466
467
|
};
|
|
467
468
|
const isBrowser = value => {
|
|
468
|
-
return value
|
|
469
|
+
return browsers.includes(value);
|
|
469
470
|
};
|
|
470
471
|
const isRuntime = value => {
|
|
471
472
|
return value === 'browser' || value === 'electron';
|
|
@@ -1797,7 +1798,7 @@ const runAllTests = async ({
|
|
|
1797
1798
|
// TODO use `using` once supported
|
|
1798
1799
|
const path = fileURLToPath(testWorkerUri);
|
|
1799
1800
|
const rpc = await create({
|
|
1800
|
-
argv: [],
|
|
1801
|
+
argv: [`--browser=${browser}`],
|
|
1801
1802
|
commandMap,
|
|
1802
1803
|
path,
|
|
1803
1804
|
stdio: 'inherit'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/test-with-playwright",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "CLI tool for running Playwright tests",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"main": "dist/main.js",
|
|
13
13
|
"bin": "bin/test-with-playwright.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@lvce-editor/test-with-playwright-worker": "
|
|
15
|
+
"@lvce-editor/test-with-playwright-worker": "21.0.0",
|
|
16
16
|
"@lvce-editor/test-worker": "^16.4.0"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|