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: 1 addition & 1 deletion tests/installation/npmTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const expect = _expect.extend({
const downloaded = new Set();
let index = 0;
while (true) {
const match = received.substring(index).match(/\(playwright (chromium|chromium-headless-shell|firefox|webkit|winldd|ffmpeg) v\d+\) downloaded/im);
const match = received.substring(index).match(/\(playwright (chromium|chromium-headless-shell|firefox|webkit|winldd|ffmpeg) v(?:tot-)?\d+\) downloaded/im);
if (!match)
break;
downloaded.add(match[1].replace(/\s/g, '-').toLowerCase());
Expand Down
4 changes: 2 additions & 2 deletions tests/mcp/cli-misc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test('daemon shuts down on browser launch failure', async ({ cli, server }) => {
test('install-browser', async ({ cli, server, mcpBrowser }) => {
test.skip(mcpBrowser !== 'chromium', 'Test only chromium');
const { output } = await cli('install-browser', '--list');
expect(output).toMatch(/chromium-\d+/);
expect(output).toMatch(/chromium-(tot-)?\d+/);
});

test('install-browser --no-shell', async ({ cli }) => {
Expand All @@ -39,7 +39,7 @@ test('install-browser --no-shell', async ({ cli }) => {
expect(withShell.output).toContain('chromium-headless-shell');
const noShell = await cli('install-browser', 'chromium', '--no-shell', '--dry-run');
expect(noShell.exitCode).toBe(0);
expect(noShell.output).toMatch(/chromium v\d+/);
expect(noShell.output).toMatch(/chromium v(tot-)?\d+/);
expect(noShell.output).not.toContain('chromium-headless-shell');
});

Expand Down
4 changes: 2 additions & 2 deletions tests/mcp/launch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ test('surfaces the missing browser executable path so a version mismatch is diag
arguments: { url: server.HELLO_WORLD },
});
// The surfaced path must include the version-specific browser directory
// (e.g. chromium-1234) — that's the detail that reveals a version mismatch,
// (e.g. chromium-1234 or chromium-tot-1234) — that's the detail that reveals a version mismatch,
// as opposed to a generic "not installed".
const escapeRegExp = (s: string) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
expect.soft(response).toHaveResponse({
Expand All @@ -112,7 +112,7 @@ test('surfaces the missing browser executable path so a version mismatch is diag
});
expect.soft(response).toHaveResponse({
isError: true,
error: expect.stringMatching(new RegExp(escapeRegExp(emptyBrowsersPath) + String.raw`[\\/][\w.]+-\d+[\\/]`)),
error: expect.stringMatching(new RegExp(escapeRegExp(emptyBrowsersPath) + String.raw`[\\/][\w.]+-(tot-)?\d+[\\/]`)),
});
});

Expand Down
Loading