Skip to content

Commit

Permalink
fix: discard trace without path (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Mar 28, 2023
1 parent 7e2ac74 commit 56a40a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion playwright/_impl/_local_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def tracing_started(self, tracesDir: Optional[str], traceName: str) -> str
return await self._channel.send("tracingStarted", params)

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

def add_stack_to_tracing_no_reply(self, id: int, frames: List[StackFrame]) -> None:
self._channel.send_no_reply(
Expand Down
7 changes: 7 additions & 0 deletions tests/async/test_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ async def test_browser_context_output_trace(
assert Path(tmp_path / "trace.zip").exists()


async def test_start_stop(browser: Browser):
context = await browser.new_context()
await context.tracing.start()
await context.tracing.stop()
await context.close()


async def test_browser_context_should_not_throw_when_stopping_without_start_but_not_exporting(
context: BrowserContext, server: Server, tmp_path: Path
):
Expand Down

0 comments on commit 56a40a5

Please sign in to comment.