From 828cc9431b16b8b7c667287ed5be05f818993caa Mon Sep 17 00:00:00 2001 From: tongsonbarbs Date: Fri, 30 Aug 2024 23:29:01 +0800 Subject: [PATCH] tests --- .../keyboardNavigation/editOnKeyPress.ts | 35 ------------------ .../keyboardNavigation.functional.ts | 37 +++++++++++++++++++ 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/editOnKeyPress.ts b/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/editOnKeyPress.ts index 32ac9210563e..839bfba67b81 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/editOnKeyPress.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/editOnKeyPress.ts @@ -135,38 +135,3 @@ test('Focused cell should not flick (T1206435)', async (t) => { }; }); }); - -/* test('DataGrid input cell should not put tabindex to incorrect element while on edit mode (T1239462)', async (t) => { - const dataGrid = new DataGrid('#container'); - const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - - await t - .click(dataGrid.getToolbar().getItem(0)) - .pressKey('tab'); - await takeScreenshot('data-grid_keyboard-navigation-input-text-focused.png', dataGrid.element); - - await t.expect(compareResults.isValid()) - .ok(compareResults.errorMessages()); -}).before(async () => { - await createWidget('dxDataGrid', { - showBorders: true, - selection: { - mode: 'multiple', - }, - editing: { - mode: 'form', - allowAdding: true, - }, - columns: [ - 'Calculation', - 'CalculationType', - { - type: 'buttons', - fixed: true, - }, - ], - dataSource: { - store: [], - }, - }); -}); */ diff --git a/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/keyboardNavigation.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/keyboardNavigation.functional.ts index 7fd304742d47..ed3701392ba2 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/keyboardNavigation/keyboardNavigation.functional.ts @@ -4730,6 +4730,41 @@ test('DataGrid - Data rows are skipped during Tab navigation if the first column width: 300, })); +test('DataGrid input cell should not put tabindex to incorrect element while on edit mode (T1239462)', async (t) => { + const dataGrid = new DataGrid('#container'); + const { takeScreenshot, compareResults } = createScreenshotsComparer(t); + + await t + .click(dataGrid.getToolbar().getItem(0)) + .pressKey('tab'); + await takeScreenshot('data-grid_keyboard-navigation-input-text-focused.png', dataGrid.element); + + await t.expect(compareResults.isValid()) + .ok(compareResults.errorMessages()); +}).before(async () => { + await createWidget('dxDataGrid', { + showBorders: true, + selection: { + mode: 'multiple', + }, + editing: { + mode: 'form', + allowAdding: true, + }, + columns: [ + 'Calculation', + 'CalculationType', + { + type: 'buttons', + fixed: true, + }, + ], + dataSource: { + store: [], + }, + }); +}); + test('Cancel button in the last column cannot be focused via the Tab key (T1248987)', async (t) => { const dataGrid = new DataGrid('#container'); const saveButton = dataGrid.getFixedDataRow(0).getCommandCell(1).getButton(0); @@ -4760,6 +4795,8 @@ test('Cancel button in the last column cannot be focused via the Tab key (T12489 }, columnFixing: { enabled: true, + // @ts-expect-error private option + legacyMode: true, }, columns: [ 'FirstName',