Advance WebGPU volume and bounded workflows
This commit is contained in:
29
web/tests/e2e/network-interruption.spec.ts
Normal file
29
web/tests/e2e/network-interruption.spec.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
import path from "node:path";
|
||||
|
||||
const basicBlend = path.resolve(import.meta.dirname, "../../../tests/files/web/basic_scene.blend");
|
||||
|
||||
test("keeps Main edit and save-reopen available during a Chromium network interruption", async ({ context, page }) => {
|
||||
await page.goto("/");
|
||||
await expect(page.getByTestId("engine-status")).toContainText("Engine: ready", { timeout: 20_000 });
|
||||
await page.setInputFiles("[data-testid=blend-file-input]", basicBlend);
|
||||
await expect(page.getByTestId("scene-stats")).toContainText("Objects 3");
|
||||
|
||||
await context.setOffline(true);
|
||||
try {
|
||||
await page.getByRole("button", { name: "添加立方体" }).click();
|
||||
await expect(page.getByTestId("engine-status")).toContainText("SceneIR r2 (4 objects)");
|
||||
const downloadPromise = page.waitForEvent("download");
|
||||
await page.getByRole("button", { name: "保存项目" }).click();
|
||||
const download = await downloadPromise;
|
||||
expect(download.suggestedFilename()).toBe("blender-web.blend");
|
||||
const savedPath = await download.path();
|
||||
expect(savedPath).not.toBeNull();
|
||||
await page.setInputFiles("[data-testid=blend-file-input]", savedPath!);
|
||||
await expect(page.getByTestId("engine-status")).toContainText("SceneIR r3 (4 objects)");
|
||||
await expect(page.getByTestId("scene-stats")).toContainText("Objects 4");
|
||||
}
|
||||
finally {
|
||||
await context.setOffline(false);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user