chore: show download link on the status mismatch page (#928)

<img width="610" height="108" alt="image"
src="https://github.com/user-attachments/assets/bc1f7534-f282-44f0-bb58-e385b2bf82af"
/>
This commit is contained in:
Yury Semikhatsky
2025-08-22 09:10:53 -07:00
committed by GitHub
parent 94ca0763d5
commit fb65bc7559
3 changed files with 52 additions and 8 deletions

View File

@@ -233,12 +233,18 @@ for (const [mode, startClientMethod] of [
});
const confirmationPage = await confirmationPagePromise;
await expect(confirmationPage.locator('.status-banner')).toHaveText(`Incompatible Playwright MCP version: ${packageJSON.version} (extension version: 0.0.1). Please install the latest version of the extension. See installation instructions.`);
await expect(confirmationPage.locator('.status-banner')).toHaveText(`Incompatible Playwright MCP version: ${packageJSON.version} (extension version: 0.0.1). Click here to download the matching extension, then drag and drop it into the Chrome Extensions page. See installation instructions for more details.`);
expect(await navigateResponse).toHaveResponse({
result: expect.stringContaining('Extension connection timeout.'),
isError: true,
});
const downloadPromise = confirmationPage.waitForEvent('download');
await confirmationPage.locator('.status-banner').getByRole('button', { name: 'Click here' }).click();
const download = await downloadPromise;
expect(download.url()).toBe(`https://github.com/microsoft/playwright-mcp/releases/download/v0.0.1/playwright-mcp-extension-v0.0.1.zip`);
await download.cancel();
});
}