From d18ad1fa910a42b207044d4d91423b6f75abe8a6 Mon Sep 17 00:00:00 2001 From: Snow Lee Date: Sun, 19 Jul 2026 11:36:56 -0700 Subject: [PATCH] =?UTF-8?q?test(web):=20regression=20specs=20=E2=80=94=20?= =?UTF-8?q?=E2=8B=AF=20Insights=20scopes=20to=20the=20open=20file=20and=20?= =?UTF-8?q?selected=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01VbiaaVM2ACxeRi8ySG9ybc --- internal/webapp/frontend/e2e/scope.spec.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 internal/webapp/frontend/e2e/scope.spec.ts diff --git a/internal/webapp/frontend/e2e/scope.spec.ts b/internal/webapp/frontend/e2e/scope.spec.ts new file mode 100644 index 0000000..88d2aea --- /dev/null +++ b/internal/webapp/frontend/e2e/scope.spec.ts @@ -0,0 +1,22 @@ +import { test, expect } from "@playwright/test"; +import { login, wikiId } from "./helpers"; + +test("insights via ⋯ scopes to the open file", async ({ page }) => { + await login(page); + const pid = await wikiId(page); + await page.goto(`/${pid}/notes/readme.md`); + await page.click("#more-btn"); + await page.click("#more-menu .more-item:has-text('Insights')"); + await expect(page).toHaveURL(`/${pid}/insights/notes/readme.md`); + await expect(page.locator(".in-title .in-scope")).toContainText("notes/readme.md"); +}); + +test("insights via ⋯ scopes to the selected folder", async ({ page }) => { + await login(page); + const pid = await wikiId(page); + await page.goto(`/${pid}/notes`); + await page.click("#more-btn"); + await page.click("#more-menu .more-item:has-text('Insights')"); + await expect(page).toHaveURL(`/${pid}/insights/notes`); + await expect(page.locator(".in-title .in-scope")).toContainText("notes"); +});