Skip to content
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: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ When creating or moving files, update the relevant `DEPS.list` to declare allowe

## Commit Convention

Before committing, run `npm run flint` and fix errors.

Semantic commit messages: `label(scope): description`

Labels: `fix`, `feat`, `chore`, `docs`, `test`, `devops`
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/class-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ To specify the final trace zip file name, you need to pass `path` option to

## async method: Tracing.group
* since: v1.49
- returns: <[Disposable]>

:::caution
Use `test.step` instead when available.
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-client/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21957,7 +21957,7 @@ export interface Tracing {

column?: number;
};
}): Promise<void>;
}): Promise<Disposable>;

/**
* Closes the last group created by
Expand Down
2 changes: 2 additions & 0 deletions packages/playwright-core/src/client/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { Artifact } from './artifact';
import { ChannelOwner } from './channelOwner';
import { DisposableStub } from './disposable';

import type * as api from '../../types/types';
import type * as channels from '@protocol/channels';
Expand Down Expand Up @@ -62,6 +63,7 @@ export class Tracing extends ChannelOwner<channels.TracingChannel> implements ap
if (options.location)
this._additionalSources.add(options.location.file);
await this._channel.tracingGroup({ name, location: options.location });
return new DisposableStub(() => this.groupEnd());
}

async groupEnd() {
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21957,7 +21957,7 @@ export interface Tracing {

column?: number;
};
}): Promise<void>;
}): Promise<Disposable>;

/**
* Closes the last group created by
Expand Down
4 changes: 2 additions & 2 deletions tests/library/screencast.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ test('screencast.start dispose stops screencast', async ({ browser, server, trac
const page = await context.newPage();

const frames: { data: Buffer }[] = [];
page.screencast().on('screencastframe', frame => frames.push(frame));
page.screencast.on('screencastframe', frame => frames.push(frame));

const disposable = await page.screencast().start({ maxSize: { width: 500, height: 400 } });
const disposable = await page.screencast.start({ maxSize: { width: 500, height: 400 } });
await page.goto(server.EMPTY_PAGE);
await page.evaluate(() => document.body.style.backgroundColor = 'red');
await rafraf(page, 100);
Expand Down
Loading