test(stand): assert the export footer split instead of stepping around it - #2608
Merged
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
…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
force-pushed
the
test/csv-footer-contract
branch
from
August 17, 2026 12:41
5046a41 to
d3a80e8
Compare
ktursunov
enabled auto-merge
August 17, 2026 12:50
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.
The Git output table renders a
Totalrow and aGrand totalrow under itsseries. 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 bymetric-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
TotalorGrand totalrowTotalrow equals the one the table rendersStill 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
Totalfooter appearing inthe CSV, a
Grand totalfooter appearing in the CSV, the workbook'sTotaldrifting, the workbook losing its
Totalrow, its grand totals drifting, and alines column going missing.
The end-to-end run is this PR's
ui-journeyslane: the stand I had capturedfrom was torn down before the change was written, so the browser leg is verified
in CI rather than locally.