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
1 change: 1 addition & 0 deletions tests/mcp/annotate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ test('user-initiated annotate downloads zip with feedback.md', async ({ connectT
});

test('should capture annotations via show --annotate', async ({ connectToDashboard, cli, server }) => {
test.slow();
await cli('open', server.EMPTY_PAGE);
const bindTitle = `--playwright-internal--${crypto.randomUUID()}`;
await cli('show', { bindTitle });
Expand Down
15 changes: 10 additions & 5 deletions tests/mcp/cli-killall.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@ test('kill-all kills filtered dashboard pid', async ({ cli }) => {
expect(dashboardPid).toBeDefined();
await expect.poll(() => isAlive(dashboardPid)).toBe(true);

const { output } = await cli('kill-all', {
env: { PWTEST_KILL_ALL_PID_FILTER_FOR_TEST: String(dashboardPid) },
});
expect(output).toContain(`Killed daemon process ${dashboardPid}`);
expect(output).toContain('Killed 1 daemon process.');
// kill-all discovers daemons via `execSync('ps auxww')` and treats any failure

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not confident that it is what actually happens, but it is worth trying.

// (including a swallowed spawn error under load) as "no processes found", so a
// single call can miss a live daemon. Retry until it observes and kills it.
await expect(async () => {
const { output } = await cli('kill-all', {
env: { PWTEST_KILL_ALL_PID_FILTER_FOR_TEST: String(dashboardPid) },
});
expect(output).toContain(`Killed daemon process ${dashboardPid}`);
expect(output).toContain('Killed 1 daemon process.');
}).toPass();

await expect.poll(() => isAlive(dashboardPid)).toBe(false);
});
Loading