Attach image e2e tests (#301)

This commit is contained in:
Will Chen
2025-06-01 00:44:19 -07:00
committed by GitHub
parent 440482356b
commit c0adf8d3f2
10 changed files with 137 additions and 25 deletions

View File

@@ -0,0 +1,30 @@
import { test } from "./helpers/test_helper";
// attach image is implemented in two separate components
// - HomeChatInput
// - ChatInput
// so we need to test both
test("attach image - home chat", async ({ po }) => {
await po.setUp();
await po
.getHomeChatInputContainer()
.locator("input[type='file']")
.setInputFiles("e2e-tests/fixtures/images/logo.png");
await po.sendPrompt("[dump]");
await po.snapshotServerDump({ onlyLastMessage: true });
await po.snapshotMessages({ replaceDumpPath: true });
});
test("attach image - chat", async ({ po }) => {
await po.setUp({ autoApprove: true });
await po.sendPrompt("basic");
await po
.getChatInputContainer()
.locator("input[type='file']")
.setInputFiles("e2e-tests/fixtures/images/logo.png");
await po.sendPrompt("[dump]");
await po.snapshotServerDump({ onlyLastMessage: true });
await po.snapshotMessages({ replaceDumpPath: true });
});