diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/exportButton.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/exportButton.ts index 7e60e09757e6..7d618dac7f18 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/exportButton.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/exportButton.ts @@ -11,6 +11,8 @@ test('allowExportSelectedData: false, menu: false', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'grid-export-one-button.png', { element: dataGrid.getHeaderPanel().element }); await t .expect(compareResults.isValid()) @@ -26,6 +28,8 @@ test('allowExportSelectedData: false, menu: false, PDF', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'grid-export-one-button-pdf.png', { element: dataGrid.getHeaderPanel().element }); await t .expect(compareResults.isValid()) @@ -43,6 +47,8 @@ test('allowExportSelectedData: true, menu: false', async (t) => { const dataGrid = new DataGrid('#container'); const headerPanel = dataGrid.getHeaderPanel(); + await t.expect(dataGrid.isReady()).ok(); + await t.click(headerPanel.getExportButton().element); await testScreenshot(t, takeScreenshot, 'grid-export-dropdown-button.png', { element: dataGrid.element }); @@ -65,6 +71,8 @@ test('allowExportSelectedData: false, menu: true', async (t) => { const dataGrid = new DataGrid('#container'); const headerPanel = dataGrid.getHeaderPanel(); + await t.expect(dataGrid.isReady()).ok(); + await t.click(headerPanel.getDropDownMenuButton()); await testScreenshot(t, takeScreenshot, 'grid-export-one-button-in-menu.png', { element: 'html' }); @@ -85,6 +93,8 @@ test('allowExportSelectedData: true, menu: true', async (t) => { const dataGrid = new DataGrid('#container'); const headerPanel = dataGrid.getHeaderPanel(); + await t.expect(dataGrid.isReady()).ok(); + await t.click(headerPanel.getDropDownMenuButton()); await testScreenshot(t, takeScreenshot, 'grid-export-dropdown-button-in-menu.png', { element: 'html' }); @@ -105,6 +115,7 @@ test.meta({ browserSize: [800, 800] })('Export is disabled when no data columns const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); await testScreenshot(t, takeScreenshot, 'disabled-export_when-no-columns-visible.png', { element: dataGrid.element }); await t @@ -131,6 +142,8 @@ test.meta({ browserSize: [800, 800] })('Export is disabled when no data columns const dataGrid = new DataGrid('#container'); const headerPanel = dataGrid.getHeaderPanel(); + await t.expect(dataGrid.isReady()).ok(); + await t.click(headerPanel.getDropDownMenuButton()); await testScreenshot(t, takeScreenshot, 'disabled-export-in-menu_when-no-columns-visible.png', { element: 'html' }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/grouping/grouping.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/grouping/grouping.ts index 95900edc7a08..d19e144d084d 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/grouping/grouping.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/grouping/grouping.ts @@ -15,6 +15,8 @@ test('Grouping Panel label should not overflow in a narrow grid (T1103925)', asy const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'groupingPanel.png', { element: dataGrid.getToolbar().element }); await t .expect(compareResults.isValid()) @@ -46,6 +48,8 @@ test('Headers should be rendered correctly after changing the grouping.autoExpan const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'T1155453-expanded-groups.png', { element: dataGrid.element }); // act @@ -96,6 +100,8 @@ test('Headers should be rendered correctly after changing the grouping.autoExpan const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'T1155453-expanded-groups-with-fixed-content.png', { element: dataGrid.element }); // act @@ -149,6 +155,8 @@ test.meta({ browserSize: [800, 800] })('Empty header message should appear when const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'empty-header-message-with-selection-enabled.png', { element: dataGrid.element }); // assert @@ -186,6 +194,8 @@ test('Group panel message should be vertically aligned (T1186613)', async (t) => const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await testScreenshot(t, takeScreenshot, 'group-panel-message-align.png', { element: dataGrid.getToolbar().element }); await t .expect(compareResults.isValid()) @@ -228,6 +238,8 @@ test('The collapse icon should update if repaintChangesOnly option is enabled (T const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await t.click(dataGrid.getPager().getNavPage('2').element); await testScreenshot(t, takeScreenshot, 'continued_group-collapse_icon-T1201981.png', { element: dataGrid.element }); @@ -276,6 +288,8 @@ const customersT1232129 = [ test('DataGrid loses grouping after the expandAll method if a grouped column has calculateDisplayValue (T1232129)', async (t) => { const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await dataGrid.apiExpandAll(); await t .expect(dataGrid.apiColumnOption('groupId', 'groupIndex')) @@ -301,6 +315,8 @@ test('DataGrid loses grouping after the expandAll method if a grouped column has test('DataGrid should not lose grouping after the expandAll method if a grouped column has string calculateGroupValue (T1321187)', async (t) => { const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + await dataGrid.apiExpandAll(); await t @@ -324,6 +340,8 @@ test('DataGrid should not change group column after the expandAll method, string const dataGrid = new DataGrid('#container'); const firstGroupCellText = await dataGrid.getGroupRow(0).getCell(1).element.textContent; + await t.expect(dataGrid.isReady()).ok(); + await dataGrid.apiExpandAll(); await t @@ -353,6 +371,8 @@ test('DataGrid should not change group column after the expandAll method, string const dataGrid = new DataGrid('#container'); const firstGroupCellText = await dataGrid.getGroupRow(0).getCell(1).element.textContent; + await t.expect(dataGrid.isReady()).ok(); + await dataGrid.apiExpandAll(); 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 e979f9db6b7b..cca663e01234 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.functional.ts @@ -1699,6 +1699,8 @@ test('The expand cell should not lose focus on expanding a master row (T892203)' const cell01 = dataGrid.getDataCell(0, 1); const editor01 = cell01.getEditor(); + await t.expect(dataGrid.isReady()).ok(); + await t .click(addRowButton) @@ -1742,6 +1744,8 @@ test('The expand cell should not lose focus on expanding a master row (T892203)' const cell01 = dataGrid.getDataCell(0, 1); const editor01 = cell01.getEditor(); + await t.expect(dataGrid.isReady()).ok(); + await t .click(addRowButton) .click(cell01.element) @@ -1785,6 +1789,8 @@ test('The expand cell should not lose focus on expanding a master row (T892203)' const cell01 = dataGrid.getDataCell(0, 1); const editor01 = cell01.getEditor(); + await t.expect(dataGrid.isReady()).ok(); + await t .click(cell00.element) @@ -1827,6 +1833,8 @@ test('The expand cell should not lose focus on expanding a master row (T892203)' const cell01 = dataGrid.getDataCell(0, 1); const editor01 = cell01.getEditor(); + await t.expect(dataGrid.isReady()).ok(); + await t .click(cell01.element) @@ -1978,6 +1986,7 @@ test('Vertical moving by keydown if scrolling.mode: virtual, scrolling.rowRender ['cell', 'batch'].forEach((editMode) => { test(`Moving by Tab key if scrolling.columnRenderingMode: virtual, editing.mode: ${editMode}`, async (t) => { const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); await t.click(dataGrid.getDataCell(0, 0).element); @@ -2243,6 +2252,8 @@ test('Moving by Tab key if scrolling.columnRenderingMode: virtual and fixed colu const cellEditor = cell.getEditor().element; const inputElement = Selector('#myinput'); + await t.expect(dataGrid.isReady()).ok(); + // act await t .click(cell.element); @@ -2379,6 +2390,9 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => { test(`The first cell should be focused on pressing the tab key after clicking on the document when command column is ${isCommandColumnFixed ? 'fixed' : 'unfixed'} and on the left side (T951849)`, async (t) => { const dataGrid = new DataGrid('#container'); const headers = dataGrid.getHeaders(); + + await t.expect(dataGrid.isReady()).ok(); + const dataGridOffsetBottom = await dataGrid.element.getBoundingClientRectProperty('bottom'); async function checkNavigationOfAllCells(): Promise { @@ -2466,6 +2480,8 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => { const dataGrid = new DataGrid('#container'); const headers = dataGrid.getHeaders(); + await t.expect(dataGrid.isReady()).ok(); + async function checkNavigationOfAllCells(): Promise { await t .click(headers.getHeaderRow(0, isCommandColumnFixed).getHeaderCell(0).element) @@ -2540,6 +2556,9 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => { test(`The first cell should be focused on pressing the tab key after clicking on the document when command column is ${isCommandColumnFixed ? 'fixed' : 'unfixed'} and on the right side (T951849)`, async (t) => { const dataGrid = new DataGrid('#container'); const headers = dataGrid.getHeaders(); + + await t.expect(dataGrid.isReady()).ok(); + const dataGridOffsetBottom = await dataGrid.element.getBoundingClientRectProperty('bottom'); async function checkNavigationOfAllCells(): Promise { @@ -2635,6 +2654,8 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => { const dataGrid = new DataGrid('#container'); const headers = dataGrid.getHeaders(); + await t.expect(dataGrid.isReady()).ok(); + async function checkNavigationOfAllCells(): Promise { await t .click(headers.getHeaderRow(0).getHeaderCell(0).element) @@ -2718,6 +2739,8 @@ test('Empty row should lose focus on Tab (T941246)', async (t) => { const dataGrid = new DataGrid('#container'); const headers = dataGrid.getHeaders(); + await t.expect(dataGrid.isReady()).ok(); + async function checkNavigationOfAllCells(): Promise { await t .click(headers.getHeaderRow(0).getHeaderCell(0).element) @@ -2975,6 +2998,8 @@ test('New mode. A cell should be focused when the PageDow/Up key is pressed (T89 test(`${editMode} - Focus next cell using tab after adding row if some another row is focused and repaintChangesOnly is ${repaintChangesOnly} (T1004913, T1036685)`, async (t) => { const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + const addRowButton = dataGrid.getHeaderPanel().getAddRowButton(); const cell00 = dataGrid.getDataCell(0, 0); const editor00 = cell00.getEditor(); @@ -3199,6 +3224,8 @@ test('Lookup editor should update cell value on down or up key when cell is focu const filterRowCell = dataGrid.getHeaders().getFilterRow().getFilterCell(1); const filterRowEditor = filterRowCell.getEditorInput(); + await t.expect(dataGrid.isReady()).ok(); + // act await t .click(filterRowEditor.element); @@ -3699,6 +3726,11 @@ test('edit => scroll => command, should not result in grid scrolling back to edi })); 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 + .expect(dataGrid.isReady()) + .ok(); + const getFocusedElement = () => Selector(':focus').nth(0); let focusedElement: Selector | null = null; @@ -4356,6 +4388,9 @@ test('DataGrid - focusedRowIndex is -1 when the first data cell is focused with test('DataGrid - onFocusedCellChanged parameters should be correct when focusing the first cell (T1282664)', async (t) => { const dataGrid = new DataGrid('#container'); + await t + .expect(dataGrid.isReady()) + .ok(); // act await t @@ -5418,6 +5453,10 @@ test('The batch edit mode - Shift + Tab navigation through interactive elements }); test('DataGrid - Cell focus works incorrectly if the command column has a disabled native button element (T1179207)', async (t) => { + const dataGrid = new DataGrid('#container'); + await t + .expect(dataGrid.isReady()) + .ok(); await addFocusableElementBefore('#container'); // header row @@ -5698,6 +5737,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -5773,6 +5814,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -5849,6 +5892,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -5931,6 +5976,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -6015,6 +6062,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -6090,6 +6139,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -6246,6 +6297,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -6324,6 +6377,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t .click(dataGrid.getDataCell(0, 0).element); @@ -6403,6 +6458,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -6489,6 +6546,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element); @@ -6576,6 +6635,8 @@ test('The last cell should be focused after changing the page size (T1063530)', // arrange const dataGrid = new DataGrid('#container'); + await t.expect(dataGrid.isReady()).ok(); + // act await t.click(dataGrid.getDataCell(0, 0).element);