Normalize vfs (#558)

This commit is contained in:
Will Chen
2025-07-03 12:15:58 -07:00
committed by GitHub
parent 8260aa86e2
commit e3ea765de8
2 changed files with 98 additions and 109 deletions

View File

@@ -1,11 +1,11 @@
import { test, testSkipIfWindows } from "./helpers/test_helper";
import { test } from "./helpers/test_helper";
import { expect } from "@playwright/test";
import fs from "fs";
import path from "path";
const MINIMAL_APP = "minimal-with-ai-rules";
testSkipIfWindows("problems auto-fix - enabled", async ({ po }) => {
test("problems auto-fix - enabled", async ({ po }) => {
await po.setUp();
await po.importApp(MINIMAL_APP);
await po.expectPreviewIframeIsVisible();
@@ -18,41 +18,35 @@ testSkipIfWindows("problems auto-fix - enabled", async ({ po }) => {
await po.snapshotMessages({ replaceDumpPath: true });
});
testSkipIfWindows(
"problems auto-fix - gives up after 2 attempts",
async ({ po }) => {
await po.setUp();
await po.importApp(MINIMAL_APP);
await po.expectPreviewIframeIsVisible();
test("problems auto-fix - gives up after 2 attempts", async ({ po }) => {
await po.setUp();
await po.importApp(MINIMAL_APP);
await po.expectPreviewIframeIsVisible();
await po.sendPrompt("tc=create-unfixable-ts-errors");
await po.sendPrompt("tc=create-unfixable-ts-errors");
await po.snapshotServerDump("all-messages", { dumpIndex: -2 });
await po.snapshotServerDump("all-messages", { dumpIndex: -1 });
await po.snapshotServerDump("all-messages", { dumpIndex: -2 });
await po.snapshotServerDump("all-messages", { dumpIndex: -1 });
await po.page.getByTestId("problem-summary").last().click();
await expect(
po.page.getByTestId("problem-summary").last(),
).toMatchAriaSnapshot();
await po.snapshotMessages({ replaceDumpPath: true });
},
);
await po.page.getByTestId("problem-summary").last().click();
await expect(
po.page.getByTestId("problem-summary").last(),
).toMatchAriaSnapshot();
await po.snapshotMessages({ replaceDumpPath: true });
});
testSkipIfWindows(
"problems auto-fix - complex delete-rename-write",
async ({ po }) => {
await po.setUp();
await po.importApp(MINIMAL_APP);
await po.expectPreviewIframeIsVisible();
test("problems auto-fix - complex delete-rename-write", async ({ po }) => {
await po.setUp();
await po.importApp(MINIMAL_APP);
await po.expectPreviewIframeIsVisible();
await po.sendPrompt("tc=create-ts-errors-complex");
await po.sendPrompt("tc=create-ts-errors-complex");
await po.snapshotServerDump("all-messages", { dumpIndex: -2 });
await po.snapshotServerDump("all-messages", { dumpIndex: -1 });
await po.snapshotServerDump("all-messages", { dumpIndex: -2 });
await po.snapshotServerDump("all-messages", { dumpIndex: -1 });
await po.snapshotMessages({ replaceDumpPath: true });
},
);
await po.snapshotMessages({ replaceDumpPath: true });
});
test("problems auto-fix - disabled", async ({ po }) => {
await po.setUp({ disableAutoFixProblems: true });