Unverified 提交 fe597db5 authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

harden app files snapshot (#486)

上级 87a0de43
......@@ -4,5 +4,5 @@ testSkipIfWindows("dyad tags handles nested < tags", async ({ po }) => {
await po.setUp({ autoApprove: true });
await po.importApp("minimal");
await po.sendPrompt("tc=dyad-write-angle");
await po.snapshotAppFiles();
await po.snapshotAppFiles({ name: "angle-tags-handled" });
});
......@@ -285,7 +285,7 @@ export class PageObject {
await expect(this.page.getByRole("dialog")).toMatchAriaSnapshot();
}
async snapshotAppFiles({ name }: { name?: string } = {}) {
async snapshotAppFiles({ name }: { name: string }) {
const currentAppName = await this.getCurrentAppName();
if (!currentAppName) {
throw new Error("No app selected");
......
......@@ -8,5 +8,5 @@ test("partial message is resumed", async ({ po }) => {
// This is a special test case which triggers a dump.
await po.snapshotServerDump("all-messages");
await po.snapshotMessages({ replaceDumpPath: true });
await po.snapshotAppFiles();
await po.snapshotAppFiles({ name: "message-resumed" });
});
......@@ -61,7 +61,7 @@ testSkipIfWindows("upgrade app to select component", async ({ po }) => {
await po.expectAppUpgradeButtonIsNotVisible({
upgradeId: "component-tagger",
});
await po.snapshotAppFiles();
await po.snapshotAppFiles({ name: "app-upgraded" });
await po.clickOpenInChatButton();
// There should be another version from the upgrade being committed.
await expect(po.page.getByText("Version 2")).toBeVisible();
......
===
role: user
message: [dump] make it smaller
Selected component: h1 (file: src/pages/Index.tsx)
Snippet:
```
<header className="flex-1 flex flex-col items-center justify-center px-4 py-16">
<h1 className="text-5xl font-extrabold mb-4 text-foreground text-center"> // <-- EDIT HERE
Launch Your Next Project
</h1>
<p className="text-xl text-muted-foreground mb-8 text-center max-w-xl">
```
\ No newline at end of file
......@@ -11,5 +11,5 @@ testSkipIfWindows("supabase client is generated", async ({ po }) => {
await po.clickBackButton();
await po.sendPrompt("tc=generate-supabase-client");
await po.snapshotAppFiles();
await po.snapshotAppFiles({ name: "supabase-client-generated" });
});
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论