test(web): regression specs — ⋯ Insights scopes to the open file and selected folder

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VbiaaVM2ACxeRi8ySG9ybc
This commit is contained in:
Snow Lee
2026-07-19 11:36:56 -07:00
co-authored by Claude Fable 5
parent 288b426e82
commit d18ad1fa91
@@ -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");
});