Skip to content

test(stand): assert the export footer split instead of stepping around it - #2608

Merged
ktursunov merged 1 commit into
mainfrom
test/csv-footer-contract
Aug 17, 2026
Merged

test(stand): assert the export footer split instead of stepping around it#2608
ktursunov merged 1 commit into
mainfrom
test/csv-footer-contract

Conversation

@ktursunov

@ktursunov ktursunov commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The Git output table renders a Total row and a Grand total row under its
series. The workbook export reproduces both; the CSV stops at the last bucket —
on purpose, because its consumers parse every row as data (24fe8baf fix(metrics): omit CSV footer rows, locked by metric-timeseries-export.test.ts).

The stand journey compared bucket rows only. That sidestepped the contract: it
proved neither half, and either format could drift across it unnoticed.

What the journey asserts now

CSV carries no Total or Grand total row
XLSX its Total row equals the one the table renders
XLSX its grand totals are the numbers the table shows

Still nothing hand-written: the expectation is the rendered page. The table puts
lines added and removed in one signed cell where the export gives them a column
each, so the numbers are compared rather than the strings.

Verification

The assertions were run against output captured verbatim from a seeded stand —
the rendered table, the CSV and the workbook — and pass. Six mutations of that
output each fail the assertion that covers them: a Total footer appearing in
the CSV, a Grand total footer appearing in the CSV, the workbook's Total
drifting, the workbook losing its Total row, its grand totals drifting, and a
lines column going missing.

The end-to-end run is this PR's ui-journeys lane: the stand I had captured
from was torn down before the change was written, so the browser leg is verified
in CI rather than locally.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 967bfcdb-7ace-4957-a052-b713de62a565


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…d it

The Git output table renders a Total row and a Grand total row under its
series. The workbook reproduces both; the CSV deliberately stops at the last
bucket, since its consumers parse every row as data — `24fe8baf fix(metrics):
omit CSV footer rows`, locked by `metric-timeseries-export.test.ts`.

The stand journey compared bucket rows only, so it neither proved that contract
nor would have noticed either format drifting across it. It now asserts the CSV
carries no footer row, the workbook's Total row equals the rendered one, and the
workbook's grand totals are the numbers the table shows. The comparison stays
derived from the page — the table renders lines added and removed in one signed
cell where the export gives them a column each, so the numbers are compared
rather than the strings.

Checked against real captured output from a seeded stand: the assertions hold,
and six mutations of it — a footer appearing in the CSV, the workbook's Total
drifting, losing its Total row, its grand totals drifting, and a lines column
going missing — each fail the assertion that covers them.

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
@ktursunov
ktursunov force-pushed the test/csv-footer-contract branch from 5046a41 to d3a80e8 Compare August 17, 2026 12:41
@ktursunov
ktursunov enabled auto-merge August 17, 2026 12:50
@ktursunov
ktursunov added this pull request to the merge queue Aug 17, 2026
Merged via the queue into main with commit 422c808 Aug 17, 2026
26 checks passed
@ktursunov
ktursunov deleted the test/csv-footer-contract branch August 17, 2026 16:27
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.

1 participant