Ensure non multi-user flow stays

This commit is contained in:
Zimeng Xiong
2026-02-06 23:05:23 -08:00
parent 7aa33a1bdf
commit f214e4f7b7
12 changed files with 80 additions and 70 deletions
+1 -12
View File
@@ -1,4 +1,4 @@
import { test, expect, type Page, type BrowserContext } from "@playwright/test";
import { test, expect, type BrowserContext } from "@playwright/test";
import { createDrawing, deleteDrawing, getDrawing, updateDrawing } from "./helpers/api";
/**
@@ -12,16 +12,6 @@ import { createDrawing, deleteDrawing, getDrawing, updateDrawing } from "./helpe
* file data later" behavior seen with paste/import.
*/
const waitForEditorReady = async (page: Page) => {
await page.goto(page.url() || "/");
// Excalidraw renders a canvas; this is our "loaded" signal.
await page.waitForSelector("[class*='excalidraw'], canvas", { timeout: 15000 });
await page.waitForFunction(() => {
// @ts-expect-error - injected in dev build
return !!(window as any).__EXCALIDASH_EXCALIDRAW_API__;
});
};
const openEditorTab = async (context: BrowserContext, drawingId: string) => {
const page = await context.newPage();
await page.goto(`/editor/${drawingId}`);
@@ -249,4 +239,3 @@ test.describe("Issue #25 - image sync + deletion across tabs", () => {
await context.close();
});
});