Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(mcp): return posix-style seed path from journal (#38358)

Dmitry Gozman3a5a32d26da3
diff --git a/packages/playwright/src/mcp/test/testContext.ts b/packages/playwright/src/mcp/test/testContext.ts
index dc17cd2133..4d5a8f3473 100644
--- a/packages/playwright/src/mcp/test/testContext.ts
+++ b/packages/playwright/src/mcp/test/testContext.ts
@@ -18,7 +18,7 @@ import fs from 'fs';
import os from 'os';
import path from 'path';
-import { noColors, escapeRegExp, ManualPromise } from 'playwright-core/lib/utils';
+import { noColors, escapeRegExp, ManualPromise, toPosixPath } from 'playwright-core/lib/utils';
import { terminalScreen } from '../../reporters/base';
import ListReporter from '../../reporters/list';
@@ -64,7 +64,7 @@ export class GeneratorJournal {
const result: string[] = [];
result.push(`# Plan`);
result.push(this._plan);
- result.push(`# Seed file: ${path.relative(this._rootPath, this._seed.file)}`);
+ result.push(`# Seed file: ${toPosixPath(path.relative(this._rootPath, this._seed.file))}`);
result.push('```ts');
result.push(this._seed.content);
result.push('```');