fix(tracing): when zipping remotely, use correct file name (#23171)

Fixes #23108.
This commit is contained in:
Dmitry Gozman 2023-05-19 14:42:01 -07:00 committed by GitHub
parent 8fee175896
commit bd33e5f8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View File

@ -43,6 +43,7 @@ class PlaywrightClient {
},
});
this._driverProcess.unref();
this._driverProcess.stderr!.on('data', data => process.stderr.write(data));
const connection = new Connection();
connection.markAsRemote();

View File

@ -324,7 +324,7 @@ export class Tracing extends SdkObject implements InstrumentationListener, Snaps
for (const entry of entries)
zipFile.addFile(entry.value, entry.name);
zipFile.end();
const zipFileName = state.traceFile + '.zip';
const zipFileName = state.traceFile.file + '.zip';
zipFile.outputStream.pipe(fs.createWriteStream(zipFileName)).on('close', () => {
const artifact = new Artifact(this._context, zipFileName);
artifact.reportFinished();

View File

@ -578,7 +578,6 @@ test('should record global request trace', async ({ request, context, server },
});
test('should store global request traces separately', async ({ request, server, playwright, browserName, mode }, testInfo) => {
test.fixme(browserName === 'chromium' && mode === 'driver', 'https://github.com/microsoft/playwright/issues/23108');
const request2 = await playwright.request.newContext();
await Promise.all([
(request as any)._tracing.start({ snapshots: true }),