test: add E2E tests for markdown import and export (#112)#116
Merged
Conversation
Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
✅ Post-merge verification skipped — |
Collaborator
Author
|
✅ UI verification skipped — no UI files changed. This PR only adds E2E tests ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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
.mdfile contains the expected markdown (heading, paragraph text, list items).Import test: Sets a
.mdfile 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
authenticatedPagefixture 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 ineditor-drag.spec.tsandeditor-slash-commands.spec.tsdue to test parallelism (shared test user content bleeding across tests) — unrelated to this change.