refresh e2e (#307)

This commit is contained in:
Will Chen
2025-06-02 15:53:06 -07:00
committed by GitHub
parent 46d398b4e9
commit e905e9e10f
4 changed files with 46 additions and 0 deletions

19
e2e-tests/refresh.spec.ts Normal file
View File

@@ -0,0 +1,19 @@
import { test } from "./helpers/test_helper";
test("refresh app", async ({ po }) => {
await po.setUp({ autoApprove: true });
await po.sendPrompt("hi");
// Drop the document.body inside the contentFrame to make
// sure refresh works.
await po
.getPreviewIframeElement()
.contentFrame()
.locator("body")
.evaluate((body) => {
body.remove();
});
await po.clickPreviewRefresh();
await po.snapshotPreview();
});