Skip to content

test: audit test suite — delete useless tests, add critical integration tests#406

Merged
rygel merged 1 commit intodevelopfrom
refactor/test-audit-cleanup
Mar 21, 2026
Merged

test: audit test suite — delete useless tests, add critical integration tests#406
rygel merged 1 commit intodevelopfrom
refactor/test-audit-cleanup

Conversation

@rygel
Copy link
Copy Markdown
Owner

@rygel rygel commented Mar 21, 2026

Summary

Test suite audit: deleted 3 trivial tests, added 15 real integration tests.

Deleted (tested nothing real)

  • ProviderSectionCollapseCatalogTests (flag read/write)
  • ProviderSectionLayoutCatalogTests (trivial grouping)
  • ProviderMainWindowOrderingCatalogTests (sort order only)

Added

  • MonitorDiResolutionTests — full Monitor DI graph resolution matching Program.cs
  • PaceCalculationEndToEndTests — raw usage data through projection math to badge text
  • ProviderResponseDeserializationTests — real Codex/ClaudeCode API response formats through actual provider parsing

These tests would have caught the beta.12 DI regression and the pace calculation bugs.

Test plan

  • 15 new tests pass
  • Full suite builds

🤖 Generated with Claude Code

…on tests

Delete 3 trivial test files that only tested flag read/write or sort order:
- ProviderSectionCollapseCatalogTests, ProviderSectionLayoutCatalogTests,
  ProviderMainWindowOrderingCatalogTests

Add 15 real integration tests across 3 new files:

MonitorDiResolutionTests (3 tests):
- Full Monitor DI graph resolution matching Program.cs setup
- All provider services resolve from complete container
- UsageDatabase singleton forwarding works

PaceCalculationEndToEndTests (7 tests):
- Codex 71% used + weekly reset in 5d → projected 100%, "Over pace"
- Codex 20% used + weekly reset in 5d → projected 70%, "On pace"
- 5h burst 60% after 2h → projected 150% clamped, "Over pace"
- 5h burst 10% after 2h → projected 25%, "On pace"
- Projection consistency between color and final percent
- Edge case: fully elapsed period

ProviderResponseDeserializationTests (5 tests):
- Codex full response with all quota windows + Spark
- Codex minimal response with graceful degradation
- Claude Code OAuth response with all detail types
- Claude Code partial response handling
- Error response handling for both providers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rygel rygel merged commit 46ad9c7 into develop Mar 21, 2026
16 checks passed
@rygel rygel deleted the refactor/test-audit-cleanup branch March 21, 2026 19:16
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.

2 participants