test(mcp): de-flake webkit dashboard CLI tests (#41649)

This commit is contained in:
Yury Semikhatsky
2026-07-06 16:52:20 -07:00
committed by GitHub
parent ac0e09da44
commit d6bc3acaa8
2 changed files with 11 additions and 5 deletions
+1
View File
@@ -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 });
+10 -5
View File
@@ -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
// (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);
});