Skip to content

test: add E2E tests for all 15 tools + CI workflow#72

Open
vuon9 wants to merge 22 commits intomainfrom
feat/e2e-tests
Open

test: add E2E tests for all 15 tools + CI workflow#72
vuon9 wants to merge 22 commits intomainfrom
feat/e2e-tests

Conversation

@vuon9
Copy link
Copy Markdown
Owner

@vuon9 vuon9 commented May 6, 2026

Summary

This PR adds comprehensive Playwright E2E test coverage for all 15 developer tools and updates the CI workflow to run them in GitHub Actions.

Backend & Generator Changes

  • Fixed HTTP client generator (cmd/genservices): struct params are now sent directly instead of being wrapped in { value: ... }, matching the router's ShouldBindJSON behavior
  • Regenerated all TypeScript HTTP clients with the corrected request format

E2E Test Coverage (15 tools, ~178 tests)

Tool Spec File Tests
Barcode / QR Code barcodeGenerator.spec.js 9
Code Converter codeConverter.spec.js 17
Code Encoder codeEncoder.spec.js 16
Code Encrypter codeEncrypter.spec.js 17
Code Formatter codeFormatter.spec.js 10
Color Converter colorConverter.spec.js 10
Cron Job Parser cronJobParser.spec.js 10
Data Generator dataGenerator.spec.js 10
DateTime Converter dateTimeConverter.spec.js 12
Hash Generator hashGenerator.spec.js 17
JWT Debugger jwtDebugger.spec.js 10
Number Converter numberConverter.spec.js 10
RegExp Tester regExpTester.spec.js 10
Text Diff Checker textDiffChecker.spec.js 10
Text Utilities textUtilities.spec.js 18

CI Workflow Updates

  • Added a build gate job that compiles the Go app and builds the frontend first
  • go-tests, frontend-tests, and e2e-tests now run in parallel after the build succeeds
  • E2E job starts the backend (--server-only) and frontend dev server, then runs Playwright
  • Playwright report is uploaded as an artifact on failure

Test Results

  • 177 passing, 1 skipped
  • The 1 skipped test is a known flaky AES decrypt roundtrip

vuon9 added 22 commits May 7, 2026 00:17
…rator for struct params

- Add comprehensive Playwright E2E suites for:
  barcode, color-converter, cron, data-generator, datetime-converter,
  code-formatter, jwt, number-converter, regexp, text-diff
- Fix cmd/genservices template to send struct params directly
  instead of wrapping in { value: ... }, matching router behavior
- Regenerate all HTTP clients with corrected request format
- Fix existing textUtilities duplicate-lines test

177 passing, 1 skipped
- New e2e-tests job runs in parallel with go-tests and frontend-checks
- Starts backend (--server-only) and frontend (vite dev) servers
- Installs Playwright Chromium browser with system deps
- Uploads Playwright report artifact on failure
- New 'Build' job runs first: compiles Go app + builds frontend
- go-tests, frontend-tests, and e2e-tests now depend on build and run in parallel
- frontend-checks renamed to frontend-tests and no longer includes build step
- e2e-tests unchanged, still starts backend + frontend dev servers then runs Playwright
Go 1.25 rejects 'go install' on modules with replace directives.
The wails bindings (frontend/bindings/) and HTTP clients
(frontend/src/generated/http/) are already committed, so we don't
need to regenerate them in CI.
Extract registerGlobalHotkey into hotkey_darwin.go (//go:build darwin)
and hotkey_other.go (//go:build !darwin) so the build compiles on
Linux CI where golang.design/x/hotkey does not define ModCmd.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Code Coverage

Package Line Rate Health
devtoolbox/internal/barcode 90%
devtoolbox/internal/codeformatter 75%
devtoolbox/internal/converter 60%
devtoolbox/internal/datagenerator 79%
devtoolbox/internal/datetimeconverter 73%
devtoolbox/internal/jwt 42%
devtoolbox/internal/numberconverter 0%
devtoolbox/internal/settings 0%
Summary 65% (3406 / 5275)

Minimum allowed line rate is 60%

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