Skip to content

test: recording drawing context and DataGridRenderer command tests (#26) - #135

Merged
michaelstonis merged 2 commits into
mainfrom
test/26-renderer-tests
Oct 25, 2026
Merged

michaelstonis merged 2 commits into
mainfrom
test/26-renderer-tests

Conversation

@michaelstonis

Copy link
Copy Markdown
Contributor

Closes #26.

What

  • RecordingDrawingContext (tests/KumikoUI.Core.Tests/TestHelpers): records every IDrawingContext call as a DrawOp: kind, viewport geometry (translations applied), copied paint, call index (z-order), and the intersected clip in effect. DrawOp.Visible is what the clip lets reach the screen. Text measures monospace (8 px per char, 14 px tall). It also tracks Save/Restore balance.
  • RenderHarness: a four-column grid of people wired to DataGridRenderer. Every GridColor on the style gets a distinct value, so a recorded colour identifies its style role.
  • 79 renderer tests (96 cases) in tests/KumikoUI.Core.Tests/Rendering/, covering every Draw* method:
    • frame clear and Save/Restore balance across 10 configurations
    • header: titles, reserved icon space, per-column header style, z-order over scrolled rows
    • rows: visible range, placement, alignment, scrolling, alternate/selected/focused backgrounds, row and cell style resolvers, column cell style, edited cell skipped, custom and replaced cell renderers, Boolean checkbox
    • grid lines, current-cell border, sort indicators with multi-sort badges, filter icons (inactive and active)
    • left-frozen, right-frozen and scrollable passes: positions, clips, backgrounds, dividers, and no scrollable cell reaching the frozen pane
    • frozen rows: fixed position, z-order, styles, divider; the drag-handle column on both sides
    • grouping panel (label, chips, sort arrow, hierarchy chevron); group header rows (text, count, caption, chevron per expansion, nesting indent); group summary rows (including overflow and untitled)
    • top and narrow-column overflow table summaries
    • column and row drag overlays, including drops into the frozen band
    • editor and popups drawn last and unclipped
  • DataGridRenderer line coverage: 99.7% (branches 92.9%). The 3 lines left are the CORE-03 bug line, an unreachable group-row guard in frozen rows, and a catch block.

Known defects pinned (acceptance criterion: CORE-03/CORE-25 caught)

Three [Fact(Skip = "…, fixed by #NN")] tests. I checked that each one fails on current code when un-skipped:

Each fix should remove its Skip.

Source changes

Verification

  • Core tests: 465 passed, 3 skipped (main: 372).

🤖 Generated with Claude Code

RecordingDrawingContext records every IDrawingContext call with its viewport
geometry, copied paint, z-order and the clip in effect; RenderHarness wires it to
a four-column grid whose style colours are all distinct. 79 renderer tests (96 cases) cover
every Draw* method: frame and Save/Restore balance, header, rows and styles,
cell renderers, grid lines, current-cell border, sort and filter icons, the three
column passes and their clips, frozen rows, the drag-handle column, the grouping
panel, group header and summary rows, table summaries, column and row drag
overlays, the editor and popups. DataGridRenderer line coverage is 99.7%.

CORE-03 (#22) and CORE-25 (#27) are pinned as skipped tests that fail today and
are un-skipped by their fixes. Dead private DrawFrozenBackground and the unused
ColumnScreenX(bool) overload are removed; GridRect gets a readable ToString.
The testing instructions now describe the helpers that exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 03:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@michaelstonis
michaelstonis requested a balanced review from Copilot October 24, 2026 03:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

…-floats, cs/loss-of-precision)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michaelstonis
michaelstonis merged commit b86ecd2 into main Oct 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Recording IDrawingContext fake and DataGridRenderer command tests (passes, frozen panes, summaries, group rows, overlays)

3 participants