[TESTS] T1330038: TypeError - DataGrid does not accept groupInterval as an array#34064
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Jest coverage to prevent regressions where DataGrid header filtering fails when headerFilter.groupInterval is provided as an array (multi-level grouping), including end-to-end-like integration checks of the header filter tree popup.
Changes:
- Added unit tests for
getGroupInterval,getHeaderFilterGroupParameters, andgetFormatOptionsbehaviors withgroupIntervalarrays. - Added integration tests validating header filter tree rendering and filtering for both numeric bucket hierarchies (
number[]) and hierarchical string data (string[]). - Refactored/expanded TreeView test models to support tree-structure assertions and reused them from GridCore header filter models.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/ui/tests/mock/model/tree_view/types.ts | Introduces a small structure type for asserting TreeView hierarchies in tests. |
| packages/devextreme/js/__internal/ui/tests/mock/model/tree_view/tree_view.ts | New TreeView test model with structure extraction, expanding, and selection helpers. |
| packages/devextreme/js/__internal/ui/tests/mock/model/tree_view/node.ts | Node-level helpers for text/children extraction and expansion logic. |
| packages/devextreme/js/__internal/ui/tests/mock/model/tree_view.ts | Removes the older single-file TreeView model implementation. |
| packages/devextreme/js/__internal/grids/grid_core/header_filter/tests/utils.test.ts | Adds unit tests covering normalization and parameter/format behavior for array group intervals. |
| packages/devextreme/js/__internal/grids/grid_core/header_filter/tests/header_filter.integration.test.ts | Adds integration tests verifying the header filter tree popup builds nested levels and applies filters correctly. |
| packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/header_filter.ts | Extends header filter popup model with getTreeView() for tree-based header filters. |
| packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/grid_core.ts | Adds openHeaderFilter() helper to open the header filter popup in integration tests. |
| packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/column_chooser.ts | Updates TreeViewModel import path after the test model refactor. |
| packages/devextreme/js/__internal/filter_builder/tests/mock/model/filter_builder.ts | Updates TreeViewModel import path after the test model refactor. |
…T1330038-tests-26_1
…T1330038-tests-26_1
Comment on lines
+26
to
+34
| public expandAll(): void { | ||
| const MAX_DEPTH = 10; | ||
| for (let depth = 0; depth < MAX_DEPTH; depth += 1) { | ||
| const collapsedNodes = this.getNodes().filter((node) => node.isCollapsed()); | ||
|
|
||
| if (!collapsedNodes.length) return; | ||
| collapsedNodes.forEach((node) => node.expand()); | ||
| } | ||
| } |
Comment on lines
+20
to
+24
| public getTreeView(): TreeViewModel { | ||
| const popup = this.getPopupWrapper(); | ||
| const treeViewElement = popup?.querySelector(`.${CLASSES.treeView}`) as HTMLElement; | ||
| return new TreeViewModel(treeViewElement); | ||
| } |
anna-shakhova
approved these changes
Jun 19, 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.
No description provided.