diff --git a/tests/folding.spec.js b/tests/folding.spec.js index 8072131..0bc85f2 100644 --- a/tests/folding.spec.js +++ b/tests/folding.spec.js @@ -65,4 +65,20 @@ This is a markdown block const content = await heynotePage.getContent() expect(content).toContain("abc test") }); + + test("block can be folded", async ({ page }) => { + // Position cursor in first block (which has multiple lines) + await heynotePage.setCursorPosition(20) // Middle of Block A + + // Verify no fold placeholder exists initially + await expect(page.locator(".cm-foldPlaceholder")).not.toBeVisible() + + // Fold block using keyboard shortcut + const foldKey = heynotePage.isMac ? "Alt+Meta+[" : "Ctrl+Shift+[" + await page.locator("body").press(foldKey) + await page.waitForTimeout(100) + + // Verify block is folded by checking for fold placeholder + await expect(page.locator(".cm-foldPlaceholder")).toBeVisible() + }); }); \ No newline at end of file