mirror of
https://github.com/hanzoai/playwright.git
synced 2026-09-24 17:01:53 +00:00
test(mcp): de-flake webkit dashboard CLI tests (#41649)
This commit is contained in:
@@ -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 });
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user