Skip to content

test: add E2E tests for markdown shortcuts in editor (#224)#231

Merged
zacharias-ona merged 1 commit into
mainfrom
feat/224-e2e-markdown-shortcuts
Apr 18, 2026
Merged

test: add E2E tests for markdown shortcuts in editor (#224)#231
zacharias-ona merged 1 commit into
mainfrom
feat/224-e2e-markdown-shortcuts

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #224

What

Adds E2E Playwright tests verifying that Lexical's MarkdownShortcutPlugin correctly transforms markdown syntax as the user types in the editor.

Tests added

Shortcut Expected result Verified
# at line start Converts to <h1>
> at line start Converts to <blockquote>
- at line start Converts to <ul><li>
``` + Space Converts to <code> block

Each test creates a fresh page via navigateToEditorPage, types the markdown shortcut, then asserts the DOM element type changed and typed content renders inside the new block.

How

  • Follows existing E2E patterns from editor-slash-commands.spec.ts and editor-toolbar.spec.ts
  • Uses authenticatedPage fixture and navigateToEditorPage helper
  • Uses unique Date.now() markers to avoid matching pre-existing content

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test — 252 unit tests pass ✅
  • pnpm test:e2e — 66 E2E tests pass (including 4 new) ✅

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 18, 2026 7:58am

Request Review

@zacharias-ona zacharias-ona merged commit 27ca5f9 into main Apr 18, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the feat/224-e2e-markdown-shortcuts branch April 18, 2026 08:00
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ UI verification skipped — no UI files changed. This PR only adds E2E tests (e2e/editor-markdown-shortcuts.spec.ts).

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification skipped — test: PR does not affect the live app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add E2E tests for markdown shortcuts in editor

1 participant