From fb68eca5fb6befccbb291825672cbe475bb51288 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Tue, 7 Jul 2026 16:17:05 +0600 Subject: [PATCH 01/26] fix --- .../tests/cardView/columnChooser/functional.ts | 3 ++- .../tests/cardView/columnSortable/functional.ts | 7 ++++++- e2e/testcafe-devextreme/tests/common/treeList/toast.ts | 2 +- .../common/aiColumn/virtualScrolling.functional.ts | 8 ++++++-- .../common/focus/focusEvents/newRows_T1162227.ts | 6 +++++- .../tests/dataGrid/common/headerPanel.ts | 3 ++- .../dataGrid/common/markup/T838734_alternateRowSizes.ts | 3 ++- .../tests/dataGrid/common/rowDragging/functional.ts | 9 ++++++--- .../tests/dataGrid/common/scrolling.ts | 7 ++++--- .../tests/dataGrid/common/selection.ts | 3 ++- e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts | 6 ++++-- .../grids/grid_core/error_handling/m_error_handling.ts | 5 +++-- packages/testcafe-models/dataGrid/index.ts | 7 ++++--- 13 files changed, 47 insertions(+), 22 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts index aebcc8529d41..934ac2682c00 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts @@ -56,8 +56,9 @@ function testsFactory(testModel: { assertFirstColumnHidden: (t: TestController, cardView: CardView) => Promise; config: any; // TODO: add typing }) { - test.meta({ unstable: true })(`column chooser in ${testModel.name} mode should work after multiple hide/show actions`, async (t) => { + test(`column chooser in ${testModel.name} mode should work after multiple hide/show actions`, async (t) => { const cardView = new CardView('#container'); + await t.expect(cardView.isReady()).ok(); await cardView.apiShowColumnChooser(); diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts index 67cc6c0e00c9..83db68e7cc72 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts @@ -11,6 +11,7 @@ import { expectColumns, getColumnItem, triggerDragStart, + triggerDragEnd, SELECTORS, } from './utils'; @@ -36,6 +37,8 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` } else { await t.expect(draggingElement.exists).notOk(); } + + await triggerDragEnd(columnElement); }).before(async () => createWidget('dxCardView', { allowColumnReordering, columns: [{ @@ -66,6 +69,8 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` } else { await t.expect(draggingElement.exists).notOk(); } + + await triggerDragEnd(columnElement); }).before(async () => createWidget('dxCardView', { allowColumnReordering: true, columns: [{ @@ -102,7 +107,7 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` [0, 1].forEach((columnIndex) => { [0, 1, 2].forEach((gapIndex) => { - test.meta({ unstable: true })(`drag from columnChooser to headerPanel: from index ${columnIndex} to index ${gapIndex}`, async (t) => { + test(`drag from columnChooser to headerPanel: from index ${columnIndex} to index ${gapIndex}`, async (t) => { const cardView = new CardView('#container'); await cardView.apiShowColumnChooser(); diff --git a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts index 93e47076e37a..58fef5a44869 100644 --- a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts +++ b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts @@ -14,7 +14,7 @@ test('Toast should be visible after calling and should be not visible after defa .expect(treeList.isReady()) .ok(); - await treeList.apiShowErrorToast(); + await treeList.apiShowErrorToast({ displayTime: 100000 }); await t.expect(treeList.getToast().exists).ok(); await testScreenshot(t, takeScreenshot, 'ai-column__toast__at-the-right-position.png', { element: treeList.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts index 08bb56bdc7fe..140c68106469 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts @@ -41,7 +41,7 @@ const deleteGlobalVariables = ClientFunction((): void => { delete (window as any).aiResolve; }); -test.meta({ unstable: true })('DataGrid should send an AI request for rendered rows after scrolling without changing the page index', async (t) => { +test('DataGrid should send an AI request for rendered rows after scrolling without changing the page index', async (t) => { // arrange const dataGrid = new DataGrid(DATA_GRID_SELECTOR); @@ -51,6 +51,7 @@ test.meta({ unstable: true })('DataGrid should send an AI request for rendered r .ok(); // act + await t.expect(dataGrid.isReady()).ok(); await resolveAIRequest(); // assert @@ -76,6 +77,7 @@ test.meta({ unstable: true })('DataGrid should send an AI request for rendered r .ok(); // act + await t.expect(dataGrid.isReady()).ok(); await resolveAIRequest(); // assert @@ -144,7 +146,7 @@ test.meta({ unstable: true })('DataGrid should send an AI request for rendered r await deleteGlobalVariables(); }); -test.meta({ unstable: true })('DataGrid should send an AI request for rendered rows after scrolling with changing the page index', async (t) => { +test('DataGrid should send an AI request for rendered rows after scrolling with changing the page index', async (t) => { // arrange const dataGrid = new DataGrid(DATA_GRID_SELECTOR); @@ -154,6 +156,7 @@ test.meta({ unstable: true })('DataGrid should send an AI request for rendered r .ok(); // act + await t.expect(dataGrid.isReady()).ok(); await resolveAIRequest(); // assert @@ -179,6 +182,7 @@ test.meta({ unstable: true })('DataGrid should send an AI request for rendered r .ok(); // act + await t.expect(dataGrid.isReady()).ok(); await resolveAIRequest(); // assert diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts index 6fc3e42e929b..4c07828aef26 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts @@ -245,11 +245,15 @@ test('It should not fire row events if focusedRowEnabled: false', async (t) => { await clearCallbackTesting(); }); -test.meta({ unstable: true })('It should fire rowChanged event on initialization if focusedRowKey options is set', async (t) => { +test('It should fire rowChanged event on initialization if focusedRowKey options is set', async (t) => { + const dataGrid = new DataGrid(GRID_SELECTOR); + const expectedRowFocusChanged: FocusRowChangedData[] = [ [1], ]; + await t.expect(dataGrid.getDataRow(1).element).ok(); + const [ , , diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts index 6155fc792a9c..bdfb50852195 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts @@ -87,9 +87,10 @@ test('Drop-down window should be positioned correctly after resizing the toolbar // visual: fluent.blue.light // visual: fluent.blue.dark -test.meta({ unstable: true })('Disabled toolbar buttons are not grayed out in Material themes (T1217416)', async (t) => { +test('Disabled toolbar buttons should be grayed out in Material themes (T1217416)', async (t) => { const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); await testScreenshot(t, takeScreenshot, 'disabled-toolbar-buttons.png', { element: dataGrid.element }); await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/markup/T838734_alternateRowSizes.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/markup/T838734_alternateRowSizes.ts index 274b3c2e6e96..27caf1ffdb84 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/markup/T838734_alternateRowSizes.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/markup/T838734_alternateRowSizes.ts @@ -15,9 +15,10 @@ const generateData = (rowCount) => new Array(rowCount).fill(null).map((_, idx) = C: `C_${idx}`, })); -test.meta({ unstable: true })('Alternate rows should be the same size', async (t) => { +test('Alternate rows should be the same size', async (t) => { const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid(GRID_SELECTOR); + await t.expect(dataGrid.isReady()).ok(); await testScreenshot(t, takeScreenshot, 'T838734_alternate-rows-same-size.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts index 51aca76648cf..869c69cc3b42 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-misused-promises */ import { ClientFunction, Selector } from 'testcafe'; import DataGrid, { CLASS as DataGridClassNames } from 'devextreme-testcafe-models/dataGrid'; import { ClassNames } from 'devextreme-testcafe-models/dataGrid/classNames'; @@ -794,11 +793,15 @@ test('toIndex should not be corrected when source item gets removed from DOM', a }); // T1139685 -test.meta({ unstable: true })('Item should appear in a correct spot when dragging to a different page with scrolling.mode: "virtual"', async (t) => { +test('Item should appear in a correct spot when dragging to a different page with scrolling.mode: "virtual"', async (t) => { const dataGrid = new DataGrid('#container'); await t.expect(dataGrid.isReady()).ok(); - await t.drag(dataGrid.getDataRow(2).getDragCommand(), 0, 32, { speed: 0.95 }); + + await t.dragToElement( + dataGrid.getDataRow(2).getDragCommand(), + dataGrid.getDataRow(4).element, + ); const visibleRows = await dataGrid.apiGetVisibleRows(); const visibleRowKeys = visibleRows.map((row) => row.key); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts index f3865c4088a3..70d87706ce3b 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts @@ -1044,7 +1044,7 @@ test.meta({ browserSize: [800, 800] })('Rows are rendered properly when window c })()); // T1129252 -test.meta({ unstable: true })('The data should display correctly after changing the dataSource and focusedRowIndex options when scroll position is at the end', async (t) => { +test('The data should display correctly after changing the dataSource and focusedRowIndex options when scroll position is at the end', async (t) => { // arrange const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); @@ -1067,6 +1067,7 @@ test.meta({ unstable: true })('The data should display correctly after changing .expect(dataGrid.isReady()) .ok(); + await t.expect(dataGrid.apiGetTopVisibleRowData()).eql({ id: 96, text: 'item 96' }); await testScreenshot(t, takeScreenshot, 'grid-virtual-scrolling-T1129252.png', { element: '#container' }); await t .expect(compareResults.isValid()) @@ -1705,7 +1706,7 @@ test.meta({ browserSize: [800, 200] })('Editing buttons should rerender correctl }); // T1181439 -test.meta({ unstable: true })('Restoring focus on re-rendering should be done without unexpected scrolling to the focused element', async (t) => { +test('Restoring focus on re-rendering should be done without unexpected scrolling to the focused element', async (t) => { const dataGrid = new DataGrid('#container'); await t.expect(dataGrid.isReady()).ok(); @@ -1714,7 +1715,7 @@ test.meta({ unstable: true })('Restoring focus on re-rendering should be done wi await t.click(dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(19).element); - await dataGrid.scrollBy(t, { left: 0 }); + await dataGrid.scrollBy(t, { left: -1000 }); await dataGrid.scrollBy(t, { top: 50 }); await t.expect(dataGrid.getScrollLeft()).eql(0); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts index 2c2ce3d0dba7..e0389b27dc63 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts @@ -248,8 +248,9 @@ test('Sensitivity option change should be correctly handled during runtime chang // --- -test.meta({ unstable: true })('"Select All" checkbox should not react when not visible', async (t) => { +test('"Select All" checkbox should not react when not visible', async (t) => { const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); const selectAllCheckBox = new CheckBox( dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(0).getEditor().element, diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts index e283e0516ace..e057f136ee1d 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts @@ -8,16 +8,18 @@ fixture.disablePageReloads`Toasts in DataGrid`.page( url(__dirname, '../../container.html'), ); -test.meta({ unstable: true })('Toast should be visible after calling and should be not visible after default display time', async (t) => { +test('Toast should be visible after calling and should be not visible after default display time', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); await t .expect(dataGrid.isReady()) .ok(); - await dataGrid.apiShowErrorToast(); + await dataGrid.apiShowErrorToast({ displayTime: 100000 }); + await t.expect(dataGrid.getToast().exists).ok(); await testScreenshot(t, takeScreenshot, 'ai-column__toast__at-the-right-position.png', { element: dataGrid.element }); + await t .expect(compareResults.isValid()) .ok(compareResults.errorMessages()); diff --git a/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts b/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts index 0445b1edb0e2..b4fa1b0aee6d 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts @@ -4,6 +4,7 @@ import eventsEngine from '@js/common/core/events/core/events_engine'; import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { each } from '@js/core/utils/iterator'; +import type { Properties as ToastProperties } from '@js/ui/toast'; import type { ColumnsController } from '@ts/grids/grid_core/columns_controller/m_columns_controller'; import type { ResizingController } from '@ts/grids/grid_core/views/m_grid_view'; @@ -158,8 +159,8 @@ export class ErrorHandlingController extends modules.ViewController { } } - public showToastError(message: string) { - this._toastViewController.showToast(message, { type: 'error' }); + public showToastError(message: string, options?: ToastProperties) { + this._toastViewController.showToast(message, { ...options, type: 'error' }); } } diff --git a/packages/testcafe-models/dataGrid/index.ts b/packages/testcafe-models/dataGrid/index.ts index 4a9ce0e9f039..82ce1ec8116c 100644 --- a/packages/testcafe-models/dataGrid/index.ts +++ b/packages/testcafe-models/dataGrid/index.ts @@ -1,6 +1,7 @@ import { ClientFunction, Selector } from 'testcafe'; import DataGridInstance from 'devextreme/ui/data_grid'; import type { SelectionSensitivity } from 'devextreme/ui/data_grid'; +import type { Properties as ToastProperties } from 'devextreme/ui/toast'; import Toolbar from '../toolbar'; import DataRow from './data/row'; import GroupRow from './groupRow'; @@ -1051,13 +1052,13 @@ export default class DataGrid extends GridCore { )(); } - apiShowErrorToast(): Promise { + apiShowErrorToast(options?: ToastProperties): Promise { const { getInstance } = this; return ClientFunction(() => { const gridInstance = getInstance() as any; - gridInstance.getController('errorHandling').showToastError('Error'); + gridInstance.getController('errorHandling').showToastError('Error', options); }, - { dependencies: { getInstance } }, + { dependencies: { getInstance, options } }, )(); } From 566518c7c089338f61c71c6cca832710fc7134cd Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Tue, 7 Jul 2026 16:35:28 +0600 Subject: [PATCH 02/26] split toast tests into 2 --- .../tests/common/treeList/toast.ts | 20 ++++++++++++++++++- .../dataGrid/common/rowDragging/functional.ts | 1 + .../tests/dataGrid/common/toast.ts | 19 +++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts index 58fef5a44869..df30f9a5ac25 100644 --- a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts +++ b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts @@ -7,7 +7,7 @@ import { testScreenshot } from '../../../helpers/themeUtils'; fixture.disablePageReloads`Toasts in TreeList` .page(url(__dirname, '../../container.html')); -test('Toast should be visible after calling and should be not visible after default display time', async (t) => { +test('Toast should be visible after calling', async (t) => { const treeList = new TreeList('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); await t @@ -26,3 +26,21 @@ test('Toast should be visible after calling and should be not visible after defa }).before(async () => { await createWidget('dxTreeList', {}); }); + +test('Toast should hide after the display time', async (t) => { + const treeList = new TreeList('#container'); + + await t + .expect(treeList.isReady()) + .ok(); + + await treeList.apiShowErrorToast({ displayTime: 1000 }); + await t + .expect(treeList.getToast().exists).ok(); + + await t + .wait(1000) + .expect(treeList.getToast().exists).notOk(); +}).before(async () => { + await createWidget('dxTreeList', {}); +}); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts index 869c69cc3b42..b60b5623bf5c 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-misused-promises */ import { ClientFunction, Selector } from 'testcafe'; import DataGrid, { CLASS as DataGridClassNames } from 'devextreme-testcafe-models/dataGrid'; import { ClassNames } from 'devextreme-testcafe-models/dataGrid/classNames'; diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts index e057f136ee1d..2ab51400f401 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts @@ -23,7 +23,24 @@ test('Toast should be visible after calling and should be not visible after defa await t .expect(compareResults.isValid()) .ok(compareResults.errorMessages()); - await t.expect(dataGrid.getToast().exists).notOk(); +}).before(async () => { + await createWidget('dxDataGrid', {}); +}); + +test('Toast should hide after the display time', async (t) => { + const dataGrid = new DataGrid('#container'); + + await t + .expect(dataGrid.isReady()) + .ok(); + + await dataGrid.apiShowErrorToast({ displayTime: 1000 }); + await t + .expect(dataGrid.getToast().exists).ok(); + + await t + .wait(1000) + .expect(dataGrid.getToast().exists).notOk(); }).before(async () => { await createWidget('dxDataGrid', {}); }); From d1bbc3265e7787a26d890bb53ca827c6b4a11133 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Tue, 7 Jul 2026 17:14:12 +0600 Subject: [PATCH 03/26] fix toast test --- e2e/testcafe-devextreme/tests/common/treeList/toast.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts index df30f9a5ac25..1ac20be34678 100644 --- a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts +++ b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts @@ -22,7 +22,6 @@ test('Toast should be visible after calling', async (t) => { await t .expect(compareResults.isValid()) .ok(compareResults.errorMessages()); - await t.expect(treeList.getToast().exists).notOk(); }).before(async () => { await createWidget('dxTreeList', {}); }); From a62c9f16cc9959f528d4bb8cae48283f835b9a7b Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Tue, 7 Jul 2026 23:52:30 +0600 Subject: [PATCH 04/26] stabilize --- .../cardView/columnChooser/functional.ts | 3 ++- .../aiColumn/virtualScrolling.functional.ts | 20 ++++++------------- .../keyboardNavigation.functional.ts | 6 ++++-- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts index 934ac2682c00..f8c7ed7e9361 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts @@ -66,7 +66,6 @@ function testsFactory(testModel: { await testModel.assertFirstColumnHidden(t, cardView); await testModel.showFirstColumn(t, cardView); - await testModel.assertFirstColumnVisible(t, cardView); await testModel.hideFirstColumn(t, cardView); @@ -98,12 +97,14 @@ testsFactory({ async hideFirstColumn(t: TestController, cardView: CardView) { await t.click( cardView.getColumnChooser().getCheckbox(0), + { offsetX: 5, offsetY: 5 }, ); await t.expect(cardView.isReady()).ok(); }, async showFirstColumn(t: TestController, cardView: CardView) { await t.click( cardView.getColumnChooser().getCheckbox(0), + { offsetX: 5, offsetY: 5 }, ); await t.expect(cardView.isReady()).ok(); }, diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts index 140c68106469..3bcc7a9a5635 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts @@ -24,6 +24,8 @@ const checkAIColumnTexts = async ( } }; +const isAIRequestPending = ClientFunction(() => !!(window as any).aiResolve); + const resolveAIRequest = ClientFunction((): void => { const { aiResponseData } = (window as any); const { aiResolve } = (window as any); @@ -45,13 +47,8 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho // arrange const dataGrid = new DataGrid(DATA_GRID_SELECTOR); - // assert - await t - .expect(dataGrid.getLoadPanel().isVisible()) - .ok(); - // act - await t.expect(dataGrid.isReady()).ok(); + await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert @@ -77,7 +74,7 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho .ok(); // act - await t.expect(dataGrid.isReady()).ok(); + await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert @@ -150,13 +147,8 @@ test('DataGrid should send an AI request for rendered rows after scrolling with // arrange const dataGrid = new DataGrid(DATA_GRID_SELECTOR); - // assert - await t - .expect(dataGrid.getLoadPanel().isVisible()) - .ok(); - // act - await t.expect(dataGrid.isReady()).ok(); + await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert @@ -182,7 +174,7 @@ test('DataGrid should send an AI request for rendered rows after scrolling with .ok(); // act - await t.expect(dataGrid.isReady()).ok(); + await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index 099752eb961e..cf619fcedf95 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -2970,7 +2970,8 @@ test('New mode. A cell should be focused when the PageDow/Up key is pressed (T89 // act await t - .pressKey('pagedown'); + .pressKey('pagedown') + .expect(dataGrid.isReady()).ok(); // assert const focusedRowIndex = await dataGrid.option('focusedRowIndex'); @@ -2984,7 +2985,8 @@ test('New mode. A cell should be focused when the PageDow/Up key is pressed (T89 // act await t - .pressKey('pageup'); + .pressKey('pageup') + .expect(dataGrid.isReady()).ok(); // assert await t From ee8440102dca275307c6e9c05cd28b20905304ff Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Wed, 8 Jul 2026 02:05:54 +0600 Subject: [PATCH 05/26] fix tests --- .../tests/cardView/columnSortable/functional.ts | 5 ++--- .../common/keyboardNavigation/keyboardNavigation.visual.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts index 83db68e7cc72..9ee77dbd93b8 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts @@ -115,10 +115,10 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` await dragToHeaderPanel(t, cardView, columnElement, gapIndex); - const headerPanelColumns = [2, 3, 4]; + const headerPanelColumns = [2, 3]; headerPanelColumns.splice(gapIndex, 0, columnIndex); - const chooserColumns = [0, 1, 2, 3, 4].filter((c) => !headerPanelColumns.includes(c)); + const chooserColumns = [0, 1].filter((c) => c !== columnIndex); await expectColumns(t, cardView, headerPanelColumns); await expectColumns(t, cardView, chooserColumns, 'columnChooser'); @@ -129,7 +129,6 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` { dataField: 'Column 1', visible: false }, { dataField: 'Column 2' }, { dataField: 'Column 3' }, - { dataField: 'Column 4' }, ], })); }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts index 29f837bd4ad7..efce971515c0 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -720,7 +720,7 @@ test('Navigate to first cell in the first row when virtual scrolling and columns }, })); - test(`${useNative ? 'Native' : 'Simulated'} scrolling: Focus should be on the last focusable cell when pressing the Ctrl + Home key when row dragging, virtual scrolling and columns are enabled`, async (t) => { + test(`${useNative ? 'Native' : 'Simulated'} scrolling: Focus should be on the last focusable cell when pressing the Ctrl + End key when row dragging, virtual scrolling and columns are enabled`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); @@ -732,7 +732,7 @@ test('Navigate to first cell in the first row when virtual scrolling and columns await t .click(dataGrid.getDataCell(0, 0).element) .pressKey('ctrl+end') - .wait(1000); + .wait(2000); await testScreenshot(t, takeScreenshot, `${useNative ? 'native' : 'simulated'}_scrolling_-_navigate_to_last_cell_row_dragging__virtual_scrolling__virtual_columns.png`, { element: dataGrid.element }); From 6c0a5d6f6a475b015f02a168650c4a61ff141ff9 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Wed, 8 Jul 2026 14:49:21 +0600 Subject: [PATCH 06/26] apply kbn test fixes --- .../keyboardNavigation.functional.ts | 100 ++++-------------- 1 file changed, 18 insertions(+), 82 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index cf619fcedf95..c8379c4b2f70 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -27,7 +27,7 @@ const getOnKeyDownCallCount = ClientFunction(() => (window as any).onKeyDownCall fixture.disablePageReloads`Keyboard Navigation - common` .page(url(__dirname, '../../../container.html')); -test.meta({ unstable: true })('Changing keyboardNavigation options should not invalidate the entire content (T1197829)', async (t) => { +test('Changing keyboardNavigation options should not invalidate the entire content (T1197829)', async (t) => { const dataGrid = new DataGrid('#container'); await t .expect(dataGrid.isReady()) @@ -167,9 +167,7 @@ test('Navigation via the Tab key should work when cellRender/cellComponent is us // eslint-disable-next-line no-underscore-dangle dataGrid._getTemplate = () => ({ render(options) { - setTimeout(() => { - options.deferred?.resolve(); - }, 100); + Promise.resolve().then(() => options.deferred?.resolve()); }, }); @@ -1870,7 +1868,7 @@ test('The expand cell should not lose focus on expanding a master row (T892203)' columns: ['a', 'b'], })); - test.meta({ unstable: true })(`${editMode} mode - Shift+Tab from the first editable cell should move focus to the last header (T1329750)`, async (t) => { + test(`${editMode} mode - Shift+Tab from the first editable cell should move focus to the last header (T1329750)`, async (t) => { const dataGrid = new DataGrid('#container') as any; const cell00 = dataGrid.getDataCell(0, 0); const editor00 = cell00.getEditor(); @@ -1880,7 +1878,6 @@ test('The expand cell should not lose focus on expanding a master row (T892203)' await t .click(cell00.element) - .expect(cell00.isFocused).ok() .expect(editor00.element.focused) .ok() @@ -3068,7 +3065,7 @@ test('New mode. A cell should be focused when the PageDow/Up key is pressed (T89 }); }); -test.meta({ unstable: true })('Cells should be focused after saving data when filter is applied and cell mode is used (T1029906)', async (t) => { +test('Cells should be focused after saving data when filter is applied and cell mode is used (T1029906)', async (t) => { const dataGrid = new DataGrid('#container'); await t .expect(dataGrid.isReady()) @@ -3110,6 +3107,8 @@ test.meta({ unstable: true })('Cells should be focused after saving data when fi .pressKey('d') .pressKey('enter'); + await t.expect(dataGrid.isReady()).ok(); + const visibleRows = await dataGrid.apiGetVisibleRows(); // assert @@ -3149,7 +3148,6 @@ test.meta({ unstable: true })('Cells should be focused after saving data when fi enterKeyDirection: 'column', editOnKeyPress: true, }, - editing: { mode: 'cell', allowUpdating: true, @@ -3693,70 +3691,6 @@ test('Window should not be scrolled after clicking on freespace row (T1104035)', height: 1500, })); -test('edit => scroll => command, should not result in grid scrolling back to edit', async (t) => { - const dataGrid = new DataGrid('#container'); - await t - .expect(dataGrid.isReady()) - .ok(); - - await t.wait(100); - await ClientFunction(() => { - const grid = ($('#container') as any).dxDataGrid('instance'); - setTimeout(() => { - grid.getCellElement(1, 1).trigger('dxclick'); - setTimeout(() => { - grid.getScrollable().scrollTo({ x: 10000 }); - setTimeout( - () => { $('.dx-link-delete').first().trigger('focusin'); }, - 100, - ); - }, 100); - }, 500); - })(); - - await t.wait(100) - .expect(dataGrid.getScrollLeft()) - .notEql(0); -}).before(async () => createWidget('dxDataGrid', { - editing: { - mode: 'cell', - allowUpdating: true, - allowDeleting: true, - }, - width: 900, - scrolling: { - useNative: false, - }, - dataSource: [ - { - ID: 1, Prefix: '1', FirstName: '1', LastName: '1', StateID: '1', BirthDate: '1', - }, { - ID: 2, Prefix: '2', FirstName: '2', LastName: '2', StateID: '2', BirthDate: '2', - }, - ], - columns: [ - { - dataField: 'Prefix', - caption: 'Title', - width: 200, - }, - { dataField: 'FirstName', width: 200 }, - { dataField: 'LastName', width: 200 }, { - dataField: 'Position', - width: 200, - }, { - dataField: 'StateID', - caption: 'State', - width: 200, - - }, { - dataField: 'BirthDate', - dataType: 'date', - width: 200, - }, - ], -})); - test('Navigation shouldn\'t get stuck on cell templates with links in them when navigating from outside the grid (T1123129)', async (t) => { const dataGrid = new DataGrid('#container'); await t @@ -6245,7 +6179,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when virtual scrolling and columns are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test(`Focus events should be called when pressing the Ctrl + End key when virtual scrolling and columns are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6269,8 +6203,9 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t.pressKey('ctrl+end'); - await t.wait(100); + await t + .pressKey('ctrl+end') + .expect(dataGrid.isReady()).ok(); // assert await t @@ -6325,7 +6260,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when rowRenderingMode is 'virtual' (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test(`Focus events should be called when pressing the Ctrl + End key when rowRenderingMode is 'virtual' (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6351,7 +6286,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .wait(100); + .expect(dataGrid.isReady()).ok(); // assert await t @@ -6405,7 +6340,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when infinite scrolling is enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test(`Focus events should be called when pressing the Ctrl + End key when infinite scrolling is enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6432,7 +6367,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .wait(100); + .expect(dataGrid.isReady()).ok(); // assert await t @@ -6663,7 +6598,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when virtual columns, virtual scrolling and focusedRowEnabled are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test(`Focus events should be called when pressing the Ctrl + End key when virtual columns, virtual scrolling and focusedRowEnabled are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6687,8 +6622,9 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t.pressKey('ctrl+end'); - await t.wait(1000); + await t + .pressKey('ctrl+end') + .expect(dataGrid.isReady()).ok(); // assert await t From dad40bc164b5abc4013ddd81873f79ea00c0f2f7 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Wed, 8 Jul 2026 16:05:23 +0600 Subject: [PATCH 07/26] fix kbn tests --- .../keyboardNavigation.functional.ts | 64 ++++++++++++++++--- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index c8379c4b2f70..7c5bf6648567 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -6048,7 +6048,14 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t.pressKey('ctrl+end'); + await t + .pressKey('ctrl+end') + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6125,7 +6132,14 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t.pressKey('ctrl+end'); + await t + .pressKey('ctrl+end') + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6205,7 +6219,12 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.isReady()).ok(); + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6286,7 +6305,12 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.isReady()).ok(); + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6367,7 +6391,12 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.isReady()).ok(); + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6445,7 +6474,14 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t.pressKey('ctrl+end'); + await t + .pressKey('ctrl+end') + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6533,7 +6569,14 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t.pressKey('ctrl+end'); + await t + .pressKey('ctrl+end') + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t @@ -6624,7 +6667,12 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.isReady()).ok(); + .expect(dataGrid.getScrollTop()) + .gte(0) + .expect(dataGrid.getScrollLeft()) + .gte(0) + .expect(dataGrid.isReady()) + .ok(); // assert await t From 9bab13934692b9863b568788f991882ad5cab967 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Wed, 8 Jul 2026 17:57:59 +0600 Subject: [PATCH 08/26] fix kbn tests --- .../keyboardNavigation.functional.ts | 56 +++---------------- 1 file changed, 8 insertions(+), 48 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index 7c5bf6648567..885b1405635d 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -6050,12 +6050,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6134,12 +6129,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6219,12 +6209,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6305,12 +6290,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6391,12 +6371,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6476,12 +6451,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6571,12 +6541,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t @@ -6667,12 +6632,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .expect(dataGrid.getScrollTop()) - .gte(0) - .expect(dataGrid.getScrollLeft()) - .gte(0) - .expect(dataGrid.isReady()) - .ok(); + .wait(500); // assert await t From 7ac89621ba952626453d4b8a6d5c07948a3c4902 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 12:49:44 +0600 Subject: [PATCH 09/26] fix flaky tests --- .../tests/cardView/columnSortable/utils.ts | 35 +++++++++---------- .../dataGrid/common/editing/functional.ts | 14 ++++++-- .../focus/focusEvents/newRows_T1162227.ts | 8 ++++- .../tests/dataGrid/common/headerPanel.ts | 7 +++- .../tests/dataGrid/common/selection.ts | 10 ++++-- 5 files changed, 50 insertions(+), 24 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts index 1d9d654acc65..c2d60ccff3aa 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts @@ -79,24 +79,26 @@ export const dragToHeaderPanel = async ( if (gapIndex < columnsNum) { const insertBeforeColumn = headers.getHeaderItemNth(gapIndex).element; + const { width } = await insertBeforeColumn.boundingClientRect; await t.dragToElement( columnElement, insertBeforeColumn, { - destinationOffsetX: 5, + destinationOffsetX: -(width + 5), // 5px left of the left edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, ); } else { const insertAfterColumn = headers.getHeaderItemNth(columnsNum - 1).element; + const { width } = await insertAfterColumn.boundingClientRect; await t.dragToElement( columnElement, insertAfterColumn, { - destinationOffsetX: -5, + destinationOffsetX: (width + 5), // 5px right of the right edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, @@ -139,23 +141,20 @@ export const expectColumns = async ( expectedColumns: number[], source: 'headerPanel' | 'columnChooser' = 'headerPanel', ): Promise => { + const actualColumns: string[] = []; const adjustedExpectedColumns = expectedColumns.map((columnIndex) => `Column ${columnIndex}`); - for (let i = 0; i < expectedColumns.length; i += 1) { - // eslint-disable-next-line @typescript-eslint/init-declarations - let column: Selector; - - if (source === 'headerPanel') { - column = cardView.getHeaders().getHeaderItemNth(i)?.element; - } else { - const treeView = new TreeView(cardView.getColumnChooser().element.find(SELECTORS.treeView)); - column = treeView.getNodeItem(i); - } - - await t - .expect(column.exists) - .ok({ timeout: DRAG_ASSERTION_TIMEOUT }) - .expect(column.innerText) - .eql(adjustedExpectedColumns[i], { timeout: DRAG_ASSERTION_TIMEOUT }); + const actualColumnsCount = source === 'headerPanel' + ? await cardView.getHeaders().getHeaderItemsElements().count + : await cardView.getColumnChooser().getColumns().count; + + for (let i = 0; i < actualColumnsCount; i += 1) { + const column = source === 'headerPanel' + ? cardView.getHeaders().getHeaderItemNth(i).element + : cardView.getColumnChooser().getColumn(i); + + actualColumns.push(await column.innerText); } + + await t.expect(actualColumns).eql(adjustedExpectedColumns, 'Columns order should match'); }; diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts index fbe068aeb6c5..79781aa36c88 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts @@ -68,9 +68,15 @@ test('DataGrid - The "Cannot read properties of undefined error" occurs when usi await t .click(dataGrid.getDataCell(0, 0).element) .typeText(dataGrid.getDataCell(0, 0).element, 'new_value') - .pressKey('enter tab tab'); + .pressKey('enter tab tab') + .expect(dataGrid.getDataCell(2, 0).isFocused) + .ok(); + await resolveOnSavingDeferred(); - await t.expect(dataGrid.getDataCell(2, 0).isFocused).ok(); + + await t + .expect(dataGrid.isReady()).ok() + .expect(dataGrid.getDataCell(2, 0).isFocused).ok(); }).before(async () => { await ClientFunction(() => { (window as any).deferred = $.Deferred(); @@ -94,6 +100,10 @@ test('DataGrid - The "Cannot read properties of undefined error" occurs when usi e.promise = (window as any).deferred; }, }); +}).after(async () => { + await ClientFunction(() => { + delete (window as any).deferred; + })(); }); test('Tab key on editor should focus next cell if editing mode is cell', async (t) => { diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts index 4c07828aef26..f428baa0b915 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusEvents/newRows_T1162227.ts @@ -252,7 +252,13 @@ test('It should fire rowChanged event on initialization if focusedRowKey options [1], ]; - await t.expect(dataGrid.getDataRow(1).element).ok(); + // The focused row is applied asynchronously on initialization: + // wait for it before collecting callback results (one-shot read, no retries) + await t + .expect(dataGrid.isReady()) + .ok() + .expect(dataGrid.getDataRow(1).isFocusedRow) + .ok(); const [ , diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts index bdfb50852195..ae84d69c3e34 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/headerPanel.ts @@ -90,7 +90,12 @@ test('Drop-down window should be positioned correctly after resizing the toolbar test('Disabled toolbar buttons should be grayed out in Material themes (T1217416)', async (t) => { const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); - await t.expect(dataGrid.isReady()).ok(); + + await t + .expect(dataGrid.isReady()) + .ok() + .expect(dataGrid.getDataRow(4).element.exists) + .ok(); await testScreenshot(t, takeScreenshot, 'disabled-toolbar-buttons.png', { element: dataGrid.element }); await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts index e0389b27dc63..4d5b755d2812 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/selection.ts @@ -257,11 +257,17 @@ test('"Select All" checkbox should not react when not visible', async (t) => { ); const editorCell = dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(0).element; - await t.expect(await selectAllCheckBox.option('visible')).notOk(); + await t + .expect(selectAllCheckBox.element.exists) + .ok() + .expect(selectAllCheckBox.element.visible) + .notOk(); await t.click(editorCell); - await t.expect(await selectAllCheckBox.option('visible')).notOk(); + await t + .expect(selectAllCheckBox.element.visible) + .notOk(); }).before(async () => createWidget('dxDataGrid', { dataSource: [], keyExpr: 'orderId', From 2b141b15124ab8c87842f0bec2c0a28a7a1e84d9 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 13:25:10 +0600 Subject: [PATCH 10/26] fix cardview column drag --- .../tests/cardView/columnSortable/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts index c2d60ccff3aa..ff8688d4148c 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts @@ -85,7 +85,7 @@ export const dragToHeaderPanel = async ( columnElement, insertBeforeColumn, { - destinationOffsetX: -(width + 5), // 5px left of the left edge + destinationOffsetX: -(Math.floor(width) + 5), // 5px left of the left edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, @@ -98,7 +98,7 @@ export const dragToHeaderPanel = async ( columnElement, insertAfterColumn, { - destinationOffsetX: (width + 5), // 5px right of the right edge + destinationOffsetX: (Math.floor(width) + 5), // 5px right of the right edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, From c419f906f927907989b7d357f171c62e036a8782 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 13:52:37 +0600 Subject: [PATCH 11/26] fix cardview columnchooser testt --- .../tests/cardView/columnChooser/functional.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts index f8c7ed7e9361..9c49e717dacf 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts @@ -61,6 +61,7 @@ function testsFactory(testModel: { await t.expect(cardView.isReady()).ok(); await cardView.apiShowColumnChooser(); + await t.expect(cardView.getColumnChooser().isOpened).ok(); await testModel.hideFirstColumn(t, cardView); await testModel.assertFirstColumnHidden(t, cardView); @@ -97,14 +98,12 @@ testsFactory({ async hideFirstColumn(t: TestController, cardView: CardView) { await t.click( cardView.getColumnChooser().getCheckbox(0), - { offsetX: 5, offsetY: 5 }, ); await t.expect(cardView.isReady()).ok(); }, async showFirstColumn(t: TestController, cardView: CardView) { await t.click( cardView.getColumnChooser().getCheckbox(0), - { offsetX: 5, offsetY: 5 }, ); await t.expect(cardView.isReady()).ok(); }, From 4603c3a5781ea55ef9e130ea3ccacbf781347665 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 14:06:35 +0600 Subject: [PATCH 12/26] fix again --- .../tests/cardView/columnChooser/functional.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts index 9c49e717dacf..291485ac2d03 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts @@ -61,7 +61,7 @@ function testsFactory(testModel: { await t.expect(cardView.isReady()).ok(); await cardView.apiShowColumnChooser(); - await t.expect(cardView.getColumnChooser().isOpened).ok(); + await t.expect(cardView.getColumnChooser().element.exists).ok(); await testModel.hideFirstColumn(t, cardView); await testModel.assertFirstColumnHidden(t, cardView); From f0030a7b45848cbdbb05fc8480b96c940fb259c7 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 15:04:58 +0600 Subject: [PATCH 13/26] fix cardview test --- .../tests/cardView/columnSortable/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts index ff8688d4148c..840fb402ee17 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts @@ -85,7 +85,7 @@ export const dragToHeaderPanel = async ( columnElement, insertBeforeColumn, { - destinationOffsetX: -(Math.floor(width) + 5), // 5px left of the left edge + destinationOffsetX: -(Math.floor(width) + 3), // 5px left of the left edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, @@ -98,7 +98,7 @@ export const dragToHeaderPanel = async ( columnElement, insertAfterColumn, { - destinationOffsetX: (Math.floor(width) + 5), // 5px right of the right edge + destinationOffsetX: (Math.floor(width) + 3), // 5px right of the right edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, From 16ebd6e056e0165b0fe97db9b721df7799425f35 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov <84278206+Tucchhaa@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:22:10 +0600 Subject: [PATCH 14/26] fix Signed-off-by: Eldar Iusupzhanov <84278206+Tucchhaa@users.noreply.github.com> --- .../tests/dataGrid/common/editing/functional.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts index 79781aa36c88..0168fb6ee698 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts @@ -68,7 +68,10 @@ test('DataGrid - The "Cannot read properties of undefined error" occurs when usi await t .click(dataGrid.getDataCell(0, 0).element) .typeText(dataGrid.getDataCell(0, 0).element, 'new_value') - .pressKey('enter tab tab') + .pressKey('enter') + .expect(dataGrid.getDataCell(0, 0).isEditCell) + .notOk() + .pressKey('tab tab') .expect(dataGrid.getDataCell(2, 0).isFocused) .ok(); From 4f896a37bbe93015ac9e1ddceae0d7de822714f5 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov <84278206+Tucchhaa@users.noreply.github.com> Date: Thu, 9 Jul 2026 15:37:59 +0600 Subject: [PATCH 15/26] fix Signed-off-by: Eldar Iusupzhanov <84278206+Tucchhaa@users.noreply.github.com> --- .../tests/dataGrid/common/editing/functional.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts index 0168fb6ee698..f2b87feeccf2 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts @@ -69,6 +69,7 @@ test('DataGrid - The "Cannot read properties of undefined error" occurs when usi .click(dataGrid.getDataCell(0, 0).element) .typeText(dataGrid.getDataCell(0, 0).element, 'new_value') .pressKey('enter') + .expect(dataGrid.isReady()).ok() .expect(dataGrid.getDataCell(0, 0).isEditCell) .notOk() .pressKey('tab tab') From cdf9d31549a95c37cc34e371f3d31531ef39ddcb Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 23:08:08 +0600 Subject: [PATCH 16/26] stabilize --- .../tests/dataGrid/common/editing/functional.ts | 5 ++--- .../keyboardNavigation/keyboardNavigation.functional.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts index f2b87feeccf2..bb48601a0e9a 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts @@ -69,9 +69,8 @@ test('DataGrid - The "Cannot read properties of undefined error" occurs when usi .click(dataGrid.getDataCell(0, 0).element) .typeText(dataGrid.getDataCell(0, 0).element, 'new_value') .pressKey('enter') - .expect(dataGrid.isReady()).ok() - .expect(dataGrid.getDataCell(0, 0).isEditCell) - .notOk() + .expect(dataGrid.isReady()) + .ok() .pressKey('tab tab') .expect(dataGrid.getDataCell(2, 0).isFocused) .ok(); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index 885b1405635d..6218b2c56b97 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -6344,7 +6344,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test(`Focus events should be called when pressing the Ctrl + End key when infinite scrolling is enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when infinite scrolling is enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6371,7 +6371,7 @@ test('The last cell should be focused after changing the page size (T1063530)', // act await t .pressKey('ctrl+end') - .wait(500); + .expect(dataGrid.isReady()).ok(); // assert await t From 4b23b81dc6088216455ff3aa776b9a751ec44369 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Thu, 9 Jul 2026 23:44:40 +0600 Subject: [PATCH 17/26] fix another test --- .../tests/dataGrid/common/editing/editing.functional_matrix.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/editing.functional_matrix.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/editing.functional_matrix.ts index 3ee950629fea..a666b25b0359 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/editing.functional_matrix.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/editing.functional_matrix.ts @@ -409,6 +409,7 @@ editingModes.forEach((mode) => { await clickCellEditor(t, mode, columnInfo, form, cell, editor); await setEditorValue(t, mode, columnInfo, editor, false, useMask); + await t.expect(dataGrid.isReady()).ok(); } const saveButton = getSaveButton(mode, form); From 230ea5ee6508dc6120bdc12cd2870c5bd4a5ae3a Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Fri, 10 Jul 2026 00:08:34 +0600 Subject: [PATCH 18/26] stabilize another test --- .../common/keyboardNavigation/keyboardNavigation.visual.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts index efce971515c0..33222842827a 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -568,6 +568,7 @@ test('Navigate to first cell in the first row when virtual scrolling is enabled' await t .click(dataGrid.getDataCell(199, 14).element) .pressKey('ctrl+home') + .expect(dataGrid.isReady()).ok() .wait(1000); await testScreenshot(t, takeScreenshot, 'navigate_to_first_cell_in_first_row_when_virtual_scrolling_is_enabled_2.png', { element: dataGrid.element }); From a969b234b3061dcb9fff85d99b5c705ad9ce5cbd Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Fri, 10 Jul 2026 00:13:21 +0600 Subject: [PATCH 19/26] refix --- .../common/keyboardNavigation/keyboardNavigation.visual.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts index 33222842827a..89d4b9b2a98b 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -568,7 +568,8 @@ test('Navigate to first cell in the first row when virtual scrolling is enabled' await t .click(dataGrid.getDataCell(199, 14).element) .pressKey('ctrl+home') - .expect(dataGrid.isReady()).ok() + .expect(dataGrid.getScrollLeft()) + .eql(0); .wait(1000); await testScreenshot(t, takeScreenshot, 'navigate_to_first_cell_in_first_row_when_virtual_scrolling_is_enabled_2.png', { element: dataGrid.element }); From ffc703387a40ee0e01a14f0ad396af2efbf4f87e Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Fri, 10 Jul 2026 00:18:31 +0600 Subject: [PATCH 20/26] fix ts --- .../common/keyboardNavigation/keyboardNavigation.visual.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts index 89d4b9b2a98b..32e0dc55f51c 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -569,7 +569,7 @@ test('Navigate to first cell in the first row when virtual scrolling is enabled' .click(dataGrid.getDataCell(199, 14).element) .pressKey('ctrl+home') .expect(dataGrid.getScrollLeft()) - .eql(0); + .eql(0) .wait(1000); await testScreenshot(t, takeScreenshot, 'navigate_to_first_cell_in_first_row_when_virtual_scrolling_is_enabled_2.png', { element: dataGrid.element }); From 4f7410d48fcc01ab8ff6153b709f2828c47ed7ec Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Fri, 10 Jul 2026 12:03:08 +0600 Subject: [PATCH 21/26] stabilize --- .../tests/dataGrid/common/editing/functional.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts index bb48601a0e9a..da6c2daafeeb 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts @@ -2329,7 +2329,8 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(0, 0).getEditor().element, '1') - .click(dataGrid.getDataCell(1, 0).getEditor().element); + .click(dataGrid.getDataCell(1, 0).getEditor().element) + .expect(dataGrid.isReady()).ok(); await t.expect(getStoredName(1)).eql('Name 11'); @@ -2345,7 +2346,8 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(1, 0).getEditor().element, '2') - .click(dataGrid.getDataCell(2, 0).getEditor().element); + .click(dataGrid.getDataCell(2, 0).getEditor().element) + .expect(dataGrid.isReady()).ok(); await t.expect(getStoredName(2)).eql('Name 22'); @@ -2356,12 +2358,15 @@ test('Cells should be focused correctly on click when cell editing mode is used .expect(dataGrid.getDataCell(2, 0).isFocused) .ok() .expect(dataGrid.getDataCell(2, 0).getEditor().element.focused) + .ok() + .expect(dataGrid.isReady()) .ok(); // act await t .typeText(dataGrid.getDataCell(2, 0).getEditor().element, '3') - .click(dataGrid.getDataCell(1, 0).getEditor().element); + .click(dataGrid.getDataCell(1, 0).getEditor().element) + .expect(dataGrid.isReady()).ok(); await t.expect(getStoredName(3)).eql('Name 33'); @@ -2377,7 +2382,8 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(1, 0).getEditor().element, '2') - .click(dataGrid.getDataCell(0, 0).getEditor().element); + .click(dataGrid.getDataCell(0, 0).getEditor().element) + .expect(dataGrid.isReady()).ok(); await t.expect(getStoredName(2)).eql('Name 222'); From 16c6d6f1e1cc4233b08204e30b8895ccc4a004de Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Mon, 13 Jul 2026 17:10:00 +0600 Subject: [PATCH 22/26] apply review --- .../cardView/columnChooser/functional.ts | 5 +- .../cardView/columnSortable/functional.ts | 34 +++++---- .../tests/cardView/columnSortable/utils.ts | 10 ++- .../tests/common/treeList/toast.ts | 17 ++++- .../aiColumn/virtualScrolling.functional.ts | 22 +++++- .../dataGrid/common/editing/functional.ts | 28 ++++--- .../keyboardNavigation.functional.ts | 73 +++++++++---------- .../keyboardNavigation.visual.ts | 11 ++- .../tests/dataGrid/common/toast.ts | 17 ++++- .../error_handling/m_error_handling.ts | 5 +- packages/testcafe-models/dataGrid/index.ts | 7 +- 11 files changed, 137 insertions(+), 92 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts index 291485ac2d03..1ac05b09885b 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts @@ -58,10 +58,11 @@ function testsFactory(testModel: { }) { test(`column chooser in ${testModel.name} mode should work after multiple hide/show actions`, async (t) => { const cardView = new CardView('#container'); - await t.expect(cardView.isReady()).ok(); await cardView.apiShowColumnChooser(); - await t.expect(cardView.getColumnChooser().element.exists).ok(); + + // Focus column chooser before clicking on checkboxes to avoid test flakiness + await cardView.getColumnChooser().focusList(); await testModel.hideFirstColumn(t, cardView); await testModel.assertFirstColumnHidden(t, cardView); diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts index 9ee77dbd93b8..af7bf3f3c99a 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/functional.ts @@ -30,15 +30,17 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` await triggerDragStart(columnElement); - const draggingElement = Selector(SELECTORS.dragging); - - if (result) { - await t.expect(draggingElement.exists).ok(); - } else { - await t.expect(draggingElement.exists).notOk(); + try { + const draggingElement = Selector(SELECTORS.dragging); + + if (result) { + await t.expect(draggingElement.exists).ok(); + } else { + await t.expect(draggingElement.exists).notOk(); + } + } finally { + await triggerDragEnd(columnElement); } - - await triggerDragEnd(columnElement); }).before(async () => createWidget('dxCardView', { allowColumnReordering, columns: [{ @@ -62,15 +64,17 @@ fixture.disablePageReloads`CardView - ColumnSortable.Functional` await triggerDragStart(columnElement); - const draggingElement = Selector(SELECTORS.dragging); + try { + const draggingElement = Selector(SELECTORS.dragging); - if (result) { - await t.expect(draggingElement.exists).ok(); - } else { - await t.expect(draggingElement.exists).notOk(); + if (result) { + await t.expect(draggingElement.exists).ok(); + } else { + await t.expect(draggingElement.exists).notOk(); + } + } finally { + await triggerDragEnd(columnElement); } - - await triggerDragEnd(columnElement); }).before(async () => createWidget('dxCardView', { allowColumnReordering: true, columns: [{ diff --git a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts index 840fb402ee17..e69b369b3630 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnSortable/utils.ts @@ -85,7 +85,7 @@ export const dragToHeaderPanel = async ( columnElement, insertBeforeColumn, { - destinationOffsetX: -(Math.floor(width) + 3), // 5px left of the left edge + destinationOffsetX: -(Math.floor(width) + 3), // 3px left of the left edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, @@ -98,7 +98,7 @@ export const dragToHeaderPanel = async ( columnElement, insertAfterColumn, { - destinationOffsetX: (Math.floor(width) + 3), // 5px right of the right edge + destinationOffsetX: (Math.floor(width) + 3), // 3px right of the right edge destinationOffsetY: HEADER_DROP_OFFSET_Y, speed: 0.5, }, @@ -121,6 +121,12 @@ export const dragToColumnChooser = async ( const treeView = columnChooser.element.find(SELECTORS.treeView); await t.dragToElement(columnElement, treeView); + + await t + .expect(Selector(SELECTORS.dragging).exists) + .notOk({ timeout: DRAG_ASSERTION_TIMEOUT }) + .expect(cardView.isReady()) + .ok({ timeout: DRAG_ASSERTION_TIMEOUT }); }; export const arrayMoveToGap = (arr: number[], index: number, gapIndex: number): number[] => { diff --git a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts index 1ac20be34678..2b4c537f4480 100644 --- a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts +++ b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts @@ -1,12 +1,19 @@ import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; import TreeList from 'devextreme-testcafe-models/treeList'; +import { ClientFunction } from 'testcafe'; import url from '../../../helpers/getPageUrl'; import { createWidget } from '../../../helpers/createWidget'; import { testScreenshot } from '../../../helpers/themeUtils'; -fixture.disablePageReloads`Toasts in TreeList` +fixture`Toasts in TreeList` .page(url(__dirname, '../../container.html')); +const setToastDisplayTime = (displayTime: number) => ClientFunction(() => { + (window as any).DevExpress.ui.dxToast.defaultOptions({ + displayTime, + }); +}, { dependencies: { displayTime } })(); + test('Toast should be visible after calling', async (t) => { const treeList = new TreeList('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); @@ -14,7 +21,8 @@ test('Toast should be visible after calling', async (t) => { .expect(treeList.isReady()) .ok(); - await treeList.apiShowErrorToast({ displayTime: 100000 }); + await setToastDisplayTime(100000); + await treeList.apiShowErrorToast(); await t.expect(treeList.getToast().exists).ok(); await testScreenshot(t, takeScreenshot, 'ai-column__toast__at-the-right-position.png', { element: treeList.element }); @@ -33,12 +41,13 @@ test('Toast should hide after the display time', async (t) => { .expect(treeList.isReady()) .ok(); - await treeList.apiShowErrorToast({ displayTime: 1000 }); + await setToastDisplayTime(100); + await treeList.apiShowErrorToast(); await t .expect(treeList.getToast().exists).ok(); await t - .wait(1000) + .wait(150) .expect(treeList.getToast().exists).notOk(); }).before(async () => { await createWidget('dxTreeList', {}); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts index 3bcc7a9a5635..12791302cc74 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts @@ -47,8 +47,14 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho // arrange const dataGrid = new DataGrid(DATA_GRID_SELECTOR); + // assert + await t + .expect(dataGrid.getLoadPanel().isVisible()) + .ok() + .expect(isAIRequestPending()) + .ok(); + // act - await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert @@ -71,10 +77,11 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho .expect(dataGrid.getDataCell(20, 0).element.textContent) .eql('21') .expect(dataGrid.getLoadPanel().isVisible()) + .ok() + .expect(isAIRequestPending()) .ok(); // act - await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert @@ -147,8 +154,14 @@ test('DataGrid should send an AI request for rendered rows after scrolling with // arrange const dataGrid = new DataGrid(DATA_GRID_SELECTOR); + // assert + await t + .expect(dataGrid.getLoadPanel().isVisible()) + .ok() + .expect(isAIRequestPending()) + .ok(); + // act - await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert @@ -171,10 +184,11 @@ test('DataGrid should send an AI request for rendered rows after scrolling with .expect(dataGrid.getDataCell(20, 0).element.textContent) .eql('21') .expect(dataGrid.getLoadPanel().isVisible()) + .ok() + .expect(isAIRequestPending()) .ok(); // act - await t.expect(isAIRequestPending()).ok(); await resolveAIRequest(); // assert diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts index da6c2daafeeb..4acd172ae7b2 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/functional.ts @@ -2329,10 +2329,11 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(0, 0).getEditor().element, '1') - .click(dataGrid.getDataCell(1, 0).getEditor().element) - .expect(dataGrid.isReady()).ok(); + .click(dataGrid.getDataCell(1, 0).getEditor().element); - await t.expect(getStoredName(1)).eql('Name 11'); + await t + .expect(dataGrid.isReady()).ok() + .expect(getStoredName(1)).eql('Name 11'); // assert await t @@ -2346,10 +2347,11 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(1, 0).getEditor().element, '2') - .click(dataGrid.getDataCell(2, 0).getEditor().element) - .expect(dataGrid.isReady()).ok(); + .click(dataGrid.getDataCell(2, 0).getEditor().element); - await t.expect(getStoredName(2)).eql('Name 22'); + await t + .expect(dataGrid.isReady()).ok() + .expect(getStoredName(2)).eql('Name 22'); // assert await t @@ -2365,10 +2367,11 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(2, 0).getEditor().element, '3') - .click(dataGrid.getDataCell(1, 0).getEditor().element) - .expect(dataGrid.isReady()).ok(); + .click(dataGrid.getDataCell(1, 0).getEditor().element); - await t.expect(getStoredName(3)).eql('Name 33'); + await t + .expect(dataGrid.isReady()).ok() + .expect(getStoredName(3)).eql('Name 33'); // assert await t @@ -2382,10 +2385,11 @@ test('Cells should be focused correctly on click when cell editing mode is used // act await t .typeText(dataGrid.getDataCell(1, 0).getEditor().element, '2') - .click(dataGrid.getDataCell(0, 0).getEditor().element) - .expect(dataGrid.isReady()).ok(); + .click(dataGrid.getDataCell(0, 0).getEditor().element); - await t.expect(getStoredName(2)).eql('Name 222'); + await t + .expect(dataGrid.isReady()).ok() + .expect(getStoredName(2)).eql('Name 222'); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index 6218b2c56b97..5930f3c44376 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -2966,11 +2966,11 @@ test('New mode. A cell should be focused when the PageDow/Up key is pressed (T89 .eql(0); // act - await t - .pressKey('pagedown') - .expect(dataGrid.isReady()).ok(); + await t.pressKey('pagedown'); // assert + await t.expect(dataGrid.isReady()).ok(); + const focusedRowIndex = await dataGrid.option('focusedRowIndex'); await t .expect(dataGrid.getDataCell(focusedRowIndex, 0).isFocused) @@ -2981,12 +2981,11 @@ test('New mode. A cell should be focused when the PageDow/Up key is pressed (T89 .eql(0); // act - await t - .pressKey('pageup') - .expect(dataGrid.isReady()).ok(); + await t.pressKey('pageup'); // assert await t + .expect(dataGrid.isReady()).ok() .expect(dataGrid.getDataCell(0, 0).isFocused) .ok() .expect(dataGrid.option('focusedRowIndex')) @@ -3107,11 +3106,10 @@ test('Cells should be focused after saving data when filter is applied and cell .pressKey('d') .pressKey('enter'); + // assert await t.expect(dataGrid.isReady()).ok(); const visibleRows = await dataGrid.apiGetVisibleRows(); - - // assert await t .expect(visibleRows.length) .eql(4) @@ -3268,13 +3266,12 @@ test('Lookup editor should update cell value on down or up key when cell is focu .ok(); // act - await t - .typeText(filterRowEditor.element, 'Name') - .wait(1000); - - let visibleRows = await dataGrid.apiGetVisibleRows(); + await t.typeText(filterRowEditor.element, 'Name'); // assert + await t.expect(dataGrid.isReady()).ok(); + + let visibleRows = await dataGrid.apiGetVisibleRows(); await t .expect(visibleRows.length) .eql(5) @@ -3284,13 +3281,12 @@ test('Lookup editor should update cell value on down or up key when cell is focu .ok(); // act - await t - .typeText(filterRowEditor.element, '_1') - .wait(1000); - - visibleRows = await dataGrid.apiGetVisibleRows(); + await t.typeText(filterRowEditor.element, '_1'); // assert + await t.expect(dataGrid.isReady()).ok(); + + visibleRows = await dataGrid.apiGetVisibleRows(); await t .expect(visibleRows.length) .eql(2) @@ -6048,12 +6044,12 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()) + .ok() .expect(dataGrid.getDataCell(19, 14).element.focused) .ok() .expect(getOrderOfEventCalls()) @@ -6127,12 +6123,12 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()) + .ok() .expect(dataGrid.getDataCell(19, 34).element.focused) .ok() .expect(getOrderOfEventCalls()) @@ -6207,12 +6203,12 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()) + .ok() .expect(dataGrid.getDataCell(199, 34).element.focused) .ok() .expect(getOrderOfEventCalls()) @@ -6288,12 +6284,12 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()) + .ok() .expect(dataGrid.getDataCell(19, 14).element.focused) .ok() .expect(getOrderOfEventCalls()) @@ -6449,12 +6445,12 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()) + .ok() .expect(dataGrid.getDataCell(19, 14).element.focused) .ok() .expect(getOrderOfEventCalls()) @@ -6539,12 +6535,11 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()).ok() .expect(dataGrid.getDataCell(19, 34).element.focused) .ok() .expect(getOrderOfEventCalls()) @@ -6630,12 +6625,12 @@ test('The last cell should be focused after changing the page size (T1063530)', await resetFocusedEventsTestData(); // act - await t - .pressKey('ctrl+end') - .wait(500); + await t.pressKey('ctrl+end'); // assert await t + .expect(dataGrid.isReady()) + .ok() .expect(dataGrid.getDataCell(199, 34).element.focused) .ok() .expect(getOrderOfEventCalls()) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts index 32e0dc55f51c..f472879c85f6 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -733,12 +733,17 @@ test('Navigate to first cell in the first row when virtual scrolling and columns // act await t .click(dataGrid.getDataCell(0, 0).element) - .pressKey('ctrl+end') - .wait(2000); + .pressKey('ctrl+end'); + + // assert + await t + .expect(dataGrid.isReady()) + .ok() + .expect(dataGrid.getDataCell(199, 34).element.focused) + .ok(); await testScreenshot(t, takeScreenshot, `${useNative ? 'native' : 'simulated'}_scrolling_-_navigate_to_last_cell_row_dragging__virtual_scrolling__virtual_columns.png`, { element: dataGrid.element }); - // assert await t .expect(compareResults.isValid()) .ok(compareResults.errorMessages()); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts index 2ab51400f401..5e85c7d7cd46 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts @@ -1,13 +1,20 @@ import DataGrid from 'devextreme-testcafe-models/dataGrid'; import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; +import { ClientFunction } from 'testcafe'; import url from '../../../helpers/getPageUrl'; import { createWidget } from '../../../helpers/createWidget'; import { testScreenshot } from '../../../helpers/themeUtils'; -fixture.disablePageReloads`Toasts in DataGrid`.page( +fixture`Toasts in DataGrid`.page( url(__dirname, '../../container.html'), ); +const setToastDisplayTime = (displayTime: number) => ClientFunction(() => { + (window as any).DevExpress.ui.dxToast.defaultOptions({ + displayTime, + }); +}, { dependencies: { displayTime } })(); + test('Toast should be visible after calling and should be not visible after default display time', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); @@ -15,7 +22,8 @@ test('Toast should be visible after calling and should be not visible after defa .expect(dataGrid.isReady()) .ok(); - await dataGrid.apiShowErrorToast({ displayTime: 100000 }); + await setToastDisplayTime(100000); + await dataGrid.apiShowErrorToast(); await t.expect(dataGrid.getToast().exists).ok(); await testScreenshot(t, takeScreenshot, 'ai-column__toast__at-the-right-position.png', { element: dataGrid.element }); @@ -34,12 +42,13 @@ test('Toast should hide after the display time', async (t) => { .expect(dataGrid.isReady()) .ok(); - await dataGrid.apiShowErrorToast({ displayTime: 1000 }); + await setToastDisplayTime(100); + await dataGrid.apiShowErrorToast(); await t .expect(dataGrid.getToast().exists).ok(); await t - .wait(1000) + .wait(150) .expect(dataGrid.getToast().exists).notOk(); }).before(async () => { await createWidget('dxDataGrid', {}); diff --git a/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts b/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts index b4fa1b0aee6d..0445b1edb0e2 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/error_handling/m_error_handling.ts @@ -4,7 +4,6 @@ import eventsEngine from '@js/common/core/events/core/events_engine'; import messageLocalization from '@js/common/core/localization/message'; import $ from '@js/core/renderer'; import { each } from '@js/core/utils/iterator'; -import type { Properties as ToastProperties } from '@js/ui/toast'; import type { ColumnsController } from '@ts/grids/grid_core/columns_controller/m_columns_controller'; import type { ResizingController } from '@ts/grids/grid_core/views/m_grid_view'; @@ -159,8 +158,8 @@ export class ErrorHandlingController extends modules.ViewController { } } - public showToastError(message: string, options?: ToastProperties) { - this._toastViewController.showToast(message, { ...options, type: 'error' }); + public showToastError(message: string) { + this._toastViewController.showToast(message, { type: 'error' }); } } diff --git a/packages/testcafe-models/dataGrid/index.ts b/packages/testcafe-models/dataGrid/index.ts index 82ce1ec8116c..4a9ce0e9f039 100644 --- a/packages/testcafe-models/dataGrid/index.ts +++ b/packages/testcafe-models/dataGrid/index.ts @@ -1,7 +1,6 @@ import { ClientFunction, Selector } from 'testcafe'; import DataGridInstance from 'devextreme/ui/data_grid'; import type { SelectionSensitivity } from 'devextreme/ui/data_grid'; -import type { Properties as ToastProperties } from 'devextreme/ui/toast'; import Toolbar from '../toolbar'; import DataRow from './data/row'; import GroupRow from './groupRow'; @@ -1052,13 +1051,13 @@ export default class DataGrid extends GridCore { )(); } - apiShowErrorToast(options?: ToastProperties): Promise { + apiShowErrorToast(): Promise { const { getInstance } = this; return ClientFunction(() => { const gridInstance = getInstance() as any; - gridInstance.getController('errorHandling').showToastError('Error', options); + gridInstance.getController('errorHandling').showToastError('Error'); }, - { dependencies: { getInstance, options } }, + { dependencies: { getInstance } }, )(); } From c225896b025eabd39a3681bfe9ac334f9c068100 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Mon, 13 Jul 2026 17:51:46 +0600 Subject: [PATCH 23/26] fix tests --- .../tests/common/treeList/toast.ts | 4 +++- .../keyboardNavigation.functional.ts | 12 ++++++------ .../tests/dataGrid/common/toast.ts | 4 +++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts index 2b4c537f4480..cd77c12e53f3 100644 --- a/e2e/testcafe-devextreme/tests/common/treeList/toast.ts +++ b/e2e/testcafe-devextreme/tests/common/treeList/toast.ts @@ -10,7 +10,9 @@ fixture`Toasts in TreeList` const setToastDisplayTime = (displayTime: number) => ClientFunction(() => { (window as any).DevExpress.ui.dxToast.defaultOptions({ - displayTime, + options: { + displayTime, + }, }); }, { dependencies: { displayTime } })(); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index 5930f3c44376..dd169516957b 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -3266,11 +3266,11 @@ test('Lookup editor should update cell value on down or up key when cell is focu .ok(); // act - await t.typeText(filterRowEditor.element, 'Name'); + await t + .typeText(filterRowEditor.element, 'Name') + .wait(1000); // assert - await t.expect(dataGrid.isReady()).ok(); - let visibleRows = await dataGrid.apiGetVisibleRows(); await t .expect(visibleRows.length) @@ -3281,11 +3281,11 @@ test('Lookup editor should update cell value on down or up key when cell is focu .ok(); // act - await t.typeText(filterRowEditor.element, '_1'); + await t + .typeText(filterRowEditor.element, '_1') + .wait(1000); // assert - await t.expect(dataGrid.isReady()).ok(); - visibleRows = await dataGrid.apiGetVisibleRows(); await t .expect(visibleRows.length) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts index 5e85c7d7cd46..60322c042f61 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/toast.ts @@ -11,7 +11,9 @@ fixture`Toasts in DataGrid`.page( const setToastDisplayTime = (displayTime: number) => ClientFunction(() => { (window as any).DevExpress.ui.dxToast.defaultOptions({ - displayTime, + options: { + displayTime, + }, }); }, { dependencies: { displayTime } })(); From b8faee4af076a8d085447047f4528528fc906474 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Mon, 13 Jul 2026 18:58:45 +0600 Subject: [PATCH 24/26] skip kbn usntable tests --- .../common/aiColumn/virtualScrolling.functional.ts | 8 ++++---- .../keyboardNavigation/keyboardNavigation.functional.ts | 6 +++--- .../keyboardNavigation/keyboardNavigation.visual.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts index 12791302cc74..f25a4a6e636c 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts @@ -49,9 +49,9 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho // assert await t - .expect(dataGrid.getLoadPanel().isVisible()) - .ok() .expect(isAIRequestPending()) + .ok() + .expect(dataGrid.getLoadPanel().isVisible()) .ok(); // act @@ -76,9 +76,9 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho .eql(0) .expect(dataGrid.getDataCell(20, 0).element.textContent) .eql('21') - .expect(dataGrid.getLoadPanel().isVisible()) - .ok() .expect(isAIRequestPending()) + .ok() + .expect(dataGrid.getLoadPanel().isVisible()) .ok(); // act diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts index dd169516957b..2005febacf41 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -6179,7 +6179,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test(`Focus events should be called when pressing the Ctrl + End key when virtual scrolling and columns are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when virtual scrolling and columns are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6260,7 +6260,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test(`Focus events should be called when pressing the Ctrl + End key when rowRenderingMode is 'virtual' (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when rowRenderingMode is 'virtual' (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); @@ -6601,7 +6601,7 @@ test('The last cell should be focused after changing the page size (T1063530)', })(); }); - test(`Focus events should be called when pressing the Ctrl + End key when virtual columns, virtual scrolling and focusedRowEnabled are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { + test.meta({ unstable: true })(`Focus events should be called when pressing the Ctrl + End key when virtual columns, virtual scrolling and focusedRowEnabled are enabled (scrolling.useNative = ${useNativeScrolling})`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts index f472879c85f6..df0f06fcb4bf 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -722,7 +722,7 @@ test('Navigate to first cell in the first row when virtual scrolling and columns }, })); - test(`${useNative ? 'Native' : 'Simulated'} scrolling: Focus should be on the last focusable cell when pressing the Ctrl + End key when row dragging, virtual scrolling and columns are enabled`, async (t) => { + test.meta({ unstable: true })(`${useNative ? 'Native' : 'Simulated'} scrolling: Focus should be on the last focusable cell when pressing the Ctrl + End key when row dragging, virtual scrolling and columns are enabled`, async (t) => { // arrange const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); From f9bb7955abb256217b2167b9ee866011ae3682c9 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Mon, 13 Jul 2026 22:00:50 +0600 Subject: [PATCH 25/26] fix --- .../dataGrid/common/aiColumn/virtualScrolling.functional.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts index f25a4a6e636c..791c0c2237a1 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts @@ -183,9 +183,9 @@ test('DataGrid should send an AI request for rendered rows after scrolling with .eql(1) .expect(dataGrid.getDataCell(20, 0).element.textContent) .eql('21') - .expect(dataGrid.getLoadPanel().isVisible()) - .ok() .expect(isAIRequestPending()) + .ok() + .expect(dataGrid.getLoadPanel().isVisible()) .ok(); // act From 7555c1d9fbd500ba557f726e6c0faf8e07b2bcb5 Mon Sep 17 00:00:00 2001 From: Eldar Iusupzhanov Date: Mon, 13 Jul 2026 22:31:42 +0600 Subject: [PATCH 26/26] skip unstable cardview test --- .../tests/cardView/columnChooser/functional.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts index 1ac05b09885b..08425775c674 100644 --- a/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts +++ b/e2e/testcafe-devextreme/tests/cardView/columnChooser/functional.ts @@ -56,14 +56,11 @@ function testsFactory(testModel: { assertFirstColumnHidden: (t: TestController, cardView: CardView) => Promise; config: any; // TODO: add typing }) { - test(`column chooser in ${testModel.name} mode should work after multiple hide/show actions`, async (t) => { + test.meta({ unstable: true })(`column chooser in ${testModel.name} mode should work after multiple hide/show actions`, async (t) => { const cardView = new CardView('#container'); await cardView.apiShowColumnChooser(); - // Focus column chooser before clicking on checkboxes to avoid test flakiness - await cardView.getColumnChooser().focusList(); - await testModel.hideFirstColumn(t, cardView); await testModel.assertFirstColumnHidden(t, cardView);