From 270a09bf00f7170c5c038f8c1138ce75842e75e7 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Date: Fri, 14 Aug 2026 09:02:31 +0000 Subject: [PATCH] test(e2e): disambiguate New now that the tree can make a page too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release check failed on `getByRole("button", { name: "New" })`: Playwright matches accessible names by substring, and the sidebar's "New page" is now a second match. Made exact. Caught by the release job rather than by `pnpm e2e`, which does not run first-run — it drives a built bundle against an empty vault, and that is the only place the two buttons appear on screen together. --- apps/web/e2e/first-run.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/e2e/first-run.mjs b/apps/web/e2e/first-run.mjs index a876b72..14b1a18 100644 --- a/apps/web/e2e/first-run.mjs +++ b/apps/web/e2e/first-run.mjs @@ -124,7 +124,9 @@ if (!/speech model/i.test(shell)) fail("nothing warned that recognition is unava // an app that reads and never writes — which is exactly what shipped once. await nav.getByRole("button", { name: "Notes" }).click(); await page.waitForTimeout(500); -await page.getByRole("button", { name: "New" }).click(); +// `exact`, because the sidebar now offers "New page" as well: a page and a note are the same +// thing, and the tree can make one too. Without it this matches both and Playwright refuses. +await page.getByRole("button", { name: "New", exact: true }).click(); await page.waitForTimeout(700); const box = page.getByRole("textbox", { name: "Note body" });