Add Playwright E2E test suite#751
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
- Set up Playwright with TypeScript and Chromium browser - Configure webServer to auto-start backend (port 3001) and frontend (port 5173) - Add global auth setup with storageState to minimize login API calls - Add 18 tests across 6 spec files covering: - Authentication: login page, login/logout flow, redirect guards - Client Management: table display, dialog open/close, CRUD operations, clear all - Dashboard: stats display, sections, navigation to other pages - Navigation: sidebar items, page navigation, active states, root redirect - Reports: page display, report data with export buttons, empty state - Work Entries: page heading, CRUD operations with form dialog - Add API-based test helpers for efficient setup (createClientViaAPI, createWorkEntryViaAPI) - Add npm scripts: test:e2e, test:e2e:headed, test:e2e:ui
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
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
Adds a comprehensive Playwright E2E test suite covering all major features of the app_timesheet application. The suite includes 18 tests across 6 spec files:
Architecture decisions
storageStateto share login across tests and stay within the backend's 100 req/15min rate limitcreateClientViaAPI,createWorkEntryViaAPI) for efficient data setup without extra page navigationsnavlocator) to avoid strict mode violations from duplicate text across sidebar and page contentwebServerconfig auto-starts both backend (port 3001) and frontend (port 5173)Files added
playwright.config.ts— Playwright configuration with projects, webServer, and storageStatee2e/global-setup.ts— One-time auth setup that saves storageStatee2e/helpers.ts— Reusable test utilities (login, API helpers, sidebar selector)e2e/auth.spec.ts,e2e/clients.spec.ts,e2e/dashboard.spec.ts,e2e/navigation.spec.ts,e2e/reports.spec.ts,e2e/work-entries.spec.tspackage.json— Addedtest:e2e,test:e2e:headed,test:e2e:uiscripts.gitignore— Excludes test artifacts and auth stateReview & Testing Checklist for Human
npm run test:e2efrom the project root — all 18 tests should pass (requires backend and frontend to be available or let webServer start them)Notes
Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/ac263a4f3b814f2186b1933af8337045