test: add comprehensive test coverage for Passmark framework#46
Open
chemicoholic21 wants to merge 1 commit intobug0inc:mainfrom
Open
test: add comprehensive test coverage for Passmark framework#46chemicoholic21 wants to merge 1 commit intobug0inc:mainfrom
chemicoholic21 wants to merge 1 commit intobug0inc:mainfrom
Conversation
Addresses Issue bug0inc#2 by expanding test coverage across all priority areas: PRIORITY 1 — Placeholder Resolution (43 tests) - {{run.*}} placeholder generation and validation - {{global.*}} placeholder persistence across executionIds - {{data.*}} placeholder resolution from Redis - {{email.*}} lazy resolution with provider integration - Malformed placeholder handling and error cases PRIORITY 2 — Caching Logic (31 tests) - Cache HIT: uses cached actions without AI calls - Cache MISS: AI execution and Redis storage - bypassCache flag at step and runSteps level - Playwright retry detection bypasses cache - Auto-healing on cached action failures - Cache key scoping by userFlow + description - All cached action types (click, fill, hover, etc.) PRIORITY 3 — Assertion Consensus (20 tests) - Both models agree TRUE → assertion passes - Both models agree FALSE → assertion fails - Models disagree → arbiter makes final call - Arbiter agreement with Claude or Gemini - API error handling with retry logic - Effort level affects thinking mode - Custom images support PRIORITY 4 — configure() and Model Slots (45 tests) - Model override for all 7 model slots - configure() merges settings across calls - Gateway switching (vercel, openrouter, cloudflare, none) - resolveAI() precedence: step > call > global > default - CUA model lock validation - Clear error messages for misconfigurations PRIORITY 5 — runSteps() Failure Modes (25 tests) - Step failures throw descriptive StepExecutionError - waitUntil timeout handling - Empty steps array gracefully handled - undefined/null page handling - Script step validation and failures - CUA mode error handling - Assertion skipping on step failure - Data extraction failures - Redis unavailability fallback Test Infrastructure - All tests use proper vi.mock() patterns - In-memory Redis mock (Map<string, string>) - AI SDK mocks prevent real API calls - Playwright page stubs for automation - Comprehensive edge case coverage All 298 tests passing with full isolation. Co-Authored-By: Claude Sonnet 4.5 <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.
Addresses Issue #2 by expanding test coverage across all priority areas:
PRIORITY 1 — Placeholder Resolution (43 tests)
PRIORITY 2 — Caching Logic (31 tests)
PRIORITY 3 — Assertion Consensus (20 tests)
PRIORITY 4 — configure() and Model Slots (45 tests)
PRIORITY 5 — runSteps() Failure Modes (25 tests)
Test Infrastructure
All 298 tests passing with full isolation.