abhinav-phi commented on PR #44815:
URL: https://github.com/apache/superset/pull/44815#issuecomment-5909748854

   Fixed — the second rendered grand-total test (`TableRenderer keeps each 
metric aggregation on its own formatter`) now has the same 
`expect(grandTotalCells.length).toBe(1)` guard as the one above it, so both 
fail on a clear count mismatch instead of a matcher error against `undefined`.
   
   Also addressed in the same push, for completeness:
   
   - **CodeAnt's `Major` finding on `pushAllTotal`** — a real bug in my first 
pass, now fixed. The slot was built from the first record and never revisited, 
but `cellValue.push()` overwrites the stored value, so a grand total shared by 
several metrics rendered the *last* metric's value in the *first* metric's 
format. Verified against the old behaviour: a rate of 5 came out as `$5.00`, 
and $300 came out as `300.000 r`. The slot now rebuilds when a record resolves 
to a different formatter, with a `test.each` covering both record orders.
   - **Missing `: void`** on `pushAllTotal` — added, matching `sortKeys()` and 
`processRecord()`.
   - **Duplicated test fixture** — the metric-collapse test now derives from 
the shared `SINGLE_METRIC_DATA` via `.slice(0, -1)` rather than repeating the 
records inline.
   
   `npx jest plugins/plugin-chart-pivot-table` → 9 suites, 120 tests, all 
passing. `oxfmt` and `oxlint` clean.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to