test: Playwright e2e tests + WS connection fix + BuildLogger variadic args#105
Merged
MarcosBrendonDePaula merged 3 commits intomainfrom Mar 15, 2026
Merged
test: Playwright e2e tests + WS connection fix + BuildLogger variadic args#105MarcosBrendonDePaula merged 3 commits intomainfrom
MarcosBrendonDePaula merged 3 commits intomainfrom
Conversation
Add comprehensive end-to-end tests using Playwright (Chromium) that cover all frontend routes and backend API endpoints: - Homepage (2 tests): title, feature cards, API status - API Test (3 tests): page render, health check call, create user - Counter (3 tests): render sections, increment, WS connection - Form (3 tests): render fields, connection status, field input - Upload (2 tests): render component, upload button - Shared Counter (2 tests): render with room info, increment - Room Chat (3 tests): render interface, username/count, room click - Auth (3 tests): page load, nav routing, root element - Ping Pong (2 tests): render interface, WS connection - Server API (4 tests): health, users CRUD, swagger, room emit Key changes: - Add Vite proxy for /api/ and /swagger to forward to backend (port 3000) - Add custom Playwright fixture to auto-remove vite-plugin-checker overlay - Configure Playwright with webServer (bun run dev) auto-start - Add test:e2e, test:e2e:ui, test:e2e:headed scripts to package.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
AdminSection crashed the React tree by accessing undefined proxy state properties (currentRoles.join, users.map, audit.length, audit.map) before WS connection populates the Live Component state. Added optional chaining and nullish coalescing for all four unsafe accesses. Also updated auth e2e tests to assert real page content (heading, token input, login flow) now that the page renders correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Connect WebSocket directly to port 3000 in dev mode to avoid Vite proxy overhead and HMR contention (fixes connection delay) - Add variadic ...args to all BuildLogger methods (fixes 15 tsc errors) - Remove ws:true from Vite proxy config (no longer needed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
...argson BuildLogger methods (error,warn,info,success,step) — fixes 15 pre-existingtscerrors?.and?? []guards on proxy state access to prevent pre-mount crashesTest plan
bunx tsc --noEmit— 0 errorsbunx vitest run— 398 passednpx playwright test— 27/27 passed🤖 Generated with Claude Code