@playwright/test 1.36.0-alpha-jun-25-2023 → 1.36.0-alpha-jun-27-2023
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/lib/runner/uiMode.js +11 -10
- package/package.json +2 -2
package/lib/runner/uiMode.js
CHANGED
|
@@ -89,15 +89,10 @@ class UIMode {
|
|
|
89
89
|
return status;
|
|
90
90
|
}
|
|
91
91
|
async showUI(options) {
|
|
92
|
-
const exitPromise = new _utils.ManualPromise();
|
|
93
92
|
let queue = Promise.resolve();
|
|
94
93
|
this._transport = {
|
|
95
94
|
dispatch: async (method, params) => {
|
|
96
95
|
if (method === 'ping') return;
|
|
97
|
-
if (method === 'exit') {
|
|
98
|
-
exitPromise.resolve();
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
96
|
if (method === 'watch') {
|
|
102
97
|
this._watchFiles(params.fileNames);
|
|
103
98
|
return;
|
|
@@ -120,16 +115,22 @@ class UIMode {
|
|
|
120
115
|
queue = queue.then(() => this._queueListOrRun(method, params));
|
|
121
116
|
await queue;
|
|
122
117
|
},
|
|
123
|
-
onclose: () =>
|
|
118
|
+
onclose: () => {}
|
|
124
119
|
};
|
|
125
|
-
|
|
120
|
+
const openOptions = {
|
|
126
121
|
app: 'uiMode.html',
|
|
127
122
|
headless: (0, _utils.isUnderTest)() && process.env.PWTEST_HEADED_FOR_TEST !== '1',
|
|
128
123
|
transport: this._transport,
|
|
129
124
|
host: options.host,
|
|
130
|
-
port: options.port
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
port: options.port
|
|
126
|
+
};
|
|
127
|
+
const exitPromise = new _utils.ManualPromise();
|
|
128
|
+
if (options.host !== undefined || options.port !== undefined) {
|
|
129
|
+
await (0, _server.openTraceInBrowser)([], openOptions);
|
|
130
|
+
} else {
|
|
131
|
+
const page = await (0, _server.openTraceViewerApp)([], 'chromium', openOptions);
|
|
132
|
+
page.on('close', () => exitPromise.resolve());
|
|
133
|
+
}
|
|
133
134
|
if (!process.env.PWTEST_DEBUG) {
|
|
134
135
|
process.stdout.write = chunk => {
|
|
135
136
|
this._dispatchEvent('stdio', chunkToPayload('stdout', chunk));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright/test",
|
|
3
|
-
"version": "1.36.0-alpha-jun-
|
|
3
|
+
"version": "1.36.0-alpha-jun-27-2023",
|
|
4
4
|
"description": "A high-level API to automate web browsers",
|
|
5
5
|
"repository": "github:Microsoft/playwright",
|
|
6
6
|
"homepage": "https://playwright.dev",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"license": "Apache-2.0",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@types/node": "*",
|
|
44
|
-
"playwright-core": "1.36.0-alpha-jun-
|
|
44
|
+
"playwright-core": "1.36.0-alpha-jun-27-2023"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
47
|
"fsevents": "2.3.2"
|