Skip to content

Commit

Permalink
fix trace
Browse files Browse the repository at this point in the history
  • Loading branch information
midleman committed Nov 4, 2024
1 parent 235cbdd commit 90c88e2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/smoke/src/e2e/_test.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({
},
{ scope: 'test' }],

devTools: [async ({ app }, use) => {
await app.workbench.quickaccess.runCommand('workbench.action.toggleDevTools');
await use();
},
{ scope: 'test' }],

attachScreenshotsToReport: [async ({ app }, use, testInfo) => {
let screenShotCounter = 1;
const page = app.code.driver.page;
Expand Down Expand Up @@ -181,7 +187,8 @@ export const test = base.extend<TestFixtures, WorkerFixtures>({
await use(app);

// stop tracing
const title = 'trace';
// do NOT use title of'trace' as it will conflict with the default trace
const title = path.basename(`${testInfo.file}-trace`);
const tracePath = testInfo.outputPath(`${title}.zip`);
await app.stopTracing(title, true, tracePath);
testInfo.attachments.push({ name: 'trace', path: tracePath, contentType: 'application/zip' });
Expand Down Expand Up @@ -259,6 +266,7 @@ interface TestFixtures {
r: void;
python: void;
autoTestFixture: any;
devTools: void;
}

interface WorkerFixtures {
Expand Down

0 comments on commit 90c88e2

Please sign in to comment.