Skip to content

feat(editor): component tests#3140

Open
cassiozen wants to merge 5 commits intocanaryfrom
feat/editor-component-tests
Open

feat(editor): component tests#3140
cassiozen wants to merge 5 commits intocanaryfrom
feat/editor-component-tests

Conversation

@cassiozen
Copy link
Copy Markdown

@cassiozen cassiozen commented Mar 31, 2026

Sets up component testing using Vitest for the editor (alongside existing happy-dom unit tests).


Summary by cubic

Adds Chromium-backed component tests for the editor using vitest + Playwright, alongside existing happy-dom unit tests. Migrates prior e2e flows into fast component specs; CI installs Chromium so tests run in GitHub Actions.

  • New Features

    • Two-project vitest setup: test:unit (happy-dom) and test:browser (Chromium via Playwright); pnpm test runs both.
    • Vite aliases stub @react-email/render and @react-email/markdown; adds lightweight TestEditor and helpers for real ClipboardEvents.
    • Browser specs cover load/edit, slash commands (Title, Bullet list), bold/italic/underline shortcuts, paste of text/HTML into empty and non-empty docs, and BubbleMenuItem aria/click behavior.
  • Dependencies

    • Added @vitejs/plugin-react, @vitest/browser-playwright, vitest-browser-react, and playwright.

Written for commit 4c39c36. Summary will update on new commits.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 31, 2026

⚠️ No Changeset found

Latest commit: 4c39c36

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 31, 2026

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

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment Mar 31, 2026 3:05am
react-email-demo Ready Ready Preview, Comment Mar 31, 2026 3:05am
react-email-examples Ready Ready Preview, Comment Mar 31, 2026 3:05am

Request Review

@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 31, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedhtml-to-ast@​0.0.6831009980100
Addedhtml-to-text@​9.0.59910010082100
Added@​vitest/​browser-playwright@​4.0.17991008698100

View full report

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 31, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3140

commit: 058527e

cubic-dev-ai[bot]

This comment was marked as outdated.

cubic-dev-ai[bot]

This comment was marked as resolved.

@cassiozen
Copy link
Copy Markdown
Author

@cubic-dev-ai, re-run a review.

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Mar 31, 2026

@cubic-dev-ai, re-run a review.

@cassiozen I have started the AI code review. It will take a few minutes to complete.

cubic-dev-ai[bot]

This comment was marked as resolved.

@cassiozen
Copy link
Copy Markdown
Author

@cubic-dev-ai, re-run a review.

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Mar 31, 2026

@cubic-dev-ai, re-run a review.

@cassiozen I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 10 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

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.

1 participant