Skip to content

test: add E2E tests for image upload in editor (#223)#230

Merged
zacharias-ona merged 1 commit into
mainfrom
feat/223-e2e-image-upload
Apr 18, 2026
Merged

test: add E2E tests for image upload in editor (#223)#230
zacharias-ona merged 1 commit into
mainfrom
feat/223-e2e-image-upload

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #223

What

Adds E2E test coverage for the /image slash command in the editor. Image upload involves file input handling, network requests to Supabase Storage, and DOM rendering — behaviors that can only be properly tested in a real browser.

How

  • Test fixture: 1x1 PNG (69 bytes) at e2e/fixtures/test-image.png
  • Test 1 — insert and render: Opens slash menu, selects Image, intercepts the file chooser with Playwright's waitForEvent("filechooser"), provides the test image, and verifies the <img> renders with a page-images storage URL.
  • Test 2 — persistence after reload: Same insertion flow, then waits for the auto-save PATCH to complete, reloads the page, and verifies the same image URL is still rendered.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test — 252 passed ✅
  • pnpm test:e2e — 61 passed (including 2 new) ✅

Co-authored-by: Ona <no-reply@ona.com>
@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:50am

Request Review

@zacharias-ona zacharias-ona merged commit d576c90 into main Apr 18, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the feat/223-e2e-image-upload branch April 18, 2026 07:57
@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 (only E2E test files).

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 image upload in editor

1 participant