Skip to content

Conversation

@dmirgaev
Copy link
Contributor

@dmirgaev dmirgaev commented Dec 9, 2025

No description provided.

@dmirgaev dmirgaev requested a review from Raushen December 9, 2025 16:02
@dmirgaev dmirgaev self-assigned this Dec 9, 2025
@dmirgaev dmirgaev requested a review from a team as a code owner December 9, 2025 16:02
@dmirgaev dmirgaev added the 25_2 label Dec 9, 2025
Copilot AI review requested due to automatic review settings December 9, 2025 16:02
Copy link
Contributor

Copilot AI left a 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 migrates a QUnit test case (T1293181) to Jest, converting it from the legacy test suite to a modern integration test. The test validates that a recovered (undeleted) row maintains correct data when positioned before an inserted row in batch editing mode.

Key Changes:

  • Removed QUnit test from editing.tests.js
  • Created new Jest integration test in m_editing.integration.test.ts
  • Added helper methods getRowDeleteButton and getRowRecoverButton to the GridCoreModel test utility

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js Removed legacy QUnit test for T1293181
packages/devextreme/js/__internal/grids/grid_core/editing/tests/m_editing.integration.test.ts Added new Jest integration test for row recovery in batch editing
packages/devextreme/js/__internal/grids/grid_core/tests/mock/model/grid_core.ts Added helper methods to access delete and recover buttons in test model

jest.useRealTimers();
};

describe('Unsupported filtering properties', () => {
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The describe block name "Unsupported filtering properties" is incorrect for this test suite about editing/recovery functionality. This appears to be copy-pasted from another test file (e.g., unsupported_filtering_properties.integration.test.ts).

The describe block should be renamed to something more appropriate like "Editing", "Batch editing", or "Row recovery in batch mode" to accurately reflect the test content.

Suggested change
describe('Unsupported filtering properties', () => {
describe('Batch editing and row recovery', () => {

Copilot uses AI. Check for mistakes.
}

public getRowDeleteButton(rowIndex: number): HTMLElement {
const row = this.getDataRows()[rowIndex];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we can use getDataRow directly without indexer.

return new EditFormModel(this.root.querySelector(`.${this.addWidgetPrefix(SELECTORS.editForm)}`));
}

public getRowDeleteButton(rowIndex: number): HTMLElement {
Copy link
Contributor

@Raushen Raushen Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be placed to the DataRow model

return row.querySelector(`.${SELECTORS.deleteRowButton}`) as HTMLElement;
}

public getRowRecoverButton(rowIndex: number): HTMLElement {
Copy link
Contributor

@Raushen Raushen Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same, it can be placed to the DataRow model

jest.useRealTimers();
};

describe('Unsupported filtering properties', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Copilot.

const { component, instance } = await createDataGrid({
keyExpr: 'ID',
dataSource,
columns,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we to inline column config? It would be easier to read the test.

const rows = instance.getVisibleRows();

expect(rows).toHaveLength(dataSource.length + 1);
expect(rows[recoveringRowIndex].data).toEqual(dataSource[recoveringRowIndex]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to check keys here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants