Skip to content

test: set up Playwright e2e with base64 specs#19

Merged
rivodotlove merged 1 commit into
mainfrom
test/init-e2e-playwright
Jun 3, 2026
Merged

test: set up Playwright e2e with base64 specs#19
rivodotlove merged 1 commit into
mainfrom
test/init-e2e-playwright

Conversation

@rivodotlove

@rivodotlove rivodotlove commented Jun 3, 2026

Copy link
Copy Markdown
Owner

What

Bootstraps end-to-end testing with @playwright/test and adds the first suite.

  • playwright.config.tstestDir: e2e, baseURL on port 15036, auto-starts vp dev and reuses an existing server.
  • e2e/base64.e2e.ts — 5 specs for the Base64 tool: encode, decode, URL-safe padding strip, invalid-base64 error state, input persistence across reload.
  • test:e2e script (vp run test:e2e / pnpm exec playwright test).
  • tsconfig.node.json includes e2e + playwright.config.ts so they typecheck.
  • .gitignore for Playwright artifacts; fmt.ignorePatterns so Oxfmt skips generated plan HTML.

Why

No e2e coverage existed (e2e/ was empty). This wires up the real-browser flow that unit tests can't cover, starting with the only implemented module.

Verification

  • pnpm exec playwright test → 5 passed
  • tsc -b → clean
  • vp check → 0 lint/type errors

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Added comprehensive end-to-end tests for the Base64 tool, covering encoding/decoding operations, URL-safe variants, error handling for invalid input, and state persistence across page reloads.
  • Chores

    • Set up Playwright E2E testing infrastructure with configuration, npm test script, and TypeScript integration support.

Add @playwright/test as the e2e runner. Config auto-starts `vp dev`
(port 15036) and reuses a running server. First suite covers the Base64
tool end-to-end: encode, decode, URL-safe padding, invalid-input error,
and input persistence across reload.

Wire e2e + playwright.config.ts into tsconfig.node so they typecheck,
add the `test:e2e` script, ignore Playwright artifacts, and stop Oxfmt
from parsing generated plan HTML.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rivodotlove rivodotlove self-assigned this Jun 3, 2026
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR adds Playwright E2E test infrastructure with configuration and dependencies, introduces a Base64 tool test suite exercising encoding, decoding, URL-safe variants, error handling, and state persistence, and updates the build formatter to exclude generated plan files from formatting.

Changes

E2E Testing Infrastructure and Base64 Tests

Layer / File(s) Summary
Playwright E2E Framework Setup
playwright.config.ts, package.json, tsconfig.node.json, .gitignore
Playwright configuration defines test discovery via *.e2e.ts pattern and baseURL http://localhost:15036, with CI-dependent retries and reporters. NPM script test:e2e invokes Playwright; @playwright/test added as devDependency. TypeScript config includes playwright.config.ts and e2e directory. Playwright output artifacts (test-results/, playwright-report/, blob-report/, playwright/.cache/) are ignored.
Base64 Tool E2E Tests
e2e/base64.e2e.ts
Five test cases cover: standard Base64 encoding from plain text, decoding Base64 back to text, URL-safe encoding with padding stripped, error alert display on invalid Base64 input during decode, and input value persistence across page reload. Tests navigate to /tool/base64 via beforeEach hook.
Build Configuration Update
vite.config.ts
Formatter fmt configuration adds ignorePatterns to exclude ".claude/plans/**", preventing Oxfmt from mis-parsing JSX inside generated plan HTML and skill template files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 E2E tests hopping in, Base64 encoding with glee,
Playwright hops through the UI with care—
Config, ignores, and formatters fair,
A rabbit's delight, end-to-end spree!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: setting up Playwright e2e testing infrastructure with base64 specifications, which aligns with the primary objectives and file additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/init-e2e-playwright

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
devbox 348db3b Commit Preview URL

Branch Preview URL
Jun 03 2026, 03:57 PM

@rivodotlove rivodotlove merged commit e8cc0cb into main Jun 3, 2026
1 of 2 checks passed
rivodotlove added a commit that referenced this pull request Jun 3, 2026
#19 added Playwright, so the skill's "no e2e harness exists" branch was
false and would mislead the agent into setting up a duplicate Vitest
harness. Make Playwright the established path; keep no-harness as a
generic future fallback. (CodeRabbit, PR #20)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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