Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- 09-01 Task 2: Email verification now queries DB for emailVerifToken and navigates to real /verify-email?token=...&email=... URL instead of test-helper shortcut - 09-02 Task 1: 2FA tests use deterministic voluntary setup path (GET /api/auth/two-factor/setup), no conditional branches - 09-02 Task 2: SSO tests use page.route() to intercept OAuth callback URLs with mocked provider responses - 09-02 Task 2: Magic link test creates verificationToken in DB with known plain/hashed pair, navigates to /api/auth/callback/email?token=... Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ment rate-limit gap
4 plans in wave 1: signin/signup E2E, 2FA/SSO/magic-link E2E, auth page component tests, API token lifecycle tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Test token creation returns tpi_ prefixed token with correct shape - Test valid token authenticates requests via Bearer header - Test malformed token returns 401 - Test revoked token returns 401 - Test expired token (past date) returns 401 - Test token rejected when user isApi=false - Test token rejected when user is deactivated
- 09-04-SUMMARY.md: documents 8 E2E tests for token lifecycle - STATE.md: updated position and decisions - ROADMAP.md: updated plan progress for phase 09 - REQUIREMENTS.md: marked AUTH-08 complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Valid credentials redirect to home page
- Invalid password shows error on signin page
- Non-existent email shows error on signin page
- Deactivated user is denied access with error
- Sign-out clears session and redirects to signin
- Session persists across page refresh
- Uses SigninPage page object and api fixture cleanup pattern
- Unauthenticated tests use test.use({ storageState: { cookies: [], origins: [] } })
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Complete signup + real email verification via DB token in verify-email URL - Unverified user is redirected to verify-email page after signing in - Resend verification email button exists on verify-email page - Queries DB via admin request context for emailVerifToken - Uses real /en-US/verify-email?token=...&email=... verification flow - Does not use test-helpers/verify-email shortcut for verification test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t plan - Add 09-01-SUMMARY.md with deviations, decisions, and test results - Update STATE.md with Phase 09 decisions and session info - Update ROADMAP.md Phase 9 progress (2/4 summaries) - Mark AUTH-01 and AUTH-02 requirements complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add signin.test.tsx with 7 tests: form rendering, validation errors, failed login error, 2FA dialog display, loading state, 2FA setup redirect, and signup link - Add signup.test.tsx with 6 tests: form rendering, signin link, password mismatch validation, short name validation, duplicate email error, and successful registration redirect - Mock next-auth/react signIn, ZenStack hooks, server actions, and navigation utilities - Add document.elementFromPoint mock to prevent jsdom crash from input-otp library timer callback
- Add two-factor-setup.test.tsx with 6 tests: loading spinner, QR code display, backup codes setup flow, error on setup failure, verify step rendering, and verify button disabled state - Add two-factor-verify.test.tsx with 8 tests: OTP input rendering, disabled verify button, sign-out button, backup code toggle, toggle back to authenticator, error on invalid code, backup code length validation, and signOut call - Mock fetch for 2FA API endpoints and use vi.hoisted for signOut mock to prevent hoisting issues - Add document.elementFromPoint mock for input-otp jsdom compatibility
- Create 09-03-SUMMARY.md documenting 27 component tests across 4 auth pages - Update STATE.md with progress (75%), decisions, and session info - Update ROADMAP.md phase 9 progress (3 of 4 plans complete) - Mark AUTH-07 requirement complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p codes, and invalid code rejection - Implements voluntary 2FA setup via GET /api/auth/two-factor/setup and POST /api/auth/two-factor/enable - Uses crypto HMAC-SHA1 based TOTP generator matching RFC 6238 - Tests TOTP login flow: signin triggers 2FA dialog, code entry completes authentication - Tests backup code recovery as alternative to TOTP - Tests invalid code rejection with error message persistence Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tests - SSO Google and Microsoft tests use Playwright page.route() to intercept OAuth redirects and restore session cookies - SSO SAML test creates ssoProvider + samlConfiguration in DB, intercepts mock IdP redirect - Magic link test checks email provider availability, inserts verificationToken with known hash, navigates to callback URL - Magic link UI test verifies dialog shows success message after email submission - Password change tests cover: UI flow with form, session persistence after API change, wrong password rejection - Fix: add missing /api/auth/saml/login/[id] route that signin page references (was routing to non-existent endpoint) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17/17 must-haves verified. 10 test files created (6 E2E + 4 component), 3014 lines of test code, 44 total tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 existing specs cover most REPO requirements. Phase focuses on identifying and filling gaps only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Gap-fill approach: 27 existing E2E specs already cover most requirements. Plan 01 fills gaps in REPO-01 (edit/delete) and REPO-03 (bulk move). Plan 02 fills gap in REPO-06 (shared steps CRUD and versioning). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Create Shared Step Group via UI (ManualSharedStepsDialog) - Edit Shared Step Group name and steps via the shared steps page - Delete Shared Step Group with confirmation dialog - Use Shared Step Group in Test Case via the steps form - Verify step count updates after editing (version indicator proxy) Closes REPO-06 gap for shared step group management UI coverage
- SUMMARY.md with test coverage details and deviation notes - STATE.md updated to phase 10 plan 02 complete position - ROADMAP.md updated with plan progress - REQUIREMENTS.md marks REPO-06 as complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 'Edit Test Case Name via Detail Page' test: navigates to case detail, enters edit mode, changes name, saves, and verifies persistence after reload - Add 'Delete Test Case via Row Action' test: finds case row, clicks Trash2 delete button, confirms AlertDialog, verifies row disappears - Both tests follow existing pattern with getTestProjectId and Date.now() names
- Add 'Move Test Cases to Different Folder via Detail Page' test - Creates source and target folders with a test case in source folder - Uses case detail page edit mode FolderSelect to change folder - Verifies case appears in target folder and is absent from source folder - Note: BulkEditModal does not have a folder field; move is via individual case edit which is the only available UI path for folder change
… plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7/7 must-haves verified. Gap-fill approach: 8 new tests added to existing 27-spec repository suite. Covers REPO-01 through REPO-10. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- StepsForm tests: render empty state, list of steps, add step, delete step, readOnly mode, shared step groups, hideSharedStepsButtons, shared step placeholder - FieldValueRenderer tests: all field types (Text String, Text Long, Dropdown, Multi-Select, Date, Number, Integer, Checkbox, Link, Steps), edit/view modes, empty states, error display - Mock @dnd-kit/core, @dnd-kit/sortable, react-hook-form, ZenStack hooks, TipTapEditor, and external dependencies
- 15 tests covering loading state, data rendering, pagination, filtering - Tests add/edit case row conditional rendering based on canAddEdit prop - Tests selection mode with SelectedTestCasesDrawer - Tests isRunMode rendering without crashing - Tests empty state and select folder message - All child components (DataTable, PaginationComponent, etc.) mocked as stubs - ZenStack hooks and external deps properly mocked
- 11 tests covering both useRepositoryCasesWithLastResult and useCountRepositoryCasesWithLastResult - Tests verify select transform: success=true returns data, success=false returns [] - Tests verify count hook returns count on success and 0 on failure - Tests verify correct server action call with args/where clause - Tests verify refetch calls server action again - QueryClientProvider wrapper used for renderHook
- BreadcrumbComponent tests: single/nested breadcrumbs, isLastClickable behavior, onClick handler, empty state, truncation class, tooltip content, correct href generation - TreeView tests: loading state, empty folder states (editor/viewer), folder item rendering, data-testid by folderId, context menu visibility, hierarchy change callback, drop zone rendering - Mock react-arborist Tree, react-dnd useDrop, DeleteFolderModal, EditFolderModal, and ZenStack hooks
- Add MILESTONE_DUE_REMINDER tests (due soon, overdue, fallback) - Add SHARE_LINK_ACCESSED tests (with project, without viewedAt, fallback) - Add COMMENT_MENTION tests (repository case, session, no access fallback) - Add USER_REGISTERED test using fallback rendering - Add LLM_BUDGET_ALERT test with budget disclaimer - Add MilestoneNameDisplay mock for new test cases
- Add createUserRegistrationNotification tests (form, SSO, no admins, DB error) - Add createShareLinkAccessedNotification tests (with name, email-only, anonymous, no projectId, timestamp) - Add markNotificationsAsRead tests (returns IDs, handles empty array) - Add getUnreadCount test (placeholder returns 0) - Add ~/server/db mock via vi.mock for admin lookup in user registration
- Export processor/startWorker from repoCacheWorker.ts and autoTagWorker.ts - repoCacheWorker tests cover: cache valid/expired/failed refresh, mixed configs, exception isolation, INSTANCE_TENANT_ID restoration in finally block, unknown job type - autoTagWorker tests cover: grouped suggestions with entity metadata, no-suggestion entities, stats calculation, progress reporting via updateProgress, pre-start/mid-analysis cancellation, failed/truncated entity handling, all entity types (repositoryCase/testRun/session), errors list - autoTagWorker test pattern: mock bullmq Worker class with client promise, call startWorker() to initialise module-level worker variable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- useDrillDown: state machine tests (open/close/reset/loadMore guards) - useDrillDownExport: CSV generation, pagination, audit logging, filename - useSearchContext: route-based context derivation for all entity types - useTabState: URL param tab management and popstate sync - useIssueColors: color family mapping, priority/status style functions - useResponsiveSVG: ResizeObserver integration and dimension tracking Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- useRequireAuth: loading/authenticated/unauthenticated state tests with redirect verification and session transition coverage - usePageFileDrop: drag state counter, file type validation, onDrop callback, disabled state guards, and cleanup on unmount Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
252 tests: 156 custom hooks, 23 notification gap-fill, 32 ZenStack hook shapes + autoTagJob, 41 worker tests (email, repoCache, autoTag). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
89/89 requirements addressed, 16/16 phases complete, ~1715 new tests. 12 minor tech debt items, no critical gaps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pre-existing test coverage for REPO-02,04,05,07,08,09,10 + RPT-04 + SRCH-02,05 was not checked off during phase execution. Fixed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Introduced methods for creating and linking LLM integrations to projects in ApiHelper. - Updated tests to ensure the auto-tag button and magic select features are rendered correctly when LLM integration is configured. - Enhanced test cases to verify the presence and behavior of the wizard trigger button and dialogs based on LLM integration status. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Deleted obsolete files: REQUIREMENTS.md, ROADMAP.md, STATE.md, v2.0-MILESTONE-AUDIT.md, and related phase plans and summaries. - These documents were no longer relevant following the completion of the v2.0 milestone and the associated testing phases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added exports for processor and startWorker functions in emailWorker.js to enhance functionality. - Updated CommonJS export annotations for better ESM compatibility.
- Added relaxed ESLint rules for test files to enhance flexibility in testing. - Updated various test files to use consistent parameter naming conventions, replacing unused parameters with underscores for clarity. - Improved mock implementations and ensured proper type casting for fetch mocks across multiple test files. - Enhanced test coverage by refining component rendering and interaction tests in several components. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Added new mock implementations for case export templates in QuickScriptModal tests. - Updated ProjectMenu to include stable keys for section tracking and adjusted dependencies in useEffect. - Improved visibility checks and timeout settings in auto-tag and quickscript writing tests for better reliability. - Refactored milestone CRUD tests to enhance stability and ensure proper loading of milestone types. - Streamlined project creation wizard tests by adding helper functions for modal interactions and folder selections. - Enhanced test run configuration combobox tests with improved helper functions for better readability and maintainability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Introduced a new mock implementation for useFindUniqueProjects to enhance test coverage in QuickScriptModal. - Updated the test setup to include the new mock, ensuring proper handling of project data during tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Modified the CompleteMilestoneDialog to handle success status more accurately, providing user feedback via toast notifications. - Added a data-testid attribute to the collapse button in the ProjectOverview for improved test targeting. - Enhanced the ApiHelper to ensure default templates are set correctly without causing race conditions in parallel tests. - Updated various test files to improve reliability and ensure proper handling of asynchronous data loading, particularly in project creation and milestone CRUD tests. Co-Authored-By: Claude Opus 4.6 (1M context)
…d performance - Updated test cases in pagination.spec.ts and search-filter.spec.ts to replace batch creation of test cases with individual creation for better clarity and control. - Reduced timeout values across various assertions to enhance test performance and responsiveness. - Standardized project naming in test case creation to ensure consistency. - Removed unnecessary timeout extensions to streamline test execution. Co-Authored-By: Claude Opus 4.6 (1M context)
…r improved reliability - Updated milestone CRUD tests to utilize polling for milestone type selection, ensuring the default is auto-selected more reliably. - Refined project creation wizard tests to use a filter input for searching newly created projects instead of reloading the page, improving test performance and accuracy. Co-Authored-By: Claude Opus 4.6 (1M context)
…eliability - Replaced the locator for folder selection in ai-auto-tag-flow.spec.ts and ai-magic-select-quickscript-writing.spec.ts to target specific folders instead of the root folder, enhancing test accuracy. - Improved comments for clarity regarding folder selection behavior. - Adjusted milestone CRUD test to ensure proper handling of milestone type selection, allowing for manual selection if auto-selection fails.
- Updated the project creation logic in folder-edit.spec.ts to enhance randomness in naming. - Simplified the folder visibility check after renaming, improving the handling of React Query cache invalidation. - Increased timeout for folder existence verification to ensure stability in test execution.
Contributor
Author
|
🎉 This PR is included in version 0.17.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Description
Comprehensive test coverage for the TestPlanIt application across E2E, component, hook, and API test layers. This milestone adds 168 new test files (42 E2E specs, 120 unit/component tests, ~50,000 lines) covering all major application areas: authentication, test case repository, test execution, exploratory sessions, project management, AI features, administration, reporting, search, integrations, custom API routes, general components, hooks, notifications, and workers.
Minor production code changes were made to support testability (e.g., adding
data-testidattributes, exporting constants, extending the E2EApiHelperfixture with LLM integration methods).Type of Change
How Has This Been Tested?
Describe the tests you ran to verify your changes:
Test Configuration:
Checklist
Screenshots (if applicable)
N/A — test-only changes, no UI modifications.
Additional Notes
Coverage by Area (168 test files)
Production Code Changes
Non-test changes are minimal and support testability:
e2e/fixtures/api.fixture.ts— Extended with LLM integration helper methodsdata-testidattributes for E2E selector stabilityschema.zmodel— Minor annotation adjustmentsworkers/*.ts— Added exports for test access to internal functions