diff --git a/frontend/tests/clipboard.spec.ts b/frontend/tests/clipboard.spec.ts index 4aa42f9..fa574cd 100644 --- a/frontend/tests/clipboard.spec.ts +++ b/frontend/tests/clipboard.spec.ts @@ -65,7 +65,10 @@ test("the canvas clipboard yields to the native one", async ({ page }) => { // A text selection wins, node selection or not. React Flow's own CSS puts // `user-select: none` on every node, so the selectable text on this route is - // the floating chrome over the canvas — here the open node panel. + // the floating chrome over the canvas — here the open node panel. The paste + // opened the copy's panel, and the original's is still sliding out in front + // of it: a selection made in that one collapses when it unmounts. + await expect(page.getByTestId("node-panel")).toHaveCount(1) const selected = await page.evaluate(() => { const node = document.querySelector( '[data-testid="node-panel"]', diff --git a/frontend/tests/values.spec.ts b/frontend/tests/values.spec.ts index 2ce3b1a..96ce123 100644 --- a/frontend/tests/values.spec.ts +++ b/frontend/tests/values.spec.ts @@ -83,8 +83,11 @@ test("a dictionary shows its shape, and its contents on request", async ({ await expect(summary).toContainText("record · 3 fields") await expect(panel).not.toContainText("Recovered") - // A value cannot push the panel open, however long it is. - expect((await panel.boundingBox())?.width).toBe(PANEL_WIDTH) + // A value cannot push the panel open, however long it is. Polled, because + // the panel slides in and a box read mid-slide is a hair off 400. + await expect + .poll(async () => (await panel.boundingBox())?.width) + .toBe(PANEL_WIDTH) // The contents are one click away. await summary.click()