mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-01 21:05:42 +09:00
fix: Restore Chromium fallback in E2E
This commit is contained in:
1 parent
588bd990f7
commit
88102ad3ee
1 file changed
+1
-14
@@ -14,11 +14,6 @@ const screenshotModuleUrl = new URL(
|
||||
const { createMcpPreviewHandlers } = await import(previewModuleUrl);
|
||||
const { createScreenshotCaptureSession } = await import(screenshotModuleUrl);
|
||||
|
||||
const browserPath = process.env.WEBSTUDIO_BROWSER_PATH;
|
||||
if (browserPath === undefined) {
|
||||
throw new Error("Expected the Playwright Chromium executable path");
|
||||
}
|
||||
|
||||
let url = "";
|
||||
|
||||
const previewHandlers = createMcpPreviewHandlers({
|
||||
@@ -31,15 +26,7 @@ const previewHandlers = createMcpPreviewHandlers({
|
||||
stop: async () => ({ running: false, url, mode: "iterative" as const }),
|
||||
},
|
||||
isStale: () => false,
|
||||
createCaptureSession: () => {
|
||||
const session = createScreenshotCaptureSession();
|
||||
return {
|
||||
...session,
|
||||
// The test runner already picked the Playwright Chromium executable.
|
||||
submitForm: (options: object) =>
|
||||
session.submitForm({ ...options, browserPath }),
|
||||
};
|
||||
},
|
||||
createCaptureSession: createScreenshotCaptureSession,
|
||||
});
|
||||
const server = await createProjectSessionMcpServer({
|
||||
operations: [],
|
||||
|
||||
Reference in new issue
Block a user