Skip to content

cherry-pick(#1836): fix: discard trace without path #1838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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