Skip to content

test: add E2E tests for markdown import and export (#112)#116

Merged
zacharias-ona merged 1 commit into
mainfrom
feat/112-e2e-import-export-markdown
Apr 16, 2026
Merged

test: add E2E tests for markdown import and export (#112)#116
zacharias-ona merged 1 commit into
mainfrom
feat/112-e2e-import-export-markdown

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #112

What

Adds E2E tests covering the full user flow for markdown export and import via the page menu.

How

Two Playwright tests in e2e/import-export.spec.ts:

  1. Export test: Creates a page with structured content (heading, paragraph, bullet list) via slash commands, then exports via the page menu. Intercepts the download and verifies the .md file contains the expected markdown (heading, paragraph text, list items).

  2. Import test: Sets a .md file on the hidden file input (heading, bold/italic paragraph, bullet list, code block, link). Verifies navigation to the new page, then checks the editor renders all block types correctly — heading text, formatted paragraph, list items, code block content, and a link with the correct href. Also verifies the page title matches the imported filename.

Both tests use the authenticatedPage fixture and scope the page menu locator to <main> to avoid ambiguity with sidebar "Page actions" buttons.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test ✅ (58 tests)
  • pnpm test:e2e — both new tests pass. 3 pre-existing flaky failures in editor-drag.spec.ts and editor-slash-commands.spec.ts due to test parallelism (shared test user content bleeding across tests) — unrelated to this change.

Co-authored-by: Ona <no-reply@ona.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

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

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 16, 2026 10:10pm

Request Review

@zacharias-ona zacharias-ona merged commit 3f3f5ee into main Apr 16, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the feat/112-e2e-import-export-markdown branch April 16, 2026 22:12
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

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

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

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

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 test for markdown import and export

1 participant