-
Notifications
You must be signed in to change notification settings - Fork 665
PivotGrid - Fix depth calculation of header items when a column is empty #32296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26_1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2376,6 +2376,199 @@ QUnit.module('dxPivotGrid', { | |||||||||||||||
| assert.deepEqual(dataSource.expandAll.lastCall.args, [1], 'collapseLevel args'); | ||||||||||||||||
| }); | ||||||||||||||||
|
|
||||||||||||||||
| QUnit.test('Expand all should not mark hidden columns as expanded when hideEmptySummaryCells enabled with calculateSummaryValue returning null', function(assert) { | ||||||||||||||||
|
||||||||||||||||
| QUnit.test('Expand all should not mark hidden columns as expanded when hideEmptySummaryCells enabled with calculateSummaryValue returning null', function(assert) { | |
| QUnit.test('Expand all should not change Grand Total column width when hideEmptySummaryCells enabled with calculateSummaryValue returning null', function(assert) { |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These assert.ok(true, ...) calls act as debug logging and add unconditional passing assertions, which can hide real failures and add noise to test output. Please remove them (or replace with a meaningful assertion on the expected values).
| // Output widths for examination | |
| assert.ok(true, `Initial Grand Total width: ${initialGrandTotalWidth}`); | |
| assert.ok(true, `Final Grand Total width: ${finalGrandTotalWidth}`); |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing DOM widths with assert.strictEqual is likely to be flaky across browsers/font rendering/subpixel rounding. Since this file already uses assert.roughEqual for width-related checks, consider switching this to a tolerant comparison (e.g., roughEqual with a small epsilon) to reduce intermittent failures.
| assert.strictEqual( | |
| finalGrandTotalWidth, | |
| initialGrandTotalWidth, | |
| assert.roughEqual( | |
| finalGrandTotalWidth, | |
| initialGrandTotalWidth, | |
| 1, |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.ok(true, ...) here is unconditional and acts like debug logging rather than validating behavior. Please remove it or replace it with an assertion that checks an expected property (e.g., an explicit expected column count).
| assert.ok(true, `Initial export column count: ${initialColumnCount}`); | |
| assert.ok(initialColumnCount > 0, `Initial export column count should be greater than 0, actual: ${initialColumnCount}`); |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.ok(true, ...) here is unconditional and acts like debug logging rather than validating behavior. Please remove it or replace it with an assertion that checks an expected property (e.g., an explicit expected column count).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isEmptycan be an array (set in summary display mode). With the current logic, an empty array ([]) will skip theisEmpty?.lengthbranch, remain truthy, and then be treated as “empty” later, causing this callback toreturnand potentially undercount header depth. Consider normalizing to an explicit boolean, e.g.const isFullyEmpty = Array.isArray(item.isEmpty) ? item.isEmpty.length > 0 && item.isEmpty.every(Boolean) : !!item.isEmpty;and use that for the emptiness check.