RS-21803: Header Visibility and Cell Formatting test - #70
Open
SurreyHughesDisplayr wants to merge 3 commits into
Open
RS-21803: Header Visibility and Cell Formatting test#70SurreyHughesDisplayr wants to merge 3 commits into
SurreyHughesDisplayr wants to merge 3 commits into
Conversation
…erage Covers transpose, show.col.headers/show.row.headers (including the NULL-dimnames force-disable paths), cell.align.horizontal, font.size and font.unit propagation, cell.font.size override, col.header.classes/ row.header.classes, col.classes/row.classes (including their positional list access) and the cell.inline.styl typo's no-op behaviour. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Correct the mislabeled cell.inline.styl block: it is a dead store (never read under R/), not a confirmed defect, and the intended fix is deletion not renaming, since renaming would error on the mismatched header row. Also compare full body-row blocks instead of column 3 only, pin the font-size: 2em count, assert the row-header cell lacks stray fill classes, and add positive-render controls to two absence-only blocks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 21, 2026
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.
Summary
Adds unit test coverage for header visibility and cell formatting in
CreateCustomTable(R/createcustomtable.R) — 18 test blocks covering the plan's 19 scenarios.show.row.headers/show.col.headersoff, including the force-disable path when row or column names are absent, each with a positive render control so a block cannot pass on empty output.<tr><td class="celldefault1">1</td><td class="celldefault5">5</td><td class="celldefault9">9</td></tr>, so inserting or reordering cells fails the test.row.classes/col.classesapplied without index shift — asserted positively on the data cells and negatively on the row-header cell, which is the actual index-shift pin, with a row-count guard so the extraction cannot pass vacuously.col.classeslist access produce identical body HTML, compared across the whole post-</thead>block plus a positive control.font.size, alignment padding and per-cell fill rules pinned as exact counts and exact declarations.Plan corrections
Three of the plan's assertions could not be used as written and were corrected after probing real output:
<thdoes not appear" is unusable —<thead>substring-matches<th>. Anchored to<th class="instead (0 with headers off, 4 with them on).2px" is unusable —2pxlegitimately appears inborder-spacing: 2px 2px. Narrowed tofont-size: 2pxabsent versusfont-size: 2empresent.</thead>body region, which is stem-free.Note on
cell.inline.stylcreatecustomtable.Rcontainscell.inline.styl <- rbind(...), assigning to a variable that is never read anywhere in the package — a dead store. It looks like a typo for the inline-styles matrix, but renaming it does not fix anything: patching the body to use the apparently-intended name makes every call fail witharguments cannot be recycled to the same length, because the styles matrix never gains a header row. The correct disposition is deletion of the line, and current emitted output is correct. The test therefore pins the real behaviour — thesig.change.fillsinline style appears only on the flagged body cell and never in<thead>— rather than describing this as a behavioural defect.Jira: https://numbers.atlassian.net/browse/RS-21803
Stacked PR
Based on
RS-21803-bandedrows(#69), notmaster— these plans all add tests totests/testthat/test-createcustomtable.Rand share its helpers. Merge order: #66, #67, #68, #69, then this. The diff against that base is this plan's work only.Test plan
212 passing, 0 failures, 0 warnings.
🤖 Generated with Claude Code