Skip to content

Commit

Permalink
fix: wrong context is passed to close the trace of session (#3698)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Jun 25, 2023
1 parent bcf1cbb commit 71cbd92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helper/Playwright.js
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ class Playwright extends Helper {
test.artifacts.trace = await saveTraceForContext(this.browserContext, `${test.title}.failed`);
for (const sessionName in this.sessionPages) {
if (!this.sessionPages[sessionName].context) continue;
test.artifacts[`trace_${sessionName}`] = await saveTraceForContext(this.sessionPages[sessionName].context(), `${test.title}_${sessionName}.failed`);
test.artifacts[`trace_${sessionName}`] = await saveTraceForContext(this.sessionPages[sessionName].context, `${test.title}_${sessionName}.failed`);
}
}
}
Expand All @@ -2197,7 +2197,7 @@ class Playwright extends Helper {
test.artifacts.trace = await saveTraceForContext(this.browserContext, `${test.title}.passed`);
for (const sessionName in this.sessionPages) {
if (!this.sessionPages[sessionName].context) continue;
test.artifacts[`trace_${sessionName}`] = await saveTraceForContext(this.sessionPages[sessionName].context(), `${test.title}_${sessionName}.passed`);
test.artifacts[`trace_${sessionName}`] = await saveTraceForContext(this.sessionPages[sessionName].context, `${test.title}_${sessionName}.passed`);
}
}
} else {
Expand Down

0 comments on commit 71cbd92

Please sign in to comment.