Skip to content

Commit 56a40a5

Browse files
authored
fix: discard trace without path (microsoft#1836)
1 parent 7e2ac74 commit 56a40a5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

playwright/_impl/_local_utils.py

Lines changed: 1 addition & 1 deletion
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(

tests/async/test_tracing.py

Lines changed: 7 additions & 0 deletions
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)