-
Notifications
You must be signed in to change notification settings - Fork 667
DataGrid: fix skipped qunit tests #32525
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
DataGrid: fix skipped qunit tests #32525
Conversation
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.
Pull request overview
This PR targets the DevExtreme QUnit test suite, aiming to address previously skipped DataGrid (and some TreeList) tests by enabling a subset of them, adjusting expectations, and removing several skipped tests entirely.
Changes:
- Re-enabled/updated several previously skipped DataGrid tests (selection/editing/reordering/fixed columns) with updated arrangements and assertions.
- Added a new DataGrid integration test to validate selection restoration from state storing.
- Removed multiple
QUnit.skip(...)tests across DataGrid and TreeList suites.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/dataController.tests.js | Removes a previously skipped TreeList remote-operations filtering test. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/virtualScrolling.tests.js | Removes a previously skipped virtual scrolling controller test. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.tests.js | Removes several skipped selection tests; re-enables one with a changed configuration (checkbox selection). |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.integration.tests.js | Adds an integration test asserting selection restoration from state storing. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js | Re-enables skipped editing tests and removes a skipped virtual scrolling + inserted-row positioning test. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.integration.tests.js | Re-enables a skipped popup editRowKey initialization test with updated timing/assertions. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsResizingReorderingModule.tests.js | Re-enables one test with updated expectation; removes two skipped column chooser separator movement tests. |
| packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.integration.tests.js | Re-enables a fixed-columns + column hiding test with updated assertions/selectors. |
Comments suppressed due to low confidence (5)
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.tests.js:555
- The skipped test around restoring selection from user state (stateStoringController.restoreSelectedItemKeys / selectedItemKeys) was removed, and there is no equivalent unit-level coverage for that controller API. If this scenario is still supported, consider re-enabling/fixing the test or adding a dedicated integration test that exercises the same restoreSelectedItemKeys path (not just stateStoring.selectedRowKeys).
QUnit.test('Set isSelected items', function(assert) {
this.applyOptions({
selection: { mode: 'multiple' }
});
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.tests.js:1883
- A skipped shift-selection scenario (selectAll -> ctrl toggle -> shift selection) was removed without a replacement elsewhere in the suite. If this behavior is still expected to work, consider re-enabling/fixing the test or adding a new one that validates the same interaction sequence.
QUnit.test('changeRowSelection with shift key. Change shift selection from down to down', function(assert) {
this.applyOptions({
selection: { mode: 'multiple' }
});
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/virtualScrolling.tests.js:190
- The previously skipped "Load when dataSource pageIndex > 0" test was deleted rather than fixed/re-enabled, and no replacement exists in the test suite. This removes coverage for virtual scrolling controller behavior when starting from a non-zero pageIndex; consider restoring the test with correct expectations instead of deleting it.
QUnit.test('setContentItemSizes. No items', function(assert) {
this.scrollController.viewportSize(12);
this.scrollController.setContentItemSizes([]);
const virtualContentSize = this.scrollController.getVirtualContentSize();
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js:16699
- The skipped test "Change position of the inserted row when virtual scrolling" was removed and no equivalent test exists elsewhere. This drops coverage for inserted-row positioning across virtual scroll page changes; consider re-enabling/fixing the test or replacing it with a more stable assertion so regressions in this area are still detected.
// T258714
QUnit.test('Edit row after the virtual scrolling when there is inserted row', function(assert) {
// arrange
const testElement = $('#container');
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.integration.tests.js:6566
- In this enabled test, the grid init config no longer specifies
loadingTimeout: null(commonly used elsewhere in this file to avoid async timing). Depending on the default loadingTimeout,this.clock.tick(10)may be insufficient and make the test flaky; consider restoringloadingTimeout: null(or ticking the configured timeout) for deterministic assertions.
const dataGrid = $('#dataGrid').dxDataGrid({
dataSource: [{ id: 1 }, { id: 2 }],
keyExpr: 'id',
editing: {
allowUpdating: true,
packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/dataController.tests.js
Show resolved
Hide resolved
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.tests.js
Show resolved
Hide resolved
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.integration.tests.js
Show resolved
Hide resolved
...es/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.integration.tests.js
Show resolved
Hide resolved
...xtreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnsResizingReorderingModule.tests.js
Show resolved
Hide resolved
...es/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.integration.tests.js
Show resolved
Hide resolved
e4f0eea to
f14eeae
Compare
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.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (2)
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js:16699
- A previously skipped virtual-scrolling test about inserted row positioning was removed. If the original T258714 scenario is still relevant, consider restoring it as an enabled test (or replacing it with a less brittle assertion) so we still validate inserted-row placement across virtual scroll boundaries.
// T258714
QUnit.test('Edit row after the virtual scrolling when there is inserted row', function(assert) {
// arrange
const testElement = $('#container');
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.tests.js:555
- A previously skipped test around restoring selection from user state was removed. If the intent is to move this coverage to integration tests, please ensure the same controller-level scenario is still covered (e.g., stateStoringController.restoreSelectedItemKeys + complex keys) and add a note/updated test if needed.
QUnit.test('Set isSelected items', function(assert) {
this.applyOptions({
selection: { mode: 'multiple' }
});
No description provided.