Skip to content

Commit d6b4c1a

Browse files
authored
cherry-pick(#1836): fix: discard trace without path (#1838)
1 parent 7e2ac74 commit d6b4c1a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: playwright/_impl/_local_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async def tracing_started(self, tracesDir: Optional[str], traceName: str) -> str
6363
return await self._channel.send("tracingStarted", params)
6464

6565
async def trace_discarded(self, stacks_id: str) -> None:
66-
return await self._channel.send("traceDiscarded", {"stacks_id": stacks_id})
66+
return await self._channel.send("traceDiscarded", {"stacksId": stacks_id})
6767

6868
def add_stack_to_tracing_no_reply(self, id: int, frames: List[StackFrame]) -> None:
6969
self._channel.send_no_reply(

Diff for: tests/async/test_tracing.py

+7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ async def test_browser_context_output_trace(
3333
assert Path(tmp_path / "trace.zip").exists()
3434

3535

36+
async def test_start_stop(browser: Browser):
37+
context = await browser.new_context()
38+
await context.tracing.start()
39+
await context.tracing.stop()
40+
await context.close()
41+
42+
3643
async def test_browser_context_should_not_throw_when_stopping_without_start_but_not_exporting(
3744
context: BrowserContext, server: Server, tmp_path: Path
3845
):

0 commit comments

Comments
 (0)