stepsCompleted:
Purpose: Test execution recipe for QA and devs adding regression coverage for the current purple-envelope edit/report workflow.
Date: 2026-03-17 Author: Daniel Covington Status: Draft Project: workspace
Related: See test-design-architecture.md for architectural blockers and testability gaps.
Scope: Preserve the current behavior of the purple-envelope edit screen, including report content, mixed-format precinct ordering, election-date rendering, color assignment, empty states, and print-only markup boundaries.
Risk Summary:
Coverage Summary:
| Item | Reasoning | Mitigation |
|---|---|---|
| ReportMan/PDF exports | Not part of this feature slice; separate export path and COM dependencies | Covered by existing manual export verification |
| Browser-generated print headers/footers | Controlled by browser settings, not reliably by page code | Manual print smoke checklist documents expected operator setup |
| Jurisdiction import or unrelated kit workflows | Outside the current purple-envelope regression target | Existing module-level validation remains separate |
Disposable test MDB strategy - Dev - Pre-implementation
Seed dataset for mixed-format precincts - Dev + QA - Pre-implementation
000x, numeric, alpha-suffixed, alpha-only, and empty-state precinct cases.Controller render harness convention - Dev - Pre-implementation
SwitchBoardPurpleEnvelopeEdit and inspect the HTML body under IIS/ASPUnit-compatible flow.ASPUnit extension points
Test data fixtures
Electiondate.Windows/IIS smoke environment
| Risk ID | Category | Description | Score | QA Test Coverage |
|---|---|---|---|---|
| R-001 | DATA | Mixed-format precinct ordering changes | 6 | Seeded render assertions for both color table and report table |
| R-002 | DATA | Wrong low/high ballot aggregation per precinct | 6 | Repository aggregation tests plus rendered-value checks |
| R-006 | TECH | No isolated fixture/reset path for stable tests | 6 | Test harness readiness criteria and pre-test reset validation |
| Risk ID | Category | Description | Score | QA Test Coverage |
|---|---|---|---|---|
| R-003 | BUS | Election date renders incorrectly or crashes on bad input | 4 | Valid/missing/invalid setting render checks |
| R-004 | OPS | Print-only scope or top spacing regresses | 4 | HTML/CSS assertions plus manual print smoke |
| R-005 | BUS | Color-assignment actions regress while report tests are added | 4 | POST regression checks for kit-wide and precinct-specific updates |
| R-007 | BUS | Empty precinct state breaks current report contract | 4 | Explicit no-data render check |
Tests/Test_All.asp runner still executes successfullyNote: P0/P1/P2/P3 represent priority and risk, not execution timing.
Criteria: Preserves operator-facing data correctness and high-risk regression paths with no acceptable workaround.
| Test ID | Requirement | Test Level | Risk Link | Notes |
|---|---|---|---|---|
| P0-001 | Report shows correct jurisdiction/JCode and formatted election label for seeded valid data | Integration | R-003 | Assert rendered HTML content |
| P0-002 | Mixed-format precincts render in the approved ascending order | Integration | R-001 | Cover 000x, numeric, alpha-suffixed, alpha-only |
| P0-003 | Each precinct shows correct low/high ballot numbers from seeded records | Integration | R-002 | Assert repository output and rendered HTML |
| P0-004 | Empty precinct dataset renders current no-data message instead of broken markup | Integration | R-007 | Protect empty-state contract |
Total P0: ~4 tests
Criteria: Preserves important same-screen workflows and print-related regressions with moderate-to-high operational impact.
| Test ID | Requirement | Test Level | Risk Link | Notes |
|---|---|---|---|---|
| P1-001 | AssignKitColorPost updates all InkjetRecords.ColorId rows for the kit |
Integration | R-005 | Seeded DB verification |
| P1-002 | AssignPrecinctColorsPost updates only the targeted precinct rows |
Integration | R-005 | Ensure no cross-precinct bleed |
| P1-003 | Missing Electiondate does not error and leaves report date blank |
Integration | R-003 | Assert safe fallback |
| P1-004 | Invalid Electiondate value preserves non-crashing fallback behavior |
Integration | R-003 | Use non-date string fixture |
| P1-005 | Print container isolates the report section in markup/CSS | Integration | R-004 | Assert presence of #purple-envelope-report-print rules |
| P1-006 | Ready To Assign STIDS status still gates the existing form block |
Integration | R-005 | Regression for same-screen conditional behavior |
Total P1: ~6 tests
Criteria: Lower-risk formatting and regression checks that still help freeze today’s behavior.
| Test ID | Requirement | Test Level | Risk Link | Notes |
|---|---|---|---|---|
| P2-001 | Full-year format renders as Mon-YYYY for valid election dates |
Integration | R-003 | Example May-2026 |
| P2-002 | Print spacer row and top buffer CSS remain present | Integration | R-004 | Markup/CSS contract only |
| P2-003 | Report font-size contract remains at current reduced print size | Integration | R-004 | CSS assertion |
| P2-004 | Color table and report table stay aligned on precinct order | Integration | R-001 | Prevent divergent ordering paths |
Total P2: ~4 tests
Criteria: Manual, browser-dependent, or release-smoke-only validation.
| Test ID | Requirement | Test Level | Notes |
|---|---|---|---|
| P3-001 | Browser print preview shows only the report section | Manual Browser | Requires operator print settings |
| P3-002 | Page 2+ maintains visible top breathing room in print preview | Manual Browser | Validate on Windows/IIS browser |
Total P3: ~2 checks
Tests/Test_All.asp suite| Priority | Count | Effort Range | Notes |
|---|---|---|---|
| P0 | ~4 | ~8-12 hours | Core seeded render/aggregation checks |
| P1 | ~6 | ~10-16 hours | POST regressions, fallbacks, print markup |
| P2 | ~4 | ~6-10 hours | Formatting and alignment checks |
| P3 | ~2 | ~2-4 hours | Manual print verification |
| Total | ~16 | ~26-42 hours | ~1-1.5 QA weeks |
Assumptions:
| Work Item | Owner | Target Milestone (Optional) | Dependencies/Notes |
|---|---|---|---|
| Add disposable MDB copy/reset process for purple-envelope tests | Dev | Sprint next | Required before automation |
| Add repository regression tests for ballot range aggregation | Dev/QA | Sprint next | Uses fixture set A |
| Add controller/render assertions for report HTML and sort order | Dev/QA | Sprint next | Uses fixture sets A/B/C |
| Add manual print smoke checklist to release flow | QA | Pre-release | Browser-dependent only |
| Tool or Service | Purpose | Access Required | Status |
|---|---|---|---|
| IIS-hosted local app | Execute controller/render tests | Windows + IIS site access | Ready |
| Disposable MDB copy | Stable seeded data | File-system access to test DB copy | Pending |
| ASPUnit runner | Automated regression execution | Existing Tests/Test_All.asp access |
Ready |
| Windows browser print preview | Manual print smoke | Local browser access | Ready |
Access requests needed (if any):
| Service/Component | Impact | Regression Scope | Validation Steps |
|---|---|---|---|
| KitController | Orchestrates page model and POST actions | Existing edit page behavior plus report additions | Render and POST regression checks |
| InkjetRecordsRepository | Supplies precinct lists, aggregation, and color updates | Ordering-sensitive and data-sensitive queries | Seeded repository assertions |
| SettingsRepository | Supplies Electiondate |
Header formatting/fallback | Valid/missing/invalid setting cases |
| SwitchBoardPurpleEnvelopeEdit.asp | Final HTML/print contract | Report-only container, table content, empty state | HTML response assertions + manual print smoke |
Regression test strategy:
Tests/Test_All.asp must still pass.For this repo, prefer ASPUnit naming aligned to the existing suite rather than Playwright tagging:
PurpleEnvelopeReport_Should_Render_ElectionDatePurpleEnvelopeReport_Should_Sort_MixedPrecincts_AscendingPurpleEnvelopeReport_Should_Show_BallotRanges_PerPrecinctAssignPrecinctColors_Should_Update_Only_TargetPrecinctKeep tests deterministic:
risk-governance.mdprobability-impact.mdtest-levels-framework.mdtest-priorities-matrix.mdtest-quality.mdGenerated by: BMad TEA Agent
Workflow: _bmad/tea/testarch/bmad-testarch-test-design
Mode: System-level (brownfield feature scope)
Powered by TurnKey Linux.