From 681d9d423d824571366fd3208857e0befcffb63e Mon Sep 17 00:00:00 2001 From: Anna Shakhova <68295572+anna-shakhova@users.noreply.github.com> Date: Fri, 16 Oct 2026 09:11:49 +0000 Subject: [PATCH] Scrollable, ScrollView: remove the undocumented x/y alias from scrollTo and scrollBy (#35716) (cherry picked from commit 3ee6cf6bb795bd8bf5aef7e0d89a68d307a00e00) --- .../tests/common/treeList/scrolling.ts | 2 +- .../dataGrid/common/aiColumn/functional.ts | 2 +- .../aiColumn/virtualScrolling.functional.ts | 4 +- .../common/columnReordering/functional.ts | 2 +- .../tests/dataGrid/common/editing/visual.ts | 2 +- .../tests/dataGrid/common/filterRow/visual.ts | 2 +- .../dataGrid/common/fixedColumns/visual.ts | 6 +- .../tests/dataGrid/common/focus/focus.ts | 4 +- .../common/focus/focusedRow/focusedRow.ts | 4 +- .../common/headerFilter/headerFilter.ts | 2 +- .../columnReordering.visual.ts | 4 +- .../keyboardNavigation.visual.ts | 14 +- .../startEditing.functional.ts | 6 +- .../virtualColumns.functional.ts | 6 +- .../common/masterDetail/functional.ts | 4 +- .../dataGrid/common/masterDetail/visual.ts | 6 +- .../tests/dataGrid/common/pager.ts | 4 +- .../dataGrid/common/rowDragging/functional.ts | 4 +- .../tests/dataGrid/common/scrolling.ts | 68 ++++----- .../common/validation/validationPopup.ts | 8 +- .../common/virtualColumns/functional.ts | 12 +- .../dataGrid/common/virtualColumns/visual.ts | 28 ++-- .../sticky/common/stickyColumnReordering.ts | 4 +- .../sticky/common/stickyColumnResizing.ts | 10 +- .../dataGrid/sticky/common/stickyColumns.ts | 4 +- .../sticky/common/withAdaptability.ts | 14 +- .../dataGrid/sticky/common/withBandColumns.ts | 2 +- .../dataGrid/sticky/common/withEditing.ts | 24 +-- .../dataGrid/sticky/common/withFilterRow.ts | 4 +- .../dataGrid/sticky/common/withGrouping.ts | 12 +- .../sticky/common/withMasterDetail.ts | 4 +- .../sticky/common/withRowSelection.ts | 2 +- .../sticky/common/withVirtualColumns.ts | 8 +- .../sticky/common/withVirtualScrolling.ts | 8 +- .../sticky/fixed/bandColumnFirstCases.ts | 14 +- .../sticky/fixed/bandColumnSecondCases.ts | 14 +- .../tests/dataGrid/sticky/fixed/positions.ts | 14 +- .../tests/scheduler/helpers/utils.ts | 2 +- .../pivot_grid/data_area/m_data_area.test.ts | 67 ++++++++- .../grids/pivot_grid/data_area/m_data_area.ts | 4 +- .../headers_area/m_headers_area.test.ts | 114 +++++++++++++++ .../pivot_grid/headers_area/m_headers_area.ts | 7 +- .../__internal/ui/scroll_view/scrollable.ts | 8 +- .../ui/scroll_view/utils/convert_location.ts | 6 +- .../columnChooser.integration.tests.js | 2 +- .../columnFixing.tests.js | 8 +- .../dataGrid.tests.js | 2 +- .../editing.integration.tests.js | 60 ++++---- .../editing.tests.js | 40 ++--- .../focus.integration.tests.js | 8 +- .../focus.tests.js | 6 +- .../masterDetail.integration.tests.js | 2 +- .../rowsView.tests.js | 20 +-- .../scrolling.integration.tests.js | 16 +- .../selection.integration.tests.js | 6 +- .../virtualScrolling.integration.tests.js | 66 ++++----- .../fieldChooser.tests.js | 4 +- .../pivotGrid.tests.js | 14 +- .../appointment.editing.tests.js | 2 +- .../appointment.week.based.views.tests.js | 4 +- .../dragAndDropAppointments.tests.js | 10 +- .../integration.workSpace.tests.js | 4 +- .../virtual_scrolling.integration.tests.js | 138 +++++++++--------- .../virtual_scrolling.monthView.tests.js | 52 +++---- .../virtual_scrolling.timeline.tests.js | 64 ++++---- .../treeList.tests.js | 10 +- .../virtualScrolling.integration.tests.js | 8 +- .../DevExpress.ui.widgets/scrollView.tests.js | 28 ++-- .../scrollableParts/scrollable.api.tests.js | 23 --- .../DevExpress.ui.widgets/sortable.tests.js | 6 +- .../tileView.markup.tests.js | 4 +- .../DevExpress.ui.widgets/tileView.tests.js | 4 +- .../treeViewParts/focusing.js | 8 +- packages/testcafe-models/dataGrid/index.ts | 6 +- 74 files changed, 656 insertions(+), 509 deletions(-) create mode 100644 packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.test.ts diff --git a/e2e/testcafe-devextreme/tests/common/treeList/scrolling.ts b/e2e/testcafe-devextreme/tests/common/treeList/scrolling.ts index cbed631b1d85..4971f114981d 100644 --- a/e2e/testcafe-devextreme/tests/common/treeList/scrolling.ts +++ b/e2e/testcafe-devextreme/tests/common/treeList/scrolling.ts @@ -125,7 +125,7 @@ test.meta({ browserSize: [800, 800] })('All items should be selected after selec await testScreenshot(t, takeScreenshot, 'T1189118-treelist-select-all-with-virtual-scrolling-1', { element: treeList.element }); // act - await treeList.scrollTo(t, { y: 300 }); + await treeList.scrollTo(t, { top: 300 }); await testScreenshot(t, takeScreenshot, 'T1189118-treelist-select-all-with-virtual-scrolling-2', { element: treeList.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/functional.ts index 9f189596f059..dc0f277bdc6c 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/functional.ts @@ -512,7 +512,7 @@ test('The scroll position should not reset when the ai.prompt changes at runtime await t.expect(dataGrid.isReady()).ok(); - await dataGrid.scrollTo(t, { x: scrollX }); + await dataGrid.scrollTo(t, { left: scrollX }); await t.expect(scrollContainer.scrollLeft).eql(scrollX); 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 d1085aa9667a..b0c7fe041658 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/aiColumn/virtualScrolling.functional.ts @@ -70,7 +70,7 @@ test('DataGrid should send an AI request for rendered rows after scrolling witho await checkAIColumnTexts(t, dataGrid, 11); // act - await dataGrid.scrollTo(t, { y: 1000 }); + await dataGrid.scrollTo(t, { top: 1000 }); // assert await t @@ -177,7 +177,7 @@ test('DataGrid should send an AI request for rendered rows after scrolling with await checkAIColumnTexts(t, dataGrid, 11); // act - await dataGrid.scrollTo(t, { y: 1000 }); + await dataGrid.scrollTo(t, { top: 1000 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/columnReordering/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/columnReordering/functional.ts index 88ee05faec24..64effe9e3f4a 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/columnReordering/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/columnReordering/functional.ts @@ -242,7 +242,7 @@ test('Column reordering should work correctly after scrolling right with fixed c await t.expect(dataGrid.isReady()).ok(); // act - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/visual.ts index a95257f71a78..43ca081f476a 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/editing/visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/editing/visual.ts @@ -300,7 +300,7 @@ test('DataGrid cell with checkbox should have outline on focused', async (t) => const headerPanel = dataGrid.getHeaderPanel(); const scrollTo = async (y) => { - await dataGrid.scrollTo(t, { y }); + await dataGrid.scrollTo(t, { top: y }); // eslint-disable-next-line local/no-is-ready-without-expect return dataGrid.isReady(); }; diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/filterRow/visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/filterRow/visual.ts index 5a0571d11bae..f1708ea0af57 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/filterRow/visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/filterRow/visual.ts @@ -106,7 +106,7 @@ test('DataGrid - The `between` filter dropdown sticks to the viewport edge durin .click(filterCell.menuButton) .click(filterCell.menu.getItemByText('Between')); - await dataGrid.scrollBy(t, { x: 999 }); + await dataGrid.scrollBy(t, { left: 999 }); await testScreenshot(t, takeScreenshot, 'filter-row-filter-range-hide-on-scroll.png'); await t .expect(compareResults.isValid()) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/fixedColumns/visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/fixedColumns/visual.ts index 344aed1eacac..c38f992dae37 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/fixedColumns/visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/fixedColumns/visual.ts @@ -99,7 +99,7 @@ test.meta({ browserSize: [800, 800] })('Fixed to the right columns should appear // act await testScreenshot(t, takeScreenshot, 'T1177143-right-fixed-column-with-no-width-columns-1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 5000 }); + await dataGrid.scrollTo(t, { left: 5000 }); await testScreenshot(t, takeScreenshot, 'T1177143-right-fixed-column-with-no-width-columns-2.png', { element: dataGrid.element }); @@ -162,7 +162,7 @@ test('Hovering over a row should work correctly after scrolling when there is a .ok(); // act - await dataGrid.scrollTo(t, { y: 300 }); + await dataGrid.scrollTo(t, { top: 300 }); dataRow = dataGrid.getDataRow(10); await t.hover(dataRow.element); @@ -324,7 +324,7 @@ test('Expand columns headers offsets should be correct with fixed band columns a await testScreenshot(t, takeScreenshot, 'T1317623-expand-columns-with-band-columns.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 5000 }); + await dataGrid.scrollTo(t, { left: 5000 }); await testScreenshot(t, takeScreenshot, 'T1317623-horizontal-scroll-with-fixed-band-columns.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focus.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focus.ts index 81411e77b62e..047342207d82 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focus.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focus.ts @@ -189,8 +189,8 @@ test('DataGrid - FilterRow cell loses focus when focusedRowEnabled is true and e .ok(); // act - await grid.scrollBy(t, { y: 200 }); - await grid.scrollBy(t, { y: 200 }); + await grid.scrollBy(t, { top: 200 }); + await grid.scrollBy(t, { top: 200 }); await grid.scrollTo(t, { top: 0 }); await t.wait(300); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusedRow/focusedRow.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusedRow/focusedRow.ts index 7f72427073d5..b4e40ada8bab 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusedRow/focusedRow.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/focus/focusedRow/focusedRow.ts @@ -791,8 +791,8 @@ test('Scroll should not change focused row if focus method is called inside onCo .expect(dataGrid.getDataRow(0).isFocusedRow).ok(); // act - await dataGrid.scrollTo(t, { y: 200 }); - await dataGrid.scrollTo(t, { y: 0 }); + await dataGrid.scrollTo(t, { top: 200 }); + await dataGrid.scrollTo(t, { top: 0 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/headerFilter/headerFilter.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/headerFilter/headerFilter.ts index 0dd3238e411f..01c822384106 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/headerFilter/headerFilter.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/headerFilter/headerFilter.ts @@ -90,7 +90,7 @@ test('The header filter should fit inside the viewport if the grid is scrolled h const filterIconElement = dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(0).getFilterIcon(); // act - await dataGrid.scrollBy(t, { x: 100 }); + await dataGrid.scrollBy(t, { left: 100 }); await t.click(filterIconElement); // assert diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/columnReordering.visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/columnReordering.visual.ts index 184c6c434a79..587ee7e67f20 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/columnReordering.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/columnReordering.visual.ts @@ -1443,7 +1443,7 @@ test('reorder column to left when adaptability is enabled and there are hidden c const dataGrid = new DataGrid(DATA_GRID_SELECTOR); const lastHeaderCell = dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(9); - await dataGrid.scrollTo(t, { x: 1200 }); + await dataGrid.scrollTo(t, { left: 1200 }); await t .expect(dataGrid.getScrollLeft()) @@ -1516,7 +1516,7 @@ test('reorder column to left when adaptability is enabled and there are hidden c const dataGrid = new DataGrid(DATA_GRID_SELECTOR); const lastHeaderCell = dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(29); - await dataGrid.scrollTo(t, { x: 2200 }); + await dataGrid.scrollTo(t, { left: 2200 }); await t .expect(dataGrid.getScrollLeft()) 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 7e3b856d9b36..d3674db13c05 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/keyboardNavigation.visual.ts @@ -107,7 +107,7 @@ test('Navigate to first cell in the row that contains focus when pressing the Ho .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 700 }); + await dataGrid.scrollTo(t, { left: 700 }); // assert await t @@ -175,7 +175,7 @@ test('Navigate to first cell in the row that contains focus when row dragging is .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 700 }); + await dataGrid.scrollTo(t, { left: 700 }); // assert await t @@ -282,7 +282,7 @@ test('Navigate to first cell in the row that contains focus when virtual columns .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 4200 }); + await dataGrid.scrollTo(t, { left: 4200 }); // assert await t @@ -355,7 +355,7 @@ test('Navigate to first cell in the row that contains focus when adaptivity is e .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 4200 }); + await dataGrid.scrollTo(t, { left: 4200 }); // assert await t @@ -482,7 +482,7 @@ test('Navigate to first cell in the first row when pressing the Ctrl + Home key' .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 700, y: 1000 }); + await dataGrid.scrollTo(t, { left: 700, top: 1000 }); // assert await t @@ -563,7 +563,7 @@ test('Navigate to first cell in the first row when virtual scrolling is enabled' .ok(); await dataGrid - .scrollTo(t, { x: 700, y: 10000 }); + .scrollTo(t, { left: 700, top: 10000 }); // assert await t @@ -652,7 +652,7 @@ test('Navigate to first cell in the first row when virtual scrolling and columns .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 3000, y: 10000 }); + await dataGrid.scrollTo(t, { left: 3000, top: 10000 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/startEditing.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/startEditing.functional.ts index 4df5eea3c3e7..acf5282996e4 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/startEditing.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/startEditing.functional.ts @@ -13,7 +13,7 @@ test('Editing should start by pressing enter after scrolling content with scroll await t.expect(dataGrid.isReady()).ok(); - await dataGrid.scrollBy(t, { y: 10000 }); + await dataGrid.scrollBy(t, { top: 10000 }); await t.click(dataGrid.getDataCell(49, 1).element); await t.pressKey('enter'); @@ -44,7 +44,7 @@ test('editing.allowUpdating callback should receive correct row on tab key on fi await t.expect(dataGrid.isReady()).ok(); - await dataGrid.scrollBy(t, { y: 10000 }); + await dataGrid.scrollBy(t, { top: 10000 }); await t .click(dataGrid.getDataCell(49, 0).element) @@ -86,7 +86,7 @@ test('editing.allowUpdating callback should receive correct row on tab key on la await t.expect(dataGrid.isReady()).ok(); - await dataGrid.scrollBy(t, { y: 10000 }); + await dataGrid.scrollBy(t, { top: 10000 }); await t .click(dataGrid.getDataCell(48, 1).element) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/virtualColumns.functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/virtualColumns.functional.ts index 09f7a842e0f5..dbf434e67d99 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/virtualColumns.functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/virtualColumns.functional.ts @@ -32,7 +32,7 @@ test('DataGrid should scroll to the first cell of the next row and focus it when .ok(); // act - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); // assert await t @@ -164,7 +164,7 @@ test('DataGrid should scroll to the last cell of the previous row and focus it w .ok(); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); // assert await t @@ -273,7 +273,7 @@ test('DataGrid should scroll to the last cell of the previous row and focus it w .ok(); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/functional.ts index 92ff0b4f7236..5a15074907b0 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/functional.ts @@ -41,7 +41,7 @@ test('Detail grid should not reload data when the collapsed master row reenters .eql(1); // act - await dataGrid.scrollTo(t, { y: 10000 }); + await dataGrid.scrollTo(t, { top: 10000 }); // assert await t @@ -51,7 +51,7 @@ test('Detail grid should not reload data when the collapsed master row reenters .ok(); // act - await dataGrid.scrollTo(t, { y: 0 }); + await dataGrid.scrollTo(t, { top: 0 }); detailGrid = dataGrid.getMasterRow(0).getDataGrid(); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/visual.ts index 5105f60f4e2b..1d0755458ce7 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/masterDetail/visual.ts @@ -119,7 +119,7 @@ test.meta({ browserSize: [800, 800] })('The master detail row should display cor // assert await testScreenshot(t, takeScreenshot, 'T1159578-master-detail-with-renderAsync-1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { y: 400 }); + await dataGrid.scrollTo(t, { top: 400 }); await t.wait(300); await t.click(dataGrid.getDataRow(16).getCommandCell(0).element); @@ -161,7 +161,7 @@ test.meta({ browserSize: [800, 800] })('The master detail row should display cor while (scrollTop > 0) { scrollTop -= 25; - await dataGrid.scrollTo(t, { y: scrollTop }); + await dataGrid.scrollTo(t, { top: scrollTop }); await triggerScrollEvent(dataGrid); } }; @@ -172,7 +172,7 @@ test.meta({ browserSize: [800, 800] })('The master detail row should display cor await testScreenshot(t, takeScreenshot, `T1167889-master-detail-with-scrolling.useNative=${useNative}-1.png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { y: 1000 }); + await dataGrid.scrollTo(t, { top: 1000 }); await t.wait(100); // assert diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts index 76fd2a24ea5c..8513c05e3361 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/pager.ts @@ -177,7 +177,7 @@ test('Changing pageSize to \'all\' with rowRenderingMode=\'virtual\' should work await t.click(dataGrid.element()); // don't know why but test isn't reproduces without this click - await dataGrid.scrollBy(t, { y: 100 }); + await dataGrid.scrollBy(t, { top: 100 }); await t.click(pager.getPageSizeSelectBox().element); await t.click(pager.getPopupPageSizes().withText('All')); @@ -213,7 +213,7 @@ test('Page index should not reset when scrolling while the grid is being refresh .eql(2); await dataGrid.apiRefresh(); - await dataGrid.scrollBy(t, { y: 20 }); + await dataGrid.scrollBy(t, { top: 20 }); await t .expect(dataGrid.option('paging.pageIndex')) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts index b60b5623bf5c..85518eb47a8c 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/rowDragging/functional.ts @@ -554,7 +554,7 @@ test('The draggable element should be displayed correctly after horizontal scrol await t .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 2500 }); + await dataGrid.scrollTo(t, { left: 2500 }); await t .expect(dataGrid.getScrollLeft()) @@ -713,7 +713,7 @@ test('toIndex should not be corrected when source item gets removed from DOM', a await t.expect(dataGrid.isReady()).ok(); // act - scroll to the bottom to make the last row visible - await dataGrid.scrollTo(t, { y: 3000 }); + await dataGrid.scrollTo(t, { top: 3000 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts index a5e6b7c5765a..abb1953bf3d8 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/scrolling.ts @@ -124,7 +124,7 @@ test('DataGrid should not reset its left scroll position on window resize when c // act await t.resizeWindow(900, 250); - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); // assert await t @@ -170,7 +170,7 @@ test('DataGrid should not reset its right scroll position on window resize when await t.resizeWindow(900, 250); const maxHorizontalPosition = await getMaxRightOffset(dataGrid); const scrollLeft = maxHorizontalPosition - 100; - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); // assert await t @@ -216,7 +216,7 @@ test('DataGrid should not reset its top scroll position after cell modification // act await t .click(dataGrid.getDataRow(0).getCommandCell(0).element); - await dataGrid.scrollTo(t, { y: 220 }); + await dataGrid.scrollTo(t, { top: 220 }); const scrollTop = await dataGrid.getScrollTop(); await t .click(dataGrid.getDataRow(1).getCommandCell(0).element) @@ -342,7 +342,7 @@ test('Scroll position after grouping when RTL (T388508)', async (t) => { .eql(300); // act - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); const scrollRight = await dataGrid.getScrollRight(); await dataGrid.apiColumnOption('field1', 'groupIndex', 0); @@ -462,7 +462,7 @@ test('Horizontal scrolling should work correctly in RTL mode with native scrolli const initialScrollLeft = await dataGrid.getScrollLeft(); // act: scroll to the left - await dataGrid.scrollTo(t, { x: initialScrollLeft - 120 }); + await dataGrid.scrollTo(t, { left: initialScrollLeft - 120 }); // assert: the headers are in sync with the content await t @@ -472,7 +472,7 @@ test('Horizontal scrolling should work correctly in RTL mode with native scrolli .eql(-120); // act: scroll back to the right edge - await dataGrid.scrollTo(t, { x: initialScrollLeft }); + await dataGrid.scrollTo(t, { left: initialScrollLeft }); // assert: the content must not jump to the opposite edge await t @@ -519,7 +519,7 @@ test('Column headers should keep the scroll position after resizing a column in const initialScrollLeft = await dataGrid.getScrollLeft(); - await dataGrid.scrollTo(t, { x: initialScrollLeft - 100 }); + await dataGrid.scrollTo(t, { left: initialScrollLeft - 100 }); await t .expect(rowsScrollContainer.scrollLeft) @@ -557,7 +557,7 @@ test('Column headers should keep the scroll position after repaint in RTL mode w const initialScrollLeft = await dataGrid.getScrollLeft(); - await dataGrid.scrollTo(t, { x: initialScrollLeft - 100 }); + await dataGrid.scrollTo(t, { left: initialScrollLeft - 100 }); await t .expect(rowsScrollContainer.scrollLeft) @@ -631,7 +631,7 @@ test('Column headers should have the correct scroll position after refreshing th .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollTo(t, { x: 1000 }); + await dataGrid.scrollTo(t, { left: 1000 }); await t .expect(dataGrid.getScrollLeft()) @@ -681,14 +681,14 @@ test('Column headers should have the correct scroll position after refreshing th const initialScrollLeft = await dataGrid.getScrollLeft(); - await dataGrid.scrollTo(t, { x: initialScrollLeft - 150 }); + await dataGrid.scrollTo(t, { left: initialScrollLeft - 150 }); await t .expect(dataGrid.getScrollLeft()) .eql(initialScrollLeft - 150); // act - await dataGrid.scrollTo(t, { y: 1500 }); + await dataGrid.scrollTo(t, { top: 1500 }); // assert await t @@ -735,8 +735,8 @@ test('Header container should have padding-right after expanding the master row .expect(dataGrid.getDataRow(0).isExpanded).ok(); // act - await dataGrid.scrollTo(t, { x: 180 }); - await dataGrid.scrollTo(t, { x: 210 }); + await dataGrid.scrollTo(t, { left: 180 }); + await dataGrid.scrollTo(t, { left: 210 }); const scrollBarWidth = await dataGrid.getScrollbarWidth(false); await t.resizeWindow(600, 250); @@ -805,7 +805,7 @@ test('Header container should have padding-right if grid has max-height and scro // act const scrollBarWidth = await dataGrid.getScrollbarWidth(false); - await dataGrid.scrollBy(t, { y: 20 }); + await dataGrid.scrollBy(t, { top: 20 }); // assert await t @@ -1402,7 +1402,7 @@ test('The data should display correctly after changing the dataSource and focuse const { takeScreenshot, compareResults } = createScreenshotsComparer(t); const scrollToBottom = async () => { - await dataGrid.scrollTo(t, { y: 100000 }); + await dataGrid.scrollTo(t, { top: 100000 }); await t.expect(dataGrid.isReady()).ok(); }; @@ -1491,7 +1491,7 @@ test.meta({ browserSize: [800, 800] })('The page should not be changed when hidi .ok(); // act - await dataGrid.scrollTo(t, { y: 500 }); + await dataGrid.scrollTo(t, { top: 500 }); // assert await t @@ -1696,7 +1696,7 @@ test('Scroll to the bottom after expand several group', async (t) => { const dataGrid = new DataGrid('#container'); const scrollToBottom = async () => { - await dataGrid.scrollTo(t, { y: 100000 }); + await dataGrid.scrollTo(t, { top: 100000 }); await t.expect(dataGrid.isReady()).ok(); }; @@ -1706,7 +1706,7 @@ test('Scroll to the bottom after expand several group', async (t) => { await dataGrid.apiExpandRow(['Contoso York Store']); await dataGrid.apiExpandRow(['Contoso York Store', 'Audio']); await scrollToBottom(); - await dataGrid.scrollBy(t, { y: -1 }); + await dataGrid.scrollBy(t, { top: -1 }); await t.expect(dataGrid.isReady()).ok(); // assert @@ -2034,8 +2034,8 @@ test('Last group should not disappear after collapsing another subgroup with vir await t.expect(dataGrid.isReady()).ok(); // act - await dataGrid.scrollTo(t, { y: 200 }); - await dataGrid.scrollTo(t, { y: 600 }); + await dataGrid.scrollTo(t, { top: 200 }); + await dataGrid.scrollTo(t, { top: 600 }); await t.expect(dataGrid.isReady()).ok(); // assert @@ -2104,8 +2104,8 @@ test('Editors should keep changes after being scrolled out of sight (T1145698)', .typeText(dataGrid.getDataCell(1, 0).element, 'test') .pressKey('enter'); - await dataGrid.scrollTo(t, { y: 500 }); - await dataGrid.scrollTo(t, { y: 0 }); + await dataGrid.scrollTo(t, { top: 500 }); + await dataGrid.scrollTo(t, { top: 0 }); // assert await t.wait(300) @@ -2233,10 +2233,10 @@ test('The row alternation should display correctly when grouping and virtual scr .ok(); // act - await dataGrid.scrollTo(t, { y: 100 }); - await dataGrid.scrollTo(t, { y: 200 }); - await dataGrid.scrollTo(t, { y: 300 }); - await dataGrid.scrollTo(t, { y: 400 }); + await dataGrid.scrollTo(t, { top: 100 }); + await dataGrid.scrollTo(t, { top: 200 }); + await dataGrid.scrollTo(t, { top: 300 }); + await dataGrid.scrollTo(t, { top: 400 }); // assert await t @@ -2318,8 +2318,8 @@ test('DataGrid - Focused cell moves to the end of the table after horizontal scr await t.expect(dataGrid.getDataCell(0, 0).isFocused).ok(); - await dataGrid.scrollBy(t, { x: 1000 }); - await dataGrid.scrollBy(t, { x: -1000 }); + await dataGrid.scrollBy(t, { left: 1000 }); + await dataGrid.scrollBy(t, { left: -1000 }); await t.expect(dataGrid.getDataCell(0, 0).isFocused).ok(); }).before(async () => createWidget('dxDataGrid', { @@ -2341,15 +2341,15 @@ test('DataGrid - Focused cell moves to the end of the table after horizontal scr // T1277214 - Right to Left test('DataGrid - Scrolling position is reset to far right on an attempt to scroll left if the most right cell is focused using the keyboard', async (t) => { const dataGrid = new DataGrid('#container'); - await dataGrid.scrollTo(t, { x: 1000 }); + await dataGrid.scrollTo(t, { left: 1000 }); await t .click(dataGrid.getDataCell(0, 20).element) .pressKey('right'); await t.expect(dataGrid.getDataCell(0, 20).isFocused).ok(); - await dataGrid.scrollBy(t, { x: -1000 }); - await dataGrid.scrollBy(t, { x: 1000 }); + await dataGrid.scrollBy(t, { left: -1000 }); + await dataGrid.scrollBy(t, { left: 1000 }); await t.expect(dataGrid.getDataCell(0, 20).isFocused).ok(); }).before(async () => createWidget('dxDataGrid', { @@ -2414,10 +2414,10 @@ test('DataGrid - The "row" parameter in the FocusedRowChanged event refers to a .click(adaptiveCell.element); await dataGrid - .scrollTo(t, { y: 2000 }); + .scrollTo(t, { top: 2000 }); await t.wait(300); await dataGrid - .scrollTo(t, { y: 1000 }); + .scrollTo(t, { top: 1000 }); await t.wait(300); const scrollOffsets = await t @@ -2467,7 +2467,7 @@ test('DataGrid - The "row" parameter in the FocusedRowChanged event refers to a .expect(dataGrid.isReady()) .ok(); - await dataGrid.scrollBy(t, { y: 10000 }); + await dataGrid.scrollBy(t, { top: 10000 }); await testScreenshot(t, takeScreenshot, `T1270354-virtual-${useNative ? 'native' : 'simulated'}-scrolling-with-grouping-and-summary.png`, { element: '#container' }); await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/validation/validationPopup.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/validation/validationPopup.ts index fa50c278bdb9..a0457b2e5f57 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/validation/validationPopup.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/validation/validationPopup.ts @@ -60,7 +60,7 @@ test('Validation popup with open master detail', async (t) => { // act await testScreenshot(t, takeScreenshot, 'validation-popup_master-detail.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { y: 150 }); + await dataGrid.scrollTo(t, { top: 150 }); await testScreenshot(t, takeScreenshot, 'validation-popup_master-detail_after-scroll.png', { element: dataGrid.element }); // assert @@ -69,7 +69,7 @@ test('Validation popup with open master detail', async (t) => { .expect(dataGrid.getInvalidMessageTooltip().exists) .ok(); - await dataGrid.scrollTo(t, { y: 0 }); + await dataGrid.scrollTo(t, { top: 0 }); await t.expect(compareResults.isValid()) .ok(compareResults.errorMessages()); @@ -109,7 +109,7 @@ test('Validation popup with open master detail and fixed columns', async (t) => // act await testScreenshot(t, takeScreenshot, 'validation-popup_master-detail_fixed-column.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { y: 150 }); + await dataGrid.scrollTo(t, { top: 150 }); await testScreenshot(t, takeScreenshot, 'validation-popup_master-detail_fixed-column_after-scroll.png', { element: dataGrid.element }); // assert @@ -118,7 +118,7 @@ test('Validation popup with open master detail and fixed columns', async (t) => .expect(dataGrid.getInvalidMessageTooltip().exists) .ok(); - await dataGrid.scrollTo(t, { y: 0 }); + await dataGrid.scrollTo(t, { top: 0 }); await t.expect(compareResults.isValid()) .ok(compareResults.errorMessages()); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/functional.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/functional.ts index 2277f40a90f8..9aa99b3b1ead 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/functional.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/functional.ts @@ -29,11 +29,11 @@ test('DataGrid should not scroll back to the focused cell after horizontal scrol .expect(dataGrid.getDataCell(0, 0).element.focused) .ok(); - await dataGrid.scrollTo(t, { x: 50 }); + await dataGrid.scrollTo(t, { left: 50 }); await t.expect(dataGrid.getScrollLeft()).eql(50); - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); await t .expect(dataGrid.getScrollLeft()) @@ -50,26 +50,26 @@ test('DataGrid should not scroll back to the focused cell after horizontal scrol test('DataGrid should not scroll back to the focused cell after horizontal scrolling to the left when columnRenderingMode is virtual', async (t) => { const dataGrid = new DataGrid('#container'); - await dataGrid.scrollTo(t, { x: 1500 }); + await dataGrid.scrollTo(t, { left: 1500 }); await t .click(dataGrid.getDataCell(0, 18).element) .expect(dataGrid.getDataCell(0, 18).element.focused) .ok(); - await dataGrid.scrollTo(t, { x: 1200 }); + await dataGrid.scrollTo(t, { left: 1200 }); await t .expect(dataGrid.getScrollLeft()) .eql(1200); - await dataGrid.scrollTo(t, { x: 1000 }); + await dataGrid.scrollTo(t, { left: 1000 }); await t .expect(dataGrid.getScrollLeft()) .eql(1000); - await dataGrid.scrollTo(t, { x: 800 }); + await dataGrid.scrollTo(t, { left: 800 }); await t .wait(200) diff --git a/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/visual.ts b/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/visual.ts index 4ef6fc4e9de8..7b2235aa64c1 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/visual.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/common/virtualColumns/visual.ts @@ -91,14 +91,14 @@ test('The updateDimensions method should render the grid if a container was hidd .ok(); // act - await dataGrid.scrollTo(t, { y: 5000 }); + await dataGrid.scrollTo(t, { top: 5000 }); // assert await testScreenshot(t, takeScreenshot, `T1176160-master-detail-with-virtual-columns-and-useNative=${useNative}-1.png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: 1000 }); - await dataGrid.scrollTo(t, { x: 2000 }); + await dataGrid.scrollTo(t, { left: 1000 }); + await dataGrid.scrollTo(t, { left: 2000 }); // assert await testScreenshot(t, takeScreenshot, `T1176160-master-detail-with-virtual-columns-and-useNative=${useNative}-2.png`, { element: dataGrid.element }); @@ -148,9 +148,9 @@ test('The markup should be correct after horizontal scrolling and collapse of th await t.wait(100); // act - await dataGrid.scrollTo(t, { x: 2000 }); + await dataGrid.scrollTo(t, { left: 2000 }); await t.wait(300); - await dataGrid.scrollTo(t, { x: 4000 }); + await dataGrid.scrollTo(t, { left: 4000 }); // assert await testScreenshot(t, takeScreenshot, 'T1176161-master-detail-with-virtual-columns-1.png', { element: dataGrid.element }); @@ -204,7 +204,7 @@ test('Columns should be rendered correctly after reinit of columns controller', const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await dataGrid.scrollTo(t, { x: 1000 }); + await dataGrid.scrollTo(t, { left: 1000 }); await t.expect(dataGrid.getScrollLeft()).eql(1000); const columns = generateColumns(500); @@ -234,7 +234,7 @@ test('Columns reordering should work with virtual columns', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await dataGrid.scrollTo(t, { x: 100000 }); + await dataGrid.scrollTo(t, { left: 100000 }); await t.drag( dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(499).element, @@ -261,7 +261,7 @@ test('Grouping should work with virtual columns', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await dataGrid.scrollTo(t, { x: 100000 }); + await dataGrid.scrollTo(t, { left: 100000 }); await t.dragToElement( dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(499).element, @@ -289,7 +289,7 @@ test('Column chooser should work with virtual columns', async (t) => { const dataGrid = new DataGrid('#container'); const { takeScreenshot, compareResults } = createScreenshotsComparer(t); - await dataGrid.scrollTo(t, { x: 100000 }); + await dataGrid.scrollTo(t, { left: 100000 }); await t.click(dataGrid.getColumnChooserButton()); await t.expect( @@ -325,12 +325,12 @@ test('Group row should have right colspan with summary, virtual columns and fixe // NOTE: There is an issue with Scrollable // So, we should scroll two times to reach maximum right scroll position - await grid.scrollTo(t, { x: 10000 }); - await grid.scrollTo(t, { x: 10000 }); + await grid.scrollTo(t, { left: 10000 }); + await grid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'T1221369_fixed-summary-with-virtual-cols_1.png', { element: grid.element }); - await grid.scrollTo(t, { x: 0 }); + await grid.scrollTo(t, { left: 0 }); await testScreenshot(t, takeScreenshot, 'T1221369_fixed-summary-with-virtual-cols_2.png', { element: grid.element }); @@ -386,7 +386,7 @@ test('Header, fixed columns and virtual scroll bar should have stable position d await t.expect(dataGrid.getDataRow(0).element.exists).ok(); // wait for initial render await ClientFunction(() => { (window as any).deferred = $.Deferred(); })(); - await dataGrid.scrollTo(t, { x: 2000 }); + await dataGrid.scrollTo(t, { left: 2000 }); await testScreenshot(t, takeScreenshot, 'T1260472-async-render-during-horizontal-scrolling.png', { element: dataGrid.element }); await ClientFunction(() => { (window as any).deferred.resolve(); @@ -476,7 +476,7 @@ test('Virtual columns should render correctly with repaintChangesOnly and groupi .eql('0'); // act - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); // assert await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnReordering.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnReordering.ts index 9a2878a6e93f..a9ed55ae1a87 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnReordering.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnReordering.ts @@ -52,7 +52,7 @@ test.meta({ browserSize: [1000, 800] })('Move right fixed column to the left', a await t.drag(dataGrid.getHeaders().getHeaderRow(0).getHeaderCell(24).element, -400, 0); // TODO: issue will be fixed in the card 7Mct6tJU - await dataGrid.scrollTo(t, { x: 0 }); + await dataGrid.scrollTo(t, { left: 0 }); await testScreenshot(t, takeScreenshot, 'move_right_fixed_column_to_left.png', { element: dataGrid.element }); @@ -161,7 +161,7 @@ test.meta({ browserSize: [1000, 800] })('Move right fixed band column to the lef await t.drag(dataGrid.getHeaders().getHeaderRow(1).getHeaderCell(3).element, -500, 0); // TODO: issue will be fixed in the card 7Mct6tJU - await dataGrid.scrollTo(t, { x: 0 }); + await dataGrid.scrollTo(t, { left: 0 }); await testScreenshot(t, takeScreenshot, 'move_right_fixed_band_column_to_left.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnResizing.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnResizing.ts index eceda62df348..8620f6e3e87b 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnResizing.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumnResizing.ts @@ -31,7 +31,7 @@ fixture.disablePageReloads`Resize columns - nextColumn mode` await testScreenshot(t, takeScreenshot, `resize_first_fixed_column_with_left_position_1_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `resize_first_fixed_column_with_left_position_2_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -69,7 +69,7 @@ fixture.disablePageReloads`Resize columns - nextColumn mode` await testScreenshot(t, takeScreenshot, `resize_second_fixed_column_with_right_position_1_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `resize_second_fixed_column_with_right_position_2_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -169,7 +169,7 @@ fixture.disablePageReloads`Resize columns - widget mode` await testScreenshot(t, takeScreenshot, `resize_first_fixed_column_with_left_position_1_(widget_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `resize_first_fixed_column_with_left_position_2_(widget_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -207,7 +207,7 @@ fixture.disablePageReloads`Resize columns - widget mode` await testScreenshot(t, takeScreenshot, `resize_second_fixed_column_with_right_position_1_(widget_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `resize_second_fixed_column_with_right_position_2_(widget_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -245,7 +245,7 @@ fixture.disablePageReloads`Resize columns - widget mode` await testScreenshot(t, takeScreenshot, `resize_first_fixed_column_with_right_position_1_(widget_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `resize_first_fixed_column_with_right_position_2_(widget_mode_and_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumns.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumns.ts index ee5b161ed306..8f115d2843de 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumns.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/stickyColumns.ts @@ -24,7 +24,7 @@ test.meta({ browserSize: [1000, 800] })('The simulated scrollbar should display await testScreenshot(t, takeScreenshot, 'simulated_scrollbar_with_sticky_columns_1.png', { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: 1500 }); + await dataGrid.scrollTo(t, { left: 1500 }); await testScreenshot(t, takeScreenshot, 'simulated_scrollbar_with_sticky_columns_2.png', { element: dataGrid.element }); @@ -228,7 +228,7 @@ test('Boolean column checkboxes should display correctly when there are fixed co await t.expect(dataGrid.isReady()).ok(); // act - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); await testScreenshot(t, takeScreenshot, 'T1303134_boolean_column_checkboxes_with_fixed_columns.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withAdaptability.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withAdaptability.ts index 52e7f78d1b3b..ebb29edd09e4 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withAdaptability.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withAdaptability.ts @@ -22,7 +22,7 @@ fixture.disablePageReloads`Sticky columns - Adaptability` await testScreenshot(t, takeScreenshot, `adaptability_sticky_columns_with_adaptive_detail_row_1_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `adaptability_sticky_columns_with_adaptive_detail_row_2_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -53,7 +53,7 @@ fixture.disablePageReloads`Sticky columns - Adaptability` await testScreenshot(t, takeScreenshot, `adaptability_sticky_columns_with_sticky_positions_1_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, `adaptability_sticky_columns_with_sticky_positions_2_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -123,7 +123,7 @@ fixture.disablePageReloads`Sticky columns - Adaptability` await testScreenshot(t, takeScreenshot, `hidden_column_between_sticky_column_and_left_fixed_column_1_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `hidden_column_between_sticky_column_and_left_fixed_column_2_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -151,7 +151,7 @@ fixture.disablePageReloads`Sticky columns - Adaptability` await testScreenshot(t, takeScreenshot, `banded_hidden_column_between_sticky_column_and_left_fixed_column_1_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `banded_hidden_column_between_sticky_column_and_left_fixed_column_2_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -182,7 +182,7 @@ fixture.disablePageReloads`Sticky columns - Adaptability` await testScreenshot(t, takeScreenshot, `hidden_column_between_sticky_column_and_right_fixed_column_1_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `hidden_column_between_sticky_column_and_right_fixed_column_2_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -210,7 +210,7 @@ fixture.disablePageReloads`Sticky columns - Adaptability` await testScreenshot(t, takeScreenshot, `banded_hidden_column_between_sticky_column_and_right_fixed_column_1_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: scrollLeft }); + await dataGrid.scrollTo(t, { left: scrollLeft }); await testScreenshot(t, takeScreenshot, `banded_hidden_column_between_sticky_column_and_right_fixed_column_2_(rtlEnabled_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -241,7 +241,7 @@ test.meta({ browserSize: [900, 800] })('Sticky columns with sticky positions whe await testScreenshot(t, takeScreenshot, 'adaptability_sticky_columns_with_sticky_positions_and_hiding_priority_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'adaptability_sticky_columns_with_sticky_positions_and_hiding_priority_2.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withBandColumns.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withBandColumns.ts index 632030b6ab4e..acb4ddca1ffc 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withBandColumns.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withBandColumns.ts @@ -17,7 +17,7 @@ fixture.disablePageReloads`Band sticky columns` await t.expect(dataGrid.isReady()).ok(); - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `T1279722_band_sticky_columns-headers_with_filter_row_and_grouped_column_(rtl=${rtlEnabled}).png`, { element: dataGrid.element }); await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withEditing.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withEditing.ts index a05230f98020..9ae7b6f236da 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withEditing.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withEditing.ts @@ -22,7 +22,7 @@ test.meta({ browserSize: [800, 800] })('The row edit mode: Edit row when there a await testScreenshot(t, takeScreenshot, 'edit_row_with_sticky_columns_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_row_with_sticky_columns_2.png', { element: dataGrid.element }); @@ -50,7 +50,7 @@ test.meta({ browserSize: [800, 800] })('The form edit mode: Edit row when there await testScreenshot(t, takeScreenshot, 'edit_form_with_sticky_columns_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_form_with_sticky_columns_2.png', { element: dataGrid.element }); @@ -82,7 +82,7 @@ test.meta({ browserSize: [800, 800] })('The batch edit mode: Edit cell when ther await testScreenshot(t, takeScreenshot, 'edit_cell_with_sticky_columns_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_cell_with_sticky_columns_2.png', { element: dataGrid.element }); @@ -114,7 +114,7 @@ test.meta({ browserSize: [800, 800] })('The batch edit mode: Edit fixed cell', a await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_2.png', { element: dataGrid.element }); @@ -146,7 +146,7 @@ test.meta({ browserSize: [800, 800] })('The batch edit mode: Edit fixed cell wit await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_with_sticky_position_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_with_sticky_position_2.png', { element: dataGrid.element }); @@ -181,7 +181,7 @@ test.meta({ browserSize: [800, 800] })('The cell edit mode: Edit fixed cell with await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_with_validation_rule_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_with_validation_rule_2.png', { element: dataGrid.element }); @@ -214,7 +214,7 @@ test.meta({ browserSize: [800, 800] })('The cell edit mode: Edit fixed cell with await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_with_sticky_position_and_validation_rule_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'edit_fixed_cell_with_sticky_position_and_validation_rule_2.png', { element: dataGrid.element }); @@ -249,7 +249,7 @@ test.meta({ browserSize: [800, 800] })('The cell edit mode: Edit cell with valid await testScreenshot(t, takeScreenshot, 'edit_cell_with_validation_rule_and_fixed_columns_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 200 }); + await dataGrid.scrollTo(t, { left: 200 }); await testScreenshot(t, takeScreenshot, 'edit_cell_with_validation_rule_and_fixed_columns_2.png', { element: dataGrid.element }); @@ -277,13 +277,13 @@ test.meta({ browserSize: [800, 800] })('The cell edit mode: Edit last unfixed ce await t.expect(dataGrid.isReady()).ok(); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await dataGrid.apiCellValue(0, 5, ''); await t.click(dataGrid.getDataCell(0, 5).element); await testScreenshot(t, takeScreenshot, 'edit_last_unfixed_cell_with_validation_rule_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 350 }); + await dataGrid.scrollTo(t, { left: 350 }); await testScreenshot(t, takeScreenshot, 'edit_last_unfixed_cell_with_validation_rule_2.png', { element: dataGrid.element }); @@ -316,7 +316,7 @@ test.meta({ browserSize: [800, 800] })('The cell edit mode: The validation messa await testScreenshot(t, takeScreenshot, 'vertical_scroll_and_fixed_column_with_validation_message_and_revert_button_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { y: 10000 }); + await dataGrid.scrollTo(t, { top: 10000 }); await testScreenshot(t, takeScreenshot, 'vertical_scroll_and_fixed_column_with_validation_message_and_revert_button_2.png', { element: dataGrid.element }); @@ -349,7 +349,7 @@ test.meta({ browserSize: [800, 800] })('The cell edit mode: The validation messa await testScreenshot(t, takeScreenshot, 'vertical_scroll_and_focused_fixed_column_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { y: 10000 }); + await dataGrid.scrollTo(t, { top: 10000 }); await testScreenshot(t, takeScreenshot, 'vertical_scroll_and_focused_fixed_column_2.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withFilterRow.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withFilterRow.ts index d18b5c923864..25d8cd5cd6ad 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withFilterRow.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withFilterRow.ts @@ -20,7 +20,7 @@ test.meta({ browserSize: [800, 800] })('Filter row with sticky columns', async ( await testScreenshot(t, takeScreenshot, 'filter_row_with_sticky_columns_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'filter_row_with_sticky_columns_2.png', { element: dataGrid.element }); @@ -46,7 +46,7 @@ test.meta({ browserSize: [800, 800] })('Filter row with sticky columns when ther await testScreenshot(t, takeScreenshot, 'filter_row_with_sticky_and_band_columns_1_(showColumnHeaders_=_false).png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'filter_row_with_sticky_and_band_columns_2_(showColumnHeaders_=_false).png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withGrouping.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withGrouping.ts index e0d820445870..721eec999308 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withGrouping.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withGrouping.ts @@ -21,10 +21,10 @@ fixture.disablePageReloads`FixedColumns - Grouping` await testScreenshot(t, takeScreenshot, `grouping-scroll-begin-rtl=${rtlEnabled}.png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: rtlEnabled ? 500 : 100 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 500 : 100 }); await testScreenshot(t, takeScreenshot, `grouping-scroll-center=${rtlEnabled}.png`, { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `grouping-scroll-end=${rtlEnabled}.png`, { element: dataGrid.element }); await t @@ -91,10 +91,10 @@ test.meta({ browserSize: [900, 800] })('Sticky columns with grouping & summary ( await testScreenshot(t, takeScreenshot, 'grouping-multiple-scroll-begin.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); await testScreenshot(t, takeScreenshot, 'grouping-multiple-scroll-center.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'grouping-multiple-scroll-end.png', { element: dataGrid.element }); await t @@ -265,7 +265,7 @@ test('DataGrid - Group row content is scrolled if repaintChangesOnly is enabled .expect(dataGrid.getGroupRow(0).isExpanded) .notOk(); - await dataGrid.scrollBy(t, { x: 1000 }); + await dataGrid.scrollBy(t, { left: 1000 }); await testScreenshot(t, takeScreenshot, 'group_row_scrolling_all_collapsed_fixed_columns.png', { element: dataGrid.element }); await t @@ -301,7 +301,7 @@ test.meta({ await testScreenshot(t, takeScreenshot, 'grouping-focused-group-row.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); await testScreenshot(t, takeScreenshot, 'grouping-focused-group-row-scroll.png', { element: dataGrid.element }); await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withMasterDetail.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withMasterDetail.ts index f90487264010..78fdbb294a1d 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withMasterDetail.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withMasterDetail.ts @@ -21,10 +21,10 @@ test.meta({ browserSize: [900, 800] })('Sticky columns with master-detail', asyn await testScreenshot(t, takeScreenshot, 'masterdetail-scroll-begin.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 100 }); + await dataGrid.scrollTo(t, { left: 100 }); await testScreenshot(t, takeScreenshot, 'masterdetail-scroll-center.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'masterdetail-scroll-end.png', { element: dataGrid.element }); await t diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withRowSelection.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withRowSelection.ts index 5520dfe0f638..10d19f7936ff 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withRowSelection.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withRowSelection.ts @@ -18,7 +18,7 @@ test.meta({ browserSize: [800, 800] })('The selected row should be displayed cor await testScreenshot(t, takeScreenshot, 'row_selection_with_sticky_columns_1.png', { element: dataGrid.element }); - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'row_selection_with_sticky_columns_2.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualColumns.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualColumns.ts index ac92e1185273..ad0ab5859bc9 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualColumns.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualColumns.ts @@ -21,7 +21,7 @@ test.meta({ browserSize: [800, 800] })('Fixed columns with sticky position shoul await testScreenshot(t, takeScreenshot, 'virtual_columns_with_sticky_columns_1.png', { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: 150 }); + await dataGrid.scrollTo(t, { left: 150 }); await testScreenshot(t, takeScreenshot, 'virtual_columns_with_sticky_columns_2.png', { element: dataGrid.element }); @@ -84,7 +84,7 @@ test('should render group row in scroll right max position', async (t) => { await t.expect(dataGrid.isReady()).ok(); // NOTE: Scroll to max right position - await dataGrid.scrollTo(t, { x: 9999999 }); + await dataGrid.scrollTo(t, { left: 9999999 }); await t.expect(dataGrid.isReady()).ok(); await testScreenshot(t, takeScreenshot, 'virtual_columns_with_grouping_scroll_right.png', { element: dataGrid.element }); @@ -124,7 +124,7 @@ test('should render nested group row in scroll right max position', async (t) => await t.expect(dataGrid.isReady()).ok(); // NOTE: Scroll to max right position - await dataGrid.scrollTo(t, { x: 9999999 }); + await dataGrid.scrollTo(t, { left: 9999999 }); await t.expect(dataGrid.isReady()).ok(); await testScreenshot(t, takeScreenshot, 'virtual_columns_with_nested_grouping_scroll_right.png', { element: dataGrid.element }); @@ -169,7 +169,7 @@ test('expand group icon should be clickable in scroll right max position', async await t.expect(dataGrid.isReady()).ok(); // NOTE: Scroll to max right position - await dataGrid.scrollTo(t, { x: 9999999 }); + await dataGrid.scrollTo(t, { left: 9999999 }); const expandCell = dataGrid.getGroupRow(1).getCell(0); await t.click(expandCell.element); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualScrolling.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualScrolling.ts index f83c423ef19f..e423404fbbf6 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualScrolling.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/common/withVirtualScrolling.ts @@ -18,11 +18,11 @@ test.meta({ browserSize: [800, 800] })('Fixed columns should display correctly w await t.expect(dataGrid.isReady()).ok(); // act - await dataGrid.scrollTo(t, { y: 500 }); + await dataGrid.scrollTo(t, { top: 500 }); await t.wait(100); - await dataGrid.scrollTo(t, { y: 1000 }); + await dataGrid.scrollTo(t, { top: 1000 }); await t.wait(100); - await dataGrid.scrollTo(t, { y: 1500 }); + await dataGrid.scrollTo(t, { top: 1500 }); await t.wait(100); await testScreenshot(t, takeScreenshot, 'fixed_columns_with_virtual_scrolling_1.png', { element: dataGrid.element }); @@ -64,7 +64,7 @@ test.meta({ browserSize: [800, 800] })('Fixed columns should display correctly w await t.expect(dataGrid.isReady()).ok(); // act - await dataGrid.scrollTo(t, { x: 10000 }); + await dataGrid.scrollTo(t, { left: 10000 }); await testScreenshot(t, takeScreenshot, 'fixed_columns_with_horizontal_scrolling.png', { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnFirstCases.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnFirstCases.ts index 696d23aa88b7..5b01a21dd8b5 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnFirstCases.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnFirstCases.ts @@ -23,7 +23,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-1)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-1)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -84,7 +84,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-2)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-2)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -145,7 +145,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-3)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-3)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -206,7 +206,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-4)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-4)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -265,7 +265,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-5)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-5)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -324,7 +324,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-6)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-6)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -386,7 +386,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-7)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-7)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnSecondCases.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnSecondCases.ts index 1386183bf886..2543937b73f8 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnSecondCases.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/bandColumnSecondCases.ts @@ -23,7 +23,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-8)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-8)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -75,7 +75,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-9)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-9)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -127,7 +127,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-10)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-10)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -179,7 +179,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-11)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-11)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -228,7 +228,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-12)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-12)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -277,7 +277,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-13)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-13)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -326,7 +326,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `band-columns-1-(case-14)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `band-columns-2-(case-14)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/positions.ts b/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/positions.ts index 5730aa4341ad..734add94276d 100644 --- a/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/positions.ts +++ b/e2e/testcafe-devextreme/tests/dataGrid/sticky/fixed/positions.ts @@ -23,7 +23,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `left-position-1(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `left-position-2(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -55,7 +55,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `right-position-1(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `right-position-2(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -87,7 +87,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `left-right-positions-1(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `left-right-positions-2(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -123,7 +123,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `left-right-sticky-positions-1(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `left-right-sticky-positions-2(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -167,7 +167,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `sticky-position-1-(case-1)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `sticky-position-2-(case-1)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -203,7 +203,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `sticky-position-1-(case-2)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `sticky-position-2-(case-2)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); @@ -245,7 +245,7 @@ borderConfigs.forEach(({ showColumnLines, showBorders }) => { await testScreenshot(t, takeScreenshot, `sticky-position-1-(case-3)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); // act - await dataGrid.scrollTo(t, { x: rtlEnabled ? 0 : 10000 }); + await dataGrid.scrollTo(t, { left: rtlEnabled ? 0 : 10000 }); await testScreenshot(t, takeScreenshot, `sticky-position-2-(case-3)(cLines_=_${showColumnLines}_borders_=_${showBorders}_rtl_=_${rtlEnabled}).png`, { element: dataGrid.element }); diff --git a/e2e/testcafe-devextreme/tests/scheduler/helpers/utils.ts b/e2e/testcafe-devextreme/tests/scheduler/helpers/utils.ts index 55b413a5a978..fbc7f6119ef1 100644 --- a/e2e/testcafe-devextreme/tests/scheduler/helpers/utils.ts +++ b/e2e/testcafe-devextreme/tests/scheduler/helpers/utils.ts @@ -4,7 +4,7 @@ export const scrollTo = ClientFunction((x, y) => { const instance = ($('#container') as any).dxScheduler('instance'); const scrollable = instance.getWorkSpaceScrollable(); - scrollable.scrollTo({ y, x }); + scrollable.scrollTo({ top: y, left: x }); }); export const scrollToDate = ClientFunction((date: Date, groups?: Record) => { diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.test.ts b/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.test.ts index c28897c00fe5..b6a8c9e31df1 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.test.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.test.ts @@ -1,3 +1,5 @@ +import '@ts/ui/scroll_view/scrollable'; + import { afterEach, beforeEach, @@ -7,10 +9,11 @@ import { } from '@jest/globals'; import $ from '@js/core/renderer'; +import { FAKE_TABLE_CLASS } from '../keyboard_navigation/const'; import { DataArea } from './m_data_area'; -const createComponent = (): unknown => ({ - option: (optionName?: string) => { +const createComponent = (options: Record = {}): unknown => ({ + option: (optionName?: string): unknown => { if (optionName === undefined) { return {}; } @@ -18,6 +21,7 @@ const createComponent = (): unknown => ({ return { rtlEnabled: false, encodeHtml: false, + ...options, }[optionName]; }, _eventsStrategy: { hasEvent: () => false }, @@ -114,4 +118,63 @@ describe('DataArea', () => { expect(getTableWidth()).toEqual('0px'); }); }); + + describe('scrollTo with virtual scrolling', () => { + const TABLE_OFFSET = 1000; + const CELL_SIZES = [100, 120, 300]; + const POSITION_PAST_TABLE = TABLE_OFFSET + 520; + + const renderVirtualDataArea = (rtlEnabled = false): DataArea => { + const area = new DataArea(createComponent({ + rtlEnabled, + 'scrolling.mode': 'virtual', + scrolling: { useNative: false }, + })); + const row = [{ text: '1' }, { text: '2' }, { text: '3' }]; + + area.render($(container), [row, row, row]); + area.setVirtualContentParams({ + left: TABLE_OFFSET, top: TABLE_OFFSET, width: 3000, height: 3000, + }); + area.renderScrollable(); + area.setGroupWidth(200); + area.setGroupHeight(200); + area.setColumnsWidth(CELL_SIZES); + area.setRowsHeight(CELL_SIZES); + + return area; + }; + + const getFakeTable = (): HTMLElement => container.querySelector(`.${FAKE_TABLE_CLASS}`)!; + + it('should show the fake table at the position scrolled past the rendered table', () => { + const area = renderVirtualDataArea(); + + area.scrollTo({ left: POSITION_PAST_TABLE, top: POSITION_PAST_TABLE }); + + expect(getFakeTable().style.left).toBe(`${POSITION_PAST_TABLE}px`); + expect(getFakeTable().style.top).toBe(`${POSITION_PAST_TABLE}px`); + expect(getFakeTable().classList).not.toContain('dx-hidden'); + }); + + it('should hide the fake table when scrolled back to the rendered table', () => { + const area = renderVirtualDataArea(); + + area.scrollTo({ left: POSITION_PAST_TABLE, top: POSITION_PAST_TABLE }); + area.scrollTo({ left: TABLE_OFFSET, top: TABLE_OFFSET }); + + expect(getFakeTable().style.left).toBe(`${TABLE_OFFSET}px`); + expect(getFakeTable().style.top).toBe(`${TABLE_OFFSET}px`); + expect(getFakeTable().classList).toContain('dx-hidden'); + }); + + it('should offset the fake table from the right when rtlEnabled is true', () => { + const area = renderVirtualDataArea(true); + + area.scrollTo({ left: POSITION_PAST_TABLE, top: TABLE_OFFSET }); + + expect(getFakeTable().style.right).toBe(`${POSITION_PAST_TABLE}px`); + expect(getFakeTable().classList).not.toContain('dx-hidden'); + }); + }); }); diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.ts b/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.ts index 7267d333f088..4a7ea12f46f8 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/data_area/m_data_area.ts @@ -61,8 +61,8 @@ class DataArea extends AreaItem { } _moveFakeTable(scrollPos) { - this._moveFakeTableHorizontally(scrollPos.x); - this._moveFakeTableTop(scrollPos.y); + this._moveFakeTableHorizontally(scrollPos.left); + this._moveFakeTableTop(scrollPos.top); super._moveFakeTable(); } diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.test.ts b/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.test.ts new file mode 100644 index 000000000000..3f4f63807607 --- /dev/null +++ b/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.test.ts @@ -0,0 +1,114 @@ +import '@ts/ui/scroll_view/scrollable'; + +import { + afterEach, + beforeEach, + describe, + expect, + it, +} from '@jest/globals'; +import $ from '@js/core/renderer'; + +import { FAKE_TABLE_CLASS } from '../keyboard_navigation/const'; +import { HorizontalHeadersArea, VerticalHeadersArea } from './m_headers_area'; + +const TABLE_OFFSET = 1000; +const CELL_SIZES = [100, 120, 300]; +const POSITION_PAST_TABLE = TABLE_OFFSET + 520; + +const createComponent = (): unknown => ({ + option: (optionName?: string): unknown => { + if (optionName === undefined) { + return {}; + } + + return { + rtlEnabled: false, + encodeHtml: false, + 'scrolling.mode': 'virtual', + }[optionName]; + }, + _eventsStrategy: { hasEvent: () => false }, + _defaultActionArgs: () => ({}), +}); + +describe('Headers areas', () => { + let container: HTMLElement = document.createElement('div'); + + const getFakeTable = (): HTMLElement => container.querySelector(`.${FAKE_TABLE_CLASS}`)!; + + beforeEach(() => { + container = document.createElement('div'); + document.body.appendChild(container); + }); + + afterEach(() => { + container.remove(); + }); + + describe('HorizontalHeadersArea scrollTo with virtual scrolling', () => { + const renderVirtualArea = (): HorizontalHeadersArea => { + const area = new HorizontalHeadersArea(createComponent()); + + area.render($(container), [[{ text: 'A' }, { text: 'B' }, { text: 'C' }]]); + area.setVirtualContentParams({ left: TABLE_OFFSET, width: 3000, height: 300 }); + area.renderScrollable(); + area.setGroupWidth(200); + area.setColumnsWidth(CELL_SIZES); + + return area; + }; + + it('should show the fake table at the position scrolled past the rendered table', () => { + const area = renderVirtualArea(); + + area.scrollTo({ left: POSITION_PAST_TABLE }); + + expect(getFakeTable().style.left).toBe(`${POSITION_PAST_TABLE}px`); + expect(getFakeTable().classList).not.toContain('dx-hidden'); + }); + + it('should hide the fake table when scrolled back to the rendered table', () => { + const area = renderVirtualArea(); + + area.scrollTo({ left: POSITION_PAST_TABLE }); + area.scrollTo({ left: TABLE_OFFSET }); + + expect(getFakeTable().style.left).toBe(`${TABLE_OFFSET}px`); + expect(getFakeTable().classList).toContain('dx-hidden'); + }); + }); + + describe('VerticalHeadersArea scrollTo with virtual scrolling', () => { + const renderVirtualArea = (): VerticalHeadersArea => { + const area = new VerticalHeadersArea(createComponent()); + + area.render($(container), [[{ text: 'A' }], [{ text: 'B' }], [{ text: 'C' }]]); + area.setVirtualContentParams({ top: TABLE_OFFSET, width: 300, height: 3000 }); + area.renderScrollable(); + area.setGroupHeight(200); + area.setRowsHeight(CELL_SIZES); + + return area; + }; + + it('should show the fake table at the position scrolled past the rendered table', () => { + const area = renderVirtualArea(); + + area.scrollTo({ top: POSITION_PAST_TABLE }); + + expect(getFakeTable().style.top).toBe(`${POSITION_PAST_TABLE}px`); + expect(getFakeTable().classList).not.toContain('dx-hidden'); + }); + + it('should hide the fake table when scrolled back to the rendered table', () => { + const area = renderVirtualArea(); + + area.scrollTo({ top: POSITION_PAST_TABLE }); + area.scrollTo({ top: TABLE_OFFSET }); + + expect(getFakeTable().style.top).toBe(`${TABLE_OFFSET}px`); + expect(getFakeTable().classList).toContain('dx-hidden'); + }); + }); +}); diff --git a/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.ts b/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.ts index 776b74053574..7ef7ef7001bd 100644 --- a/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.ts +++ b/packages/devextreme/js/__internal/grids/pivot_grid/headers_area/m_headers_area.ts @@ -174,7 +174,7 @@ class HorizontalHeadersArea extends AreaItem { } _moveFakeTable(scrollPos) { - this._moveFakeTableHorizontally(scrollPos); + this._moveFakeTableHorizontally(scrollPos.left); super._moveFakeTable(); } } @@ -282,9 +282,8 @@ class VerticalHeadersArea extends HorizontalHeadersArea { } _moveFakeTable(scrollPos) { - this._moveFakeTableTop(scrollPos); - // @ts-expect-error - super._moveFakeTable(); + this._moveFakeTableTop(scrollPos.top); + super._moveFakeTable(scrollPos); } _getRowClassNames(rowIndex, cell, rowClassNames) { diff --git a/packages/devextreme/js/__internal/ui/scroll_view/scrollable.ts b/packages/devextreme/js/__internal/ui/scroll_view/scrollable.ts index 0e1fb5cfe1e4..dd2f94c80426 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/scrollable.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/scrollable.ts @@ -398,13 +398,9 @@ class Scrollable< return this._strategy.location(); } - _normalizeLocation(location: Partial | number): Partial { + _normalizeLocation(location: Partial | number): Partial { if (isPlainObject(location)) { - const left = ensureDefined(location.left, location.x); - const top = ensureDefined(location.top, location.y); + const { left, top } = location; return { left: isDefined(left) ? -left : undefined, top: isDefined(top) ? -top : undefined, diff --git a/packages/devextreme/js/__internal/ui/scroll_view/utils/convert_location.ts b/packages/devextreme/js/__internal/ui/scroll_view/utils/convert_location.ts index 257f18c9ad3a..376c086b1933 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/utils/convert_location.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/utils/convert_location.ts @@ -1,5 +1,4 @@ import type { ScrollDirection as Direction } from '@js/common'; -import { ensureDefined } from '@js/core/utils/common'; import { isDefined, isPlainObject, @@ -13,12 +12,11 @@ import { } from './scroll_direction'; export function convertToLocation( - location: number | Partial<{ x: number; y: number; top: number; left: number }>, + location: number | Partial, direction: Direction, ): Partial { if (isPlainObject(location)) { - const left = ensureDefined(location.left, location.x); - const top = ensureDefined(location.top, location.y); + const { left, top } = location; return { left: isDefined(left) ? left : undefined, top: isDefined(top) ? top : undefined, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnChooser.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnChooser.integration.tests.js index 706ec19a0d8d..79edaecb2600 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnChooser.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnChooser.integration.tests.js @@ -633,7 +633,7 @@ QUnit.module('Column chooser', baseModuleConfig, () => { dataGrid.showColumnChooser(); const treeView = $('.dx-treeview').dxTreeView('instance'); - treeView.getScrollable().scrollTo({ y: 50 }); + treeView.getScrollable().scrollTo({ top: 50 }); dataGrid.beginUpdate(); dataGrid.columnOption(0, 'visible', false); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.tests.js index 91b13548262c..1ff373d6d699 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/columnFixing.tests.js @@ -1271,7 +1271,7 @@ QUnit.module('Fixed columns', { that.rowsView.scrollChanged.add(scrollChanged); // act - scrollableInstance.scrollTo({ y: 20 }); + scrollableInstance.scrollTo({ top: 20 }); }); // T247366 @@ -1323,7 +1323,7 @@ QUnit.module('Fixed columns', { that.rowsView.resize(); // act - scrollableInstance.scrollTo({ y: 20000 }); + scrollableInstance.scrollTo({ top: 20000 }); }); // T1100701 @@ -1369,7 +1369,7 @@ QUnit.module('Fixed columns', { that.rowsView.resize(); // act - scrollableInstance.scrollTo({ y: 20000 }); + scrollableInstance.scrollTo({ top: 20000 }); $(scrollableInstance.content()).trigger('scroll'); // assert @@ -3349,7 +3349,7 @@ QUnit.module('Fixed columns with real dataController and columnController', { const scrollable = that.rowsView.getScrollable(); // act - scrollable.scrollTo({ x: 10 }); + scrollable.scrollTo({ left: 10 }); $(scrollable.container()).trigger('scroll'); // assert diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js index b662cd1f126d..df034d4d8043 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js @@ -4988,7 +4988,7 @@ QUnit.module('templates', baseModuleConfig, () => { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 3000 }); + scrollable.scrollTo({ top: 3000 }); $(scrollable.content()).trigger('scroll'); this.clock.tick(50); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.integration.tests.js index 58ded06d7502..a545980a2588 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.integration.tests.js @@ -443,7 +443,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { this.clock.tick(10); const scrollable = $('.dx-scrollable').dxScrollable('instance'); - scrollable.scrollTo({ y: 5 }); + scrollable.scrollTo({ top: 5 }); this.clock.tick(10); // act @@ -470,7 +470,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { this.clock.tick(10); const scrollable = $('.dx-scrollable').dxScrollable('instance'); - scrollable.scrollTo({ y: 10 }); + scrollable.scrollTo({ top: 10 }); this.clock.tick(10); // act @@ -1047,7 +1047,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { // act dataGrid.deleteRow(firstDataRowIndex); dataGrid.deleteRow(firstDataRowIndex); - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); // assert let rows = dataGrid.getVisibleRows(); @@ -1102,16 +1102,16 @@ QUnit.module('Initialization', baseModuleConfig, () => { }).dxDataGrid('instance'); // act - dataGrid.getScrollable().scrollTo({ y: 10000 }); - dataGrid.getScrollable().scrollTo({ y: 0 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 0 }); dataGrid.deleteRow(0); dataGrid.deleteRow(0); dataGrid.deleteRow(0); - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); this.clock.tick(10); for(let i = 0; i < 25; i++) { - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); } // assert @@ -1150,7 +1150,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { this.clock.tick(10); for(let i = 0; i < 5; i++) { - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); this.clock.tick(10); } @@ -1191,12 +1191,12 @@ QUnit.module('Initialization', baseModuleConfig, () => { }).dxDataGrid('instance'); // act - dataGrid.getScrollable().scrollTo({ y: 10000 }); - dataGrid.getScrollable().scrollTo({ y: 0 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 0 }); dataGrid.addRow(); dataGrid.saveEditData(); for(let i = 0; i < 25; i++) { - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); this.clock.tick(10); } @@ -1235,12 +1235,12 @@ QUnit.module('Initialization', baseModuleConfig, () => { }).dxDataGrid('instance'); // act - dataGrid.getScrollable().scrollTo({ y: 10000 }); - dataGrid.getScrollable().scrollTo({ y: 0 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 0 }); dataGrid.getDataSource().store().push([{ type: 'insert', data: { id: 987654321 }, index: 0 }]); this.clock.tick(10); for(let i = 0; i < 20; i++) { - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); } // assert @@ -1330,7 +1330,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { this.clock.tick(300); // act - dataGrid.getScrollable().scrollTo({ y: 3000 }); + dataGrid.getScrollable().scrollTo({ top: 3000 }); $(dataGrid.getScrollable().content()).trigger('scroll'); dataGrid.editCell(dataGrid.getRowIndexByKey(38), 0); @@ -1371,7 +1371,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { // act dataGrid.editCell(8, 0); - dataGrid.getScrollable().scrollTo({ y: 1000 }); + dataGrid.getScrollable().scrollTo({ top: 1000 }); dataGrid.editCell(5, 0); @@ -1428,7 +1428,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { }).dxDataGrid('instance'); // act - dataGrid.getScrollable().scrollTo({ y: 3000 }); + dataGrid.getScrollable().scrollTo({ top: 3000 }); dataGrid.editCell(1, 0); @@ -2067,7 +2067,7 @@ QUnit.module('Editing', baseModuleConfig, () => { }; // act - dataGrid.getScrollable().scrollBy({ y: 400 }); + dataGrid.getScrollable().scrollBy({ top: 400 }); $(dataGrid.getCellElement(5, 1)) .trigger(CLICK_EVENT) .trigger('dxclick'); @@ -4245,7 +4245,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1000 }); + scrollable.scrollTo({ top: 1000 }); $firstCell = $(dataGrid.getCellElement(0, 0)); $firstCell.trigger('dxclick'); @@ -4254,7 +4254,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { assert.notOk(dataGrid.$element().find('dx-datagrid-invalid').length, 'no invalid cells'); // act - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); this.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4301,7 +4301,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1000 }); + scrollable.scrollTo({ top: 1000 }); $firstCell = $(dataGrid.getCellElement(0, 0)); $firstCell.trigger('dxclick'); @@ -4310,7 +4310,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { assert.notOk(dataGrid.$element().find('dx-datagrid-invalid').length, 'no invalid cells'); // act - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); this.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4363,7 +4363,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1000 }); + scrollable.scrollTo({ top: 1000 }); $firstCell = $(dataGrid.getCellElement(0, 0)); $firstCell.trigger('dxclick'); @@ -4372,7 +4372,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { assert.notOk(dataGrid.$element().find('dx-datagrid-invalid').length, 'no invalid cells'); // act - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); this.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4428,7 +4428,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1000 }); + scrollable.scrollTo({ top: 1000 }); const $saveButton = $('.dx-datagrid-save-button'); $saveButton.trigger('dxclick'); @@ -4439,7 +4439,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { assert.notOk($saveButton.hasClass('dx-state-disabled'), 'save button is not disabled'); // act - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); this.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4499,7 +4499,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1000 }); + scrollable.scrollTo({ top: 1000 }); that.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4511,7 +4511,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { assert.notOk(dataGrid.$element().find('dx-datagrid-invalid').length, 'no invalid cells'); // act - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); that.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4602,7 +4602,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1000 }); + scrollable.scrollTo({ top: 1000 }); that.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); @@ -4614,7 +4614,7 @@ QUnit.module('Validation with virtual scrolling and rendering', { assert.notOk(dataGrid.$element().find('dx-datagrid-invalid').length, 'no invalid cells'); // act - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); that.clock.tick(10); $firstCell = $(dataGrid.getCellElement(0, 0)); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js index 07c7732746f3..efefaf8b63f1 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/editing.tests.js @@ -14679,7 +14679,7 @@ QUnit.module('Editing with validation', { ] }); - rowsView.scrollTo({ x: 100 }); + rowsView.scrollTo({ left: 100 }); that.clock.tick(10); // act @@ -16608,7 +16608,7 @@ QUnit.module('Editing with scrolling', { // act this.addRow(); - this.rowsView.scrollTo({ y: 100 }); + this.rowsView.scrollTo({ top: 100 }); // assert const items = this.dataController.items(); @@ -16641,8 +16641,8 @@ QUnit.module('Editing with scrolling', { // arrange this.addRow(); - this.rowsView.scrollTo({ y: 150 }); // append - this.rowsView.scrollTo({ y: 300 }); // append + this.rowsView.scrollTo({ top: 150 }); // append + this.rowsView.scrollTo({ top: 300 }); // append // assert assert.equal(this.dataController.pageIndex(), 2, 'page index'); @@ -16652,7 +16652,7 @@ QUnit.module('Editing with scrolling', { }); // act - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 150 }); // assert const items = this.dataController.items(); @@ -16683,7 +16683,7 @@ QUnit.module('Editing with scrolling', { // act this.addRow(); - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 150 }); // assert const items = this.dataController.items(); @@ -16715,7 +16715,7 @@ QUnit.module('Editing with scrolling', { // arrange this.addRow(); - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 150 }); // assert const items = this.dataController.items(); @@ -16764,8 +16764,8 @@ QUnit.module('Editing with scrolling', { assert.equal(this.dataController.pageIndex(), 0, 'page index'); // arrange - this.rowsView.scrollTo({ y: 1 }); - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 1 }); + this.rowsView.scrollTo({ top: 150 }); // assert assert.equal(this.dataController.pageIndex(), 2, 'page index'); @@ -16826,14 +16826,14 @@ QUnit.module('Editing with scrolling', { assert.equal(testElement.find('.dx-error-row').length, 1); // arrange - this.rowsView.scrollTo({ y: 550 }); + this.rowsView.scrollTo({ top: 550 }); // assert assert.equal(this.dataController.pageIndex(), 4, 'page index'); assert.equal(testElement.find('.dx-error-row').length, 0); // arrange - this.rowsView.scrollTo({ y: 1 }); + this.rowsView.scrollTo({ top: 1 }); // assert assert.equal(this.dataController.pageIndex(), 0, 'page index'); @@ -16868,7 +16868,7 @@ QUnit.module('Editing with scrolling', { this.rowsView.height(50); this.rowsView.resize(); - this.rowsView.scrollTo({ y: 100 }); + this.rowsView.scrollTo({ top: 100 }); const scrollTop = this.rowsView.getScrollable().scrollTop(); // act @@ -16902,7 +16902,7 @@ QUnit.module('Editing with scrolling', { const y = $(this.rowsView.getRowElement(4)).offset().top - $(this.rowsView.getRowElement(0)).offset().top; - this.rowsView.scrollTo({ y: y }); + this.rowsView.scrollTo({ top: y }); // act this.addRow(); @@ -16936,7 +16936,7 @@ QUnit.module('Editing with scrolling', { this.rowsView.resize(); - this.rowsView.scrollTo({ y: 10000 }); + this.rowsView.scrollTo({ top: 10000 }); // act this.addRow(); @@ -16991,7 +16991,7 @@ QUnit.module('Editing with scrolling', { this.rowsView.resize(); - this.rowsView.scrollTo({ y: 10000 }); + this.rowsView.scrollTo({ top: 10000 }); // act this.addRow(); @@ -17078,7 +17078,7 @@ QUnit.module('Editing with scrolling', { assert.equal(that.dataController.items().length, 7, 'count items'); // arrange - that.rowsView.scrollTo({ y: 500 }); + that.rowsView.scrollTo({ top: 500 }); // assert assert.equal(that.dataController.pageIndex(), 2, 'page index'); @@ -17092,7 +17092,7 @@ QUnit.module('Editing with scrolling', { assert.equal(that.dataController.items().length, 9, 'count items'); // arrange - that.rowsView.scrollTo({ y: 0 }); + that.rowsView.scrollTo({ top: 0 }); // assert assert.equal(that.dataController.pageIndex(), 0, 'page index'); @@ -17129,7 +17129,7 @@ QUnit.module('Editing with scrolling', { // arrange this.addRow(); - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 150 }); // assert const items = this.dataController.items(); @@ -17169,7 +17169,7 @@ QUnit.module('Editing with scrolling', { const y = $(this.rowsView.getRowElement(2)).offset().top - $(this.rowsView.getRowElement(0)).offset().top; - this.rowsView.scrollTo({ y: y }); + this.rowsView.scrollTo({ top: y }); // act this.addRow(); @@ -21256,7 +21256,7 @@ QUnit.module('Editing - new row position', { // act const scrollable = this.rowsView.getScrollable(); - scrollable.scrollTo({ y: 40 }); + scrollable.scrollTo({ top: 40 }); $(scrollable.container()).trigger('scroll'); this.clock.tick(10); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.integration.tests.js index ac80de2240c1..b19a5763a82c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.integration.tests.js @@ -688,7 +688,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 850 }); + scrollable.scrollTo({ top: 850 }); $(scrollable.container()).trigger('scroll'); this.clock.tick(10); $(dataGrid.getCellElement(0, 0)).trigger(CLICK_EVENT); @@ -727,7 +727,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { this.clock.tick(500); // act - dataGrid.getScrollable().scrollTo({ y: 2020 }); + dataGrid.getScrollable().scrollTo({ top: 2020 }); this.clock.tick(500); // assert @@ -4492,7 +4492,7 @@ QUnit.module('API methods', baseModuleConfig, () => { // act this.clock.tick(10); - dataGrid.getScrollable().scrollTo({ x: 0, y: 10000 }); + dataGrid.getScrollable().scrollTo({ left: 0, top: 10000 }); this.clock.tick(10); const rowData = dataGrid.getTopVisibleRowData(); @@ -5047,7 +5047,7 @@ QUnit.module('Column Resizing', baseModuleConfig, () => { }); this.clock.tick(10); - dataGrid.getScrollable().scrollTo({ y: 10 }); + dataGrid.getScrollable().scrollTo({ top: 10 }); this.clock.tick(10); // act diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.tests.js index 8ed2bd12fd8d..9f76e5533355 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/focus.tests.js @@ -2938,7 +2938,7 @@ QUnit.module('Focused row', getModuleConfig(true), () => { that.clock.tick(10); // act - scrollable.scrollBy({ y: 400 }); + scrollable.scrollBy({ top: 400 }); that.clock.tick(10); const visibleRow = that.getVisibleRows()[0]; $(that.getCellElement(0, 1)).trigger(CLICK_EVENT); @@ -2992,7 +2992,7 @@ QUnit.module('Focused row', getModuleConfig(true), () => { that.clock.tick(10); // act - scrollable.scrollBy({ y: 400 }); + scrollable.scrollBy({ top: 400 }); that.clock.tick(10); const visibleRow = that.getVisibleRows()[0]; $(that.getCellElement(0, 1)).trigger(CLICK_EVENT); @@ -4095,7 +4095,7 @@ QUnit.module('Focused row', getModuleConfig(true), () => { assert.equal(this.option('focusedRowIndex'), 1, 'focusedRowIndex'); // act - scrollTo(this, { y: 1000 }); + scrollTo(this, { top: 1000 }); this.clock.tick(10); // assert diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/masterDetail.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/masterDetail.integration.tests.js index bb32748cb519..ed8b813a32c7 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/masterDetail.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/masterDetail.integration.tests.js @@ -703,7 +703,7 @@ QUnit.module('Master Detail', baseModuleConfig, () => { // act dataGrid.expandRow(1); this.clock.tick(10); - dataGrid.getScrollable().scrollTo({ x: 0, y: 1000 }); + dataGrid.getScrollable().scrollTo({ left: 0, top: 1000 }); // assert assert.ok(dataGrid.getScrollable().scrollTop() > 100, 'vertical scroll is exists'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/rowsView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/rowsView.tests.js index 1af3556ca4ae..12e5cf2dd291 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/rowsView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/rowsView.tests.js @@ -4298,7 +4298,7 @@ QUnit.module('Rows view with real dataController and columnController', { this.rowsView.height(50); this.rowsView.resize(); - this.rowsView.scrollTo({ y: 10, x: 0 }); + this.rowsView.scrollTo({ top: 10, left: 0 }); this.rowsView.scrollChanged.add(function(e) { @@ -4420,7 +4420,7 @@ QUnit.module('Rows view with real dataController and columnController', { }); // act - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 150 }); this.clock.runAll(); }); @@ -4469,7 +4469,7 @@ QUnit.module('Rows view with real dataController and columnController', { }); // act - this.rowsView.scrollTo({ y: 150 }); + this.rowsView.scrollTo({ top: 150 }); this.clock.runAll(); }); @@ -4512,7 +4512,7 @@ QUnit.module('Rows view with real dataController and columnController', { }); // act - this.rowsView.scrollTo({ y: 100 }); + this.rowsView.scrollTo({ top: 100 }); this.clock.runAll(); }); @@ -5566,7 +5566,7 @@ QUnit.module('Rows view with real dataController and columnController', { this.rowsView.resize(); const scrollable = this.rowsView._scrollable; - scrollable.scrollTo({ y: 2500 }); + scrollable.scrollTo({ top: 2500 }); $(scrollable.container()).trigger('scroll'); this.clock.tick(500); @@ -5923,7 +5923,7 @@ QUnit.module('Virtual scrolling', { done(); }; - rowsView.scrollTo({ y: rowHeight * 6 }); + rowsView.scrollTo({ top: rowHeight * 6 }); }); QUnit.test('setViewportItemIndex for virtual scrolling when rowsView height defined and scrolling.timeout is defined', function(assert) { @@ -5967,8 +5967,8 @@ QUnit.module('Virtual scrolling', { this.clock = sinon.useFakeTimers(); // act - rowsView.scrollTo({ y: rowHeight * 5 }); - rowsView.scrollTo({ y: rowHeight * 6 }); + rowsView.scrollTo({ top: rowHeight * 5 }); + rowsView.scrollTo({ top: rowHeight * 6 }); this.clock.tick(5); @@ -6023,7 +6023,7 @@ QUnit.module('Virtual scrolling', { // act const itemSizes = dataController.getItemSizes(); const definedItemSizes = Object.keys(itemSizes).map(function(key) { return itemSizes[key]; }); - rowsView.scrollTo({ y: rowHeight * heightRatio * (9000000 - definedItemSizes.length) + definedItemSizes[0] * definedItemSizes.length }); + rowsView.scrollTo({ top: rowHeight * heightRatio * (9000000 - definedItemSizes.length) + definedItemSizes[0] * definedItemSizes.length }); }); // T154003 @@ -6069,7 +6069,7 @@ QUnit.module('Virtual scrolling', { }; // act - rowsView.scrollTo({ y: rowHeight * heightRatio * 7000000 + rowHeight * 3 }); + rowsView.scrollTo({ top: rowHeight * heightRatio * 7000000 + rowHeight * 3 }); }); QUnit.test('setViewportItemIndex for virtual scrolling when rowsView height auto and browser scroll used', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/scrolling.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/scrolling.integration.tests.js index 649c373c9a73..79eb42e48e3b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/scrolling.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/scrolling.integration.tests.js @@ -157,7 +157,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { const $scrollableContainer = $(scrollable.container()); // act - scrollable.scrollTo({ x: 50 }); + scrollable.scrollTo({ left: 50 }); $scrollableContainer.trigger('scroll'); this.clock.tick(500); @@ -246,7 +246,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { assert.equal(scrollable.scrollLeft(), 300, 'scroll position'); this.clock.restore(); - scrollable.scrollTo({ x: 100 }); + scrollable.scrollTo({ left: 100 }); const scrollRight = getRightScrollOffset(scrollable); @@ -380,7 +380,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 10000 }); + scrollable.scrollTo({ top: 10000 }); // assert assert.ok(scrollable.scrollTop() > 0, 'content is scrolled'); @@ -487,7 +487,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { // act $(dataGrid.getCellElement(0, 0)).trigger(pointerEvents.up); - dataGrid.getScrollable().scrollTo({ y: 200 }); + dataGrid.getScrollable().scrollTo({ top: 200 }); dataGrid.repaintRows(0); this.clock.tick(10); @@ -514,7 +514,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { const scrollable = dataGrid.getScrollable(); // act - scrollable.scrollTo({ x: 0, y: 50 }); + scrollable.scrollTo({ left: 0, top: 50 }); dataGrid.updateDimensions(); assert.equal(scrollable.scrollTop(), 50, 'scrollTop'); @@ -707,7 +707,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { this.clock.restore(); const scrollableInstance = dataGrid.getView('rowsView').getScrollable(); - scrollableInstance.scrollTo({ x: 150 }); + scrollableInstance.scrollTo({ left: 150 }); function scrollHandler() { scrollableInstance.off('scroll', scrollHandler); // act @@ -742,7 +742,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { }); const scrollableInstance = dataGrid.getView('rowsView').getScrollable(); - scrollableInstance.scrollTo({ x: 150 }); + scrollableInstance.scrollTo({ left: 150 }); function scrollHandler() { scrollableInstance.off('scroll', scrollHandler); @@ -795,7 +795,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { }); }); - scrollableInstance.scrollTo({ x: 400 }); + scrollableInstance.scrollTo({ left: 400 }); }); // T362355 diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.integration.tests.js index 06630d5c6be6..a37d364b9841 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/selection.integration.tests.js @@ -87,7 +87,7 @@ QUnit.module('Initialization', baseModuleConfig, () => { // act $(dataGrid.getRowElement(0)).trigger('dxclick'); - dataGrid.getScrollable().scrollTo({ y: 200 }); + dataGrid.getScrollable().scrollTo({ top: 200 }); $lastRowElement = $(dataGrid.getRowElement(4)); const offset = $lastRowElement.offset(); @@ -810,7 +810,7 @@ QUnit.module('Virtual row rendering', baseModuleConfig, () => { this.clock.tick(300); // act - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); $(dataGrid.getRowElement(0)).trigger('dxclick'); @@ -847,7 +847,7 @@ QUnit.module('Virtual row rendering', baseModuleConfig, () => { this.clock.tick(300); // act - dataGrid.getScrollable().scrollTo({ y: 440 }); + dataGrid.getScrollable().scrollTo({ top: 440 }); $(dataGrid.getRowElement(1)).trigger('dxclick'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/virtualScrolling.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/virtualScrolling.integration.tests.js index 8a5402f88cd9..5d5eeda6d5e0 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/virtualScrolling.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/virtualScrolling.integration.tests.js @@ -241,7 +241,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ x: 900 }); + scrollable.scrollTo({ left: 900 }); $(scrollable.container()).trigger('scroll'); this.clock.tick(10); @@ -384,7 +384,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // act dataController.toggleExpandAdaptiveDetailRow(1); - dataGrid.getScrollable().scrollTo({ y: 1450 }); + dataGrid.getScrollable().scrollTo({ top: 1450 }); dataController.toggleExpandAdaptiveDetailRow(28); @@ -463,7 +463,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { this.clock.tick(10); // act - dataGrid.getScrollable().scrollTo({ y: 1000 }); + dataGrid.getScrollable().scrollTo({ top: 1000 }); this.clock.tick(10); // assert @@ -526,7 +526,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { assert.strictEqual($cell.text(), `0-${colIndex}`, `Data cell text == 0-${colIndex}`); } - dataGrid.getScrollable().scrollTo({ x: 1000 }); + dataGrid.getScrollable().scrollTo({ left: 1000 }); this.clock.tick(10); // assert @@ -580,7 +580,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const columnOffset = 9; const fixedColumnCount = 2; - dataGrid.getScrollable().scrollTo({ x: 1000 }); + dataGrid.getScrollable().scrollTo({ left: 1000 }); this.clock.tick(10); // assert @@ -631,7 +631,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const $fixedCell = $(dataGrid.getCellElement(0, 0)); - dataGrid.getScrollable().scrollTo({ x: 1000 }); + dataGrid.getScrollable().scrollTo({ left: 1000 }); this.clock.tick(10); // assert @@ -666,7 +666,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // assert assert.equal(row.attr('aria-rowindex'), 1, 'aria-index is correct'); - rowsView.scrollTo({ y: scrollOffsetForRows(88) }); + rowsView.scrollTo({ top: scrollOffsetForRows(88) }); this.clock.tick(10); @@ -701,7 +701,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { this.clock.tick(300); // act - dataGrid.getScrollable().scrollTo({ y: 300 }); + dataGrid.getScrollable().scrollTo({ top: 300 }); this.clock.tick(300); @@ -768,7 +768,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { this.clock.tick(300); // act - dataGrid.getScrollable().scrollTo({ y: 300 }); + dataGrid.getScrollable().scrollTo({ top: 300 }); this.clock.tick(300); @@ -809,7 +809,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { this.clock.tick(500); // act - dataGrid.getScrollable().scrollTo({ y: scrollOffsetForRows(58) }); + dataGrid.getScrollable().scrollTo({ top: scrollOffsetForRows(58) }); // assert assert.equal(dataGrid.getScrollable().scrollTop(), scrollOffsetForRows(58), 'scrollTop is not reset'); @@ -1097,10 +1097,10 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const scrollable = dataGrid.getScrollable(); // act - scrollable.scrollTo({ y: scrollOffsetForRows(5) }); + scrollable.scrollTo({ top: scrollOffsetForRows(5) }); $(scrollable.container()).trigger('scroll'); this.clock.tick(200); - scrollable.scrollTo({ y: scrollOffsetForRows(8) }); + scrollable.scrollTo({ top: scrollOffsetForRows(8) }); $(scrollable.container()).trigger('scroll'); this.clock.tick(200); @@ -1158,11 +1158,11 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { assert.deepEqual(pageIndexesForLoad, [0]); assert.strictEqual(dataGrid.getVisibleRows().length, 16); - dataGrid.getScrollable().scrollTo({ y: 1 }); + dataGrid.getScrollable().scrollTo({ top: 1 }); this.clock.tick(200); - dataGrid.getScrollable().scrollTo({ y: scrollOffsetForRows(20) }); + dataGrid.getScrollable().scrollTo({ top: scrollOffsetForRows(20) }); this.clock.tick(10); - dataGrid.getScrollable().scrollTo({ y: scrollOffsetForRows(41) }); + dataGrid.getScrollable().scrollTo({ top: scrollOffsetForRows(41) }); this.clock.tick(200); // assert @@ -2492,7 +2492,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ x: 300 }); + scrollable.scrollTo({ left: 300 }); this.clock.tick(10); // assert @@ -2544,7 +2544,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const rowsView = instance.getView('rowsView'); const scrollable = instance.getScrollable(); - scrollable.scrollTo({ y: 1440 }); + scrollable.scrollTo({ top: 1440 }); this.clock.tick(300); // assert @@ -2739,7 +2739,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // assert assert.equal($row.attr('aria-rowindex'), 1, 'aria-index is correct'); - rowsView.scrollTo({ y: 3000 }); + rowsView.scrollTo({ top: 3000 }); this.clock.tick(10); @@ -2912,7 +2912,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // act for(let position = 700; position < 1600; position += 150) { - scrollable.scrollTo({ y: position }); + scrollable.scrollTo({ top: position }); this.clock.tick(50); } @@ -2963,7 +2963,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { that.clock.tick(1000); const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ y: 1 }); + scrollable.scrollTo({ top: 1 }); that.clock.tick(100); // assert @@ -2972,7 +2972,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // act for(let i = 1; i <= 5; i++) { - scrollable.scrollTo({ y: scrollStep * i }); + scrollable.scrollTo({ top: scrollStep * i }); that.clock.tick(10); } @@ -3050,7 +3050,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { for(let i = 1; i <= 10; i++) { // act - scrollable.scrollTo({ y: 200 * i }); + scrollable.scrollTo({ top: 200 * i }); const virtualRowHeight = getTopVirtualRowHeight(); @@ -6262,7 +6262,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const fixedColumnCount = 3; // act - dataGrid.getScrollable().scrollTo({ x: 10000 }); + dataGrid.getScrollable().scrollTo({ left: 10000 }); this.clock.tick(10); // assert @@ -6326,7 +6326,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const fixedColumnCount = 3; // act - dataGrid.getScrollable().scrollTo({ x: 10000 }); + dataGrid.getScrollable().scrollTo({ left: 10000 }); this.clock.tick(10); // assert @@ -6395,7 +6395,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const $fixedCell = $(dataGrid.getCellElement(0, 0)); // act - dataGrid.getScrollable().scrollTo({ x: 10000 }); + dataGrid.getScrollable().scrollTo({ left: 10000 }); this.clock.tick(10); // assert @@ -6456,7 +6456,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { // act const scrollable = dataGrid.getScrollable(); - scrollable.scrollTo({ x: 300 }); + scrollable.scrollTo({ left: 300 }); $(scrollable.container()).triggerHandler('scroll'); this.clock.tick(500); @@ -6526,7 +6526,7 @@ QUnit.module('Infinite Scrolling', baseModuleConfig, () => { // act $(dataGrid.getCellElement(0, 0)).trigger(pointerEvents.up); - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); this.clock.tick(10); // assert assert.ok(dataGrid.getScrollable().scrollTop() > 0, 'scrollTop is not reset'); @@ -6558,8 +6558,8 @@ QUnit.module('Infinite Scrolling', baseModuleConfig, () => { } }); - dataGrid.getScrollable().scrollTo({ y: scrollOffsetForRows(44) }); - dataGrid.getScrollable().scrollTo({ y: scrollOffsetForRows(88) }); + dataGrid.getScrollable().scrollTo({ top: scrollOffsetForRows(44) }); + dataGrid.getScrollable().scrollTo({ top: scrollOffsetForRows(88) }); // assert assert.strictEqual(dataGrid.getVisibleRows().length, 40); @@ -6601,7 +6601,7 @@ QUnit.module('Infinite Scrolling', baseModuleConfig, () => { }); // act - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); // assert assert.strictEqual(dataGrid.getVisibleRows().length, 20); @@ -6638,7 +6638,7 @@ QUnit.module('Infinite Scrolling', baseModuleConfig, () => { }); // act - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); // assert assert.strictEqual(dataGrid.getVisibleRows().length, 40); @@ -6677,7 +6677,7 @@ QUnit.module('Infinite Scrolling', baseModuleConfig, () => { }); error = true; - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); // assert assert.strictEqual(dataGrid.getVisibleRows().length, 20); @@ -6686,7 +6686,7 @@ QUnit.module('Infinite Scrolling', baseModuleConfig, () => { error = false; - dataGrid.getScrollable().scrollTo({ y: 10000 }); + dataGrid.getScrollable().scrollTo({ top: 10000 }); // assert assert.strictEqual(dataGrid.getVisibleRows().length, 10); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/fieldChooser.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/fieldChooser.tests.js index e383a3032ebd..804922452fd3 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/fieldChooser.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/fieldChooser.tests.js @@ -827,7 +827,7 @@ QUnit.module('dxPivotGridFieldChooser', { const scrollable = $('.dx-treeview-border-visible').find('.dx-scrollable').dxScrollable('instance'); // act - scrollable.scrollTo({ y: 30 }); + scrollable.scrollTo({ top: 30 }); dataSource.on.withArgs('changed').lastCall.args[1](); // assert @@ -865,7 +865,7 @@ QUnit.module('dxPivotGridFieldChooser', { const scrollable = $('.dx-treeview-border-visible').find('.dx-scrollable').dxScrollable('instance'); // act - scrollable.scrollTo({ y: 30 }); + scrollable.scrollTo({ top: 30 }); $('.dx-treeview-border-visible .dx-checkbox').eq(0).trigger('dxclick'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.tests.js index 6a44b088f3c5..85f838604a4e 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/pivotGrid.tests.js @@ -5191,7 +5191,7 @@ QUnit.module('Tests with real timer', {}, () => { pivotGrid.on('contentReady', function(e) { e.component.off('contentReady'); - pivotGrid._dataArea.scrollTo({ x: 600, y: 4000 }); + pivotGrid._dataArea.scrollTo({ left: 600, top: 4000 }); let contentReadyCount = 0; @@ -6133,7 +6133,7 @@ QUnit.module('headersArea', { area._getScrollable().update(); function assertFakeTable(scrollPos, expectedOffset, expectedVisibility) { - area.scrollTo(scrollPos); + area.scrollTo({ left: scrollPos }); const fakeTable = $('#pivotGrid').find('.dx-virtual-content > table').first(); assert.strictEqual(fakeTable.css('left'), expectedOffset + 'px', 'fake table offset when scroll position is ' + scrollPos); @@ -6258,7 +6258,7 @@ QUnit.module('Vertical headers', { area._getScrollable().update(); function assertFakeTable(scrollPos, expectedOffset, expectedVisibility) { - area.scrollTo(scrollPos); + area.scrollTo({ top: scrollPos }); const fakeTable = $('#pivotGrid').find('.dx-virtual-content > table').first(); assert.strictEqual(fakeTable.css('top'), expectedOffset + 'px', 'fake table offset when scroll position is ' + scrollPos); @@ -7529,7 +7529,7 @@ QUnit.module('Data area', () => { area._getScrollable().update(); function assertFakeTable(scrollPos, expectedOffset, expectedVisibility) { - area.scrollTo({ x: scrollPos, y: 0 }); + area.scrollTo({ left: scrollPos, top: 0 }); const fakeTable = $('#pivotGrid').find('.dx-virtual-content > table').first(); assert.strictEqual(fakeTable.css('left'), expectedOffset + 'px', 'fake table offset when scroll position is ' + scrollPos); @@ -7603,7 +7603,7 @@ QUnit.module('Data area', () => { area._getScrollable().update(); function assertFakeTable(scrollPos, expectedOffset, expectedVisibility) { - area.scrollTo({ x: scrollPos, y: 0 }); + area.scrollTo({ left: scrollPos, top: 0 }); const fakeTable = $('#pivotGrid').find('.dx-virtual-content > table').first(); assert.strictEqual(parseFloat(fakeTable[0].style.left), expectedOffset, 'fake table offset when scroll position is ' + scrollPos); @@ -7679,7 +7679,7 @@ QUnit.module('Data area', () => { area._getScrollable().update(); function assertFakeTable(scrollPos, expectedOffset, expectedVisibility) { - area.scrollTo({ x: 0, y: scrollPos }); + area.scrollTo({ left: 0, top: scrollPos }); const fakeTable = $('#pivotGrid').find('.dx-virtual-content > table').first(); assert.strictEqual(fakeTable.css('top'), expectedOffset + 'px', 'fake table offset when scroll position is ' + scrollPos); @@ -7755,7 +7755,7 @@ QUnit.module('Data area', () => { area.updateScrollableOptions({ direction: 'vertical' }); function assertFakeTable(scrollPos, expectedOffset, expectedVisibility) { - area.scrollTo({ x: 0, y: scrollPos }); + area.scrollTo({ left: 0, top: scrollPos }); const fakeTable = $('#pivotGrid').find('.dx-virtual-content > table').first(); assert.strictEqual(parseFloat(fakeTable[0].style.top), expectedOffset, 'fake table offset when scroll position is ' + scrollPos); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js index c892744b21b3..6f6ecba0dd30 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.editing.tests.js @@ -657,7 +657,7 @@ module('Integration: Appointment editing', { text: 'text', }; const workSpace = scheduler.instance.getWorkSpace(); - workSpace.getScrollable().scrollTo({ x: scrollLeft, y: scrollTop }); + workSpace.getScrollable().scrollTo({ left: scrollLeft, top: scrollTop }); await checkThatScrollToWasCalled(assert, scheduler, appointment); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js index a66f007f5ac8..64581ef55e82 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/appointment.week.based.views.tests.js @@ -297,7 +297,7 @@ module('Integration: Appointment Day, Week views', { }] }); - scheduler.instance.getWorkSpace().getScrollable().scrollTo({ y: 1000 }); + scheduler.instance.getWorkSpace().getScrollable().scrollTo({ top: 1000 }); return asyncAssert(assert, () => { const cellHeight = getOuterHeight(scheduler.instance.$element().find(`.${DATE_TABLE_CELL_CLASS}`).eq(0)); @@ -849,7 +849,7 @@ module('Integration: Appointment Day, Week views', { const $element = $(scheduler.instance.element()); const workspace = scheduler.instance.getWorkSpace(); - workspace.getScrollable().scrollTo({ y: 3000 }); + workspace.getScrollable().scrollTo({ top: 3000 }); const cellWidth = getOuterHeight($element.find(`.${DATE_TABLE_CELL_CLASS}`).eq(0)); const pointer = pointerMock($element.find('.dx-resizable-handle-bottom').eq(0)).start(); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js index fabbfb38418d..891ad92acbbf 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/dragAndDropAppointments.tests.js @@ -777,7 +777,7 @@ module('Common', commonModuleConfig, () => { }); const scrollable = scheduler.workSpace.getScrollable(); - scrollable.scrollTo({ y: 270 }); + scrollable.scrollTo({ top: 270 }); const $appointment = scheduler.appointments.find('Task 2').first(); const positionBeforeDrag = getAbsolutePosition($appointment); @@ -1204,8 +1204,8 @@ module('appointmentDragging customization', $.extend({}, { }; const scrollPos = { - x: 10000, - y: 0 + left: 10000, + top: 0 }; await testAppointmentDraggingFromSchedulerWithScroll(assert, this, dataSource, pointerMove, draggablePosition, schedulerPos, scrollPos); @@ -1256,8 +1256,8 @@ module('appointmentDragging customization', $.extend({}, { }; const scrollPos = { - x: 0, - y: 10000 + left: 0, + top: 10000 }; await testAppointmentDraggingFromSchedulerWithScroll(assert, this, dataSource, pointerMove, draggablePosition, schedulerPos, scrollPos); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js index 1bb8c4794187..45d96326ae2c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js @@ -1189,7 +1189,7 @@ module('Integration: Work space', { ...moduleConfig }, () => { const dateTableScrollable = scheduler.workSpace.getDateTableScrollable().dxScrollable('instance'); - dateTableScrollable.scrollTo({ y: 400 }); + dateTableScrollable.scrollTo({ top: 400 }); setTimeout(() => { assert.deepEqual(scheduler.option('selectedCellData'), selectedCells, 'Correct selected cells'); @@ -1225,7 +1225,7 @@ module('Integration: Work space', { ...moduleConfig }, () => { const dateTableScrollable = scheduler.workSpace.getDateTableScrollable().dxScrollable('instance'); - dateTableScrollable.scrollTo({ y: 400 }); + dateTableScrollable.scrollTo({ top: 400 }); setTimeout(() => { const keyboard = keyboardMock(instance.getWorkSpace().$element()); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.integration.tests.js index 237843c3c1e9..639f3f47984b 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.integration.tests.js @@ -448,7 +448,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: step.y }); + { top: step.y }); }); return promise; @@ -537,7 +537,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: option.y } + { top: option.y } ); }); @@ -618,7 +618,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: option.y } + { top: option.y } ); }); @@ -654,14 +654,14 @@ module('Virtual scrolling integration', () => { { showAllDayPanel: true, steps: [ { - offset: { x: 0, y: 0 }, + offset: { left: 0, top: 0 }, appointmentRects: [ { left: -9772, top: -9735, height: 532 }, { left: -9677, top: -9849, height: 38 } ] }, { - offset: { x: 0, y: 2300 }, + offset: { left: 0, top: 2300 }, appointmentRects: [ { left: -9773, top: -10147, height: 912 } ] @@ -671,14 +671,14 @@ module('Virtual scrolling integration', () => { showAllDayPanel: false, steps: [ { - offset: { x: 0, y: 0 }, + offset: { left: 0, top: 0 }, appointmentRects: [ { left: -9773, top: -9784, height: 570 }, { left: -9677, top: -9898, height: 38 } ] }, { - offset: { x: 0, y: 2300 }, + offset: { left: 0, top: 2300 }, appointmentRects: [ { left: -9773, top: -10146, height: 912 } ] @@ -737,7 +737,7 @@ module('Virtual scrolling integration', () => { assert.equal( appointmentCount, appointmentRects.length, - `Appointment count is correct if scrollX: ${offset.x}, scrollY: ${offset.y}` + `Appointment count is correct if scrollX: ${offset.left}, scrollY: ${offset.top}` ); appointmentRects.forEach((expectedRect, index) => { @@ -889,34 +889,34 @@ module('Virtual scrolling integration', () => { { showAllDayPanel: true, steps: [{ - offset: { x: 0, y: 0 }, + offset: { left: 0, top: 0 }, appointmentRects: [ { left: -9891.5, top: -9723, height: 570 }, { left: -9816.5, top: -9837, height: 38 }, ] }, { - offset: { x: 0, y: 1000 }, + offset: { left: 0, top: 1000 }, appointmentRects: [ { left: -9891.5, top: -10077, height: 912 }, ] }, { - offset: { x: 0, y: 2200 }, + offset: { left: 0, top: 2200 }, appointmentRects: [ { left: -9891.5, top: -10185, height: 684 }, ] }, { - offset: { x: 520, y: 0 }, + offset: { left: 520, top: 0 }, appointmentRects: [ { left: -9886.5, top: -9723, height: 570 }, { left: -9811.5, top: -9837, height: 38 }, ] }, { - offset: { x: 520, y: 1000 }, + offset: { left: 520, top: 1000 }, appointmentRects: [ { left: -9886.5, top: -10077, height: 912 }, ] }, { - offset: { x: 520, y: 2200 }, + offset: { left: 520, top: 2200 }, appointmentRects: [ { left: -9886.5, top: -10185, height: 684 }, ] @@ -924,34 +924,34 @@ module('Virtual scrolling integration', () => { }, { showAllDayPanel: false, steps: [{ - offset: { x: 0, y: 0 }, + offset: { left: 0, top: 0 }, appointmentRects: [ { left: -9891.5, top: -9754, height: 570 }, { left: -9816.5, top: -9868, height: 38 }, ] }, { - offset: { x: 0, y: 1000 }, + offset: { left: 0, top: 1000 }, appointmentRects: [ { left: -9891.5, top: -10108, height: 912 }, ] }, { - offset: { x: 0, y: 2200 }, + offset: { left: 0, top: 2200 }, appointmentRects: [ { left: -9891.5, top: -10185, height: 684 }, ] }, { - offset: { x: 520, y: 0 }, + offset: { left: 520, top: 0 }, appointmentRects: [ { left: -9886.5, top: -9754, height: 570 }, { left: -9811.5, top: -9868, height: 38 }, ] }, { - offset: { x: 520, y: 1000 }, + offset: { left: 520, top: 1000 }, appointmentRects: [ { left: -9886.5, top: -10108, height: 912 }, ] }, { - offset: { x: 520, y: 2200 }, + offset: { left: 520, top: 2200 }, appointmentRects: [ { left: -9886.5, top: -10185, height: 684 }, ] @@ -1003,7 +1003,7 @@ module('Virtual scrolling integration', () => { assert.equal( this.scheduler.appointments.getAppointmentCount(), appointmentRects.length, - `Appointment count is correct if scrollX: ${offset.x}, scrollY: ${offset.y}` + `Appointment count is correct if scrollX: ${offset.left}, scrollY: ${offset.top}` ); appointmentRects.forEach((expectedRect, index) => { @@ -1060,37 +1060,37 @@ module('Virtual scrolling integration', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0, y: 0 }, + offset: { left: 0, top: 0 }, appointmentRects: [ { left: -9891.5, top: -9723, height: 570 } ] }, { - offset: { x: 0, y: 1000 }, + offset: { left: 0, top: 1000 }, appointmentRects: [ { left: -9891.5, top: -10077, height: 912 } ] }, { - offset: { x: 0, y: 2100 }, + offset: { left: 0, top: 2100 }, appointmentRects: [ { left: -9891.5, top: -10185, height: 570 } ] }, { - offset: { x: 520, y: 0 }, + offset: { left: 520, top: 0 }, appointmentRects: [ { left: -9886.5, top: -9723, height: 570 } ] }, { - offset: { x: 520, y: 1000 }, + offset: { left: 520, top: 1000 }, appointmentRects: [ { left: -9886.5, top: -10077, height: 912 } ] }, { - offset: { x: 520, y: 2100 }, + offset: { left: 520, top: 2100 }, appointmentRects: [ { left: -9886.5, top: -10185, height: 570 } ] @@ -1103,7 +1103,7 @@ module('Virtual scrolling integration', () => { assert.equal( appointmentRects.length, this.scheduler.appointments.getAppointmentCount(), - `Appointment count is correct when offsetX: ${offset.x}, offsetY: ${offset.y}` + `Appointment count is correct when offsetX: ${offset.left}, offsetY: ${offset.top}` ); appointmentRects.forEach((expectedRect, index) => { @@ -1274,7 +1274,7 @@ module('Virtual scrolling integration', () => { return asyncWrapper(assert, (promise) => { [ { - offset: { y: 0 }, + offset: { top: 0 }, expectedSettings: [ { groupIndex: 0, @@ -1283,7 +1283,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { y: 2000 }, + offset: { top: 2000 }, expectedSettings: [ { groupIndex: 0, @@ -1292,7 +1292,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { y: 4000 }, + offset: { top: 4000 }, expectedSettings: [] }, ].forEach(({ offset, expectedSettings }) => { @@ -1307,7 +1307,7 @@ module('Virtual scrolling integration', () => { const items = instance.getAppointmentsInstance().option('items').filter((item) => item.groupIndex === groupIndex).sort(); assert.equal(items.length, topPositions.length, 'Settings amount is correct'); topPositions.forEach((top, index) => { - assert.equal(items[index].top, top, `Appointment top position "${top}" is correct for offsetY: ${offset.y}`); + assert.equal(items[index].top, top, `Appointment top position "${top}" is correct for offsetY: ${offset.top}`); }); }); }, @@ -1554,7 +1554,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: offsetY } + { top: offsetY } ); }); @@ -1603,7 +1603,7 @@ module('Virtual scrolling integration', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, appointmentRects: [ { left: -9859, top: -9869, height: 25, width: 75 }, { left: -9784, top: -9869, height: 25, width: 75 }, @@ -1616,7 +1616,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 500 }, + offset: { left: 500 }, appointmentRects: [ { left: -10359, top: -9869, height: 25, width: 75 }, { left: -10284, top: -9869, height: 25, width: 75 }, @@ -1633,7 +1633,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 1000 }, + offset: { left: 1000 }, appointmentRects: [ { left: -9809, top: -9869, height: 25, width: 75 }, { left: -9734, top: -9869, height: 25, width: 75 }, @@ -1645,7 +1645,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 1500 }, + offset: { left: 1500 }, appointmentRects: [ { left: -10309, top: -9869, height: 25, width: 75 }, { left: -10234, top: -9869, height: 25, width: 75 }, @@ -1662,7 +1662,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 2000 }, + offset: { left: 2000 }, appointmentRects: [ { left: -9759, top: -9869, height: 25, width: 75 }, { left: -9684, top: -9869, height: 25, width: 75 }, @@ -1673,7 +1673,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 4200 }, + offset: { left: 4200 }, appointmentRects: [ { left: -9859, top: -9869, height: 25, width: 75 }, { left: -9784, top: -9869, height: 25, width: 75 }, @@ -1684,7 +1684,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 5700 }, + offset: { left: 5700 }, appointmentRects: [ { left: -9784, top: -9869, height: 25, width: 75 }, { left: -9709, top: -9869, height: 25, width: 75 }, @@ -1695,7 +1695,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 7000 }, + offset: { left: 7000 }, appointmentRects: [] } ].forEach(({ offset, appointmentRects }) => { @@ -1706,7 +1706,7 @@ module('Virtual scrolling integration', () => { assert.equal( appointmentRects.length, this.scheduler.appointments.getAppointmentCount(), - `Appointment count is correct when offsetX: ${offset.x}` + `Appointment count is correct when offsetX: ${offset.left}` ); appointmentRects.forEach((expectedRect, index) => { @@ -1839,7 +1839,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: offsetY } + { top: offsetY } ); }); @@ -2164,7 +2164,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: option.offsetY } + { top: option.offsetY } ); }); @@ -2250,11 +2250,11 @@ module('Virtual scrolling integration', () => { return asyncWrapper(assert, promise => { [ - { offset: { y: 0 }, expectedIndices: [0, 1, 2] }, - { offset: { y: 300 }, expectedIndices: [1, 2] }, - { offset: { y: 900 }, expectedIndices: [3, 5, 4] }, - { offset: { y: 1700 }, expectedIndices: [5, 4] }, - { offset: { y: 2400 }, expectedIndices: [5, 4] } + { offset: { top: 0 }, expectedIndices: [0, 1, 2] }, + { offset: { top: 300 }, expectedIndices: [1, 2] }, + { offset: { top: 900 }, expectedIndices: [3, 5, 4] }, + { offset: { top: 1700 }, expectedIndices: [5, 4] }, + { offset: { top: 2400 }, expectedIndices: [5, 4] } ].forEach(({ offset, expectedIndices }) => { const scrollable = instance.getWorkSpaceScrollable(); @@ -2310,7 +2310,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: option.y } + { top: option.y } ); }); @@ -2363,7 +2363,7 @@ module('Virtual scrolling integration', () => { }); }, scrollable, - { y: option.y } + { top: option.y } ); }); @@ -2414,7 +2414,7 @@ module('Virtual scrolling integration', () => { ); }, scrollable, - { y: scrollY } + { top: scrollY } ); }); @@ -2463,7 +2463,7 @@ module('Virtual scrolling integration', () => { assert.deepEqual(items[0].itemData, data[0], 'Filtered item is correct'); }, scrollable, - { y: 600 } + { top: 600 } ); }); }); @@ -2599,7 +2599,7 @@ module('Virtual scrolling integration', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0, y: 0 }, + offset: { left: 0, top: 0 }, expectedIndices: [0, 2], appointmentRects: [ { left: -9934, top: -9890, height: 38 }, @@ -2607,7 +2607,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 300, y: 0 }, + offset: { left: 300, top: 0 }, expectedIndices: [0, 2], appointmentRects: [ { left: -10234, top: -9890, height: 38 }, @@ -2615,12 +2615,12 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 900, y: 0 }, + offset: { left: 900, top: 0 }, expectedIndices: [], appointmentRects: [] }, { - offset: { x: 0, y: 1100 }, + offset: { left: 0, top: 1100 }, expectedIndices: [1, 3], appointmentRects: [ { left: -9734, top: -10116, height: 38 }, @@ -2628,7 +2628,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 300, y: 1100 }, + offset: { left: 300, top: 1100 }, expectedIndices: [1, 3, 4], appointmentRects: [ { left: -10034, top: -10116, height: 38 }, @@ -2637,7 +2637,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 1700, y: 1100 }, + offset: { left: 1700, top: 1100 }, expectedIndices: [7, 8, 9, 10], appointmentRects: [ { left: -10201, top: -10002, height: 646 }, @@ -2654,7 +2654,7 @@ module('Virtual scrolling integration', () => { promise, () => { - assert.ok(true, `Scroll to x: ${offset.x}, y: ${offset.y}`); + assert.ok(true, `Scroll to left: ${offset.left}, top: ${offset.top}`); const items = this.instance.getAppointmentsInstance().option('items'); @@ -2727,7 +2727,7 @@ module('Virtual scrolling integration', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, appointmentRects: [ { left: -9859, top: -9799, height: 152 }, { left: -9784, top: -9799, height: 152 }, @@ -2738,7 +2738,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 300 }, + offset: { left: 300 }, appointmentRects: [ { left: -10159, top: -9799, height: 152 }, { left: -10084, top: -9799, height: 152 }, @@ -2750,7 +2750,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 1100 }, + offset: { left: 1100 }, appointmentRects: [ { left: -9909, top: -9799, height: 152 }, { left: -9834, top: -9799, height: 152 }, @@ -2761,7 +2761,7 @@ module('Virtual scrolling integration', () => { ] }, { - offset: { x: 2100 }, + offset: { left: 2100 }, appointmentRects: [ { left: -9851, top: -9799, height: 152 }, { left: -9776, top: -9799, height: 152 }, @@ -2779,7 +2779,7 @@ module('Virtual scrolling integration', () => { promise, () => { - assert.ok(true, `Scroll to x: ${offset.x}`); + assert.ok(true, `Scroll to left: ${offset.left}`); assert.equal( scheduler.appointments.getAppointmentCount(), @@ -2978,7 +2978,7 @@ module('Virtual scrolling integration', () => { assert.equal(appointmentsItems[0].itemData, dataSourceItems[1], 'Item is correct'); }, scrollable, - { y: 1000 } + { top: 1000 } ) ); }); @@ -2992,7 +2992,7 @@ module('Virtual scrolling integration', () => { humanId: 18 }, groupByDate: false, - scrollCoordinates: { x: 9500 }, + scrollCoordinates: { left: 9500 }, expectedAppointmentCount: 1 }, { @@ -3003,7 +3003,7 @@ module('Virtual scrolling integration', () => { humanId: 0 }, groupByDate: false, - scrollCoordinates: { x: 9500 }, + scrollCoordinates: { left: 9500 }, expectedAppointmentCount: 0 }, { @@ -3014,7 +3014,7 @@ module('Virtual scrolling integration', () => { humanId: 18 }, groupByDate: true, - scrollCoordinates: { x: 3000 }, + scrollCoordinates: { left: 3000 }, expectedAppointmentCount: 1 } ].forEach(({ appointment, groupByDate, scrollCoordinates, expectedAppointmentCount }) => { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.monthView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.monthView.tests.js index bdd0f99a65d2..05b30d4d04c1 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.monthView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.monthView.tests.js @@ -22,8 +22,8 @@ const test = (description, callback) => { return testFunc(description, callback); }; const printOffset = offset => [ - offset.x >= 0 ? `offset.x: ${offset.x}` : '', - offset.y >= 0 ? `offset.y: ${offset.y}` : '' + offset.left >= 0 ? `offset.left: ${offset.left}` : '', + offset.top >= 0 ? `offset.top: ${offset.top}` : '' ].join(','); testStart(() => initTestMarkup()); @@ -68,7 +68,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [{ left: -9999, top: -9859, @@ -76,7 +76,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 1050 }, + offset: { left: 1050 }, expectedRects: [{ left: -9999, top: -9859, @@ -84,7 +84,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 2100 }, + offset: { left: 2100 }, expectedRects: [{ left: -10371, top: -9859, @@ -161,7 +161,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { y: 0 }, + offset: { top: 0 }, expectedRects: [{ left: -9934, top: -9889, @@ -169,7 +169,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 900 }, + offset: { top: 900 }, expectedRects: [{ left: -9934, top: -9589, @@ -177,7 +177,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 1800 }, + offset: { top: 1800 }, expectedRects: [] } ].forEach(({ offset, expectedRects }) => { @@ -251,7 +251,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [{ left: -9924, top: -9859, @@ -271,7 +271,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 700 }, + offset: { left: 700 }, expectedRects: [{ left: -10324, top: -9859, @@ -307,7 +307,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 1050 }, + offset: { left: 1050 }, expectedRects: [{ left: -9924, top: -9859, @@ -327,7 +327,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 1400 }, + offset: { left: 1400 }, expectedRects: [{ left: -10274, top: -9859, @@ -417,7 +417,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { y: 0 }, + offset: { top: 0 }, expectedRects: [{ left: -9693, top: -9689, @@ -437,7 +437,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 350 }, + offset: { top: 350 }, expectedRects: [{ left: -9693, top: -10039, @@ -457,7 +457,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 1000 }, + offset: { top: 1000 }, expectedRects: [{ left: -9693, top: -9489, @@ -636,7 +636,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [{ left: -9924, top: -9859, @@ -652,7 +652,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 1050 }, + offset: { left: 1050 }, expectedRects: [{ left: -9924, top: -9859, @@ -668,7 +668,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 2100 }, + offset: { left: 2100 }, expectedRects: [] } ].forEach(({ offset, expectedRects }) => { @@ -743,7 +743,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { y: 0 }, + offset: { top: 0 }, expectedRects: [{ left: -9859, top: -9889, @@ -759,7 +759,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 900 }, + offset: { top: 900 }, expectedRects: [{ left: -9859, top: -9589, @@ -845,7 +845,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [{ left: -9924, top: -9859, @@ -865,7 +865,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 1050 }, + offset: { left: 1050 }, expectedRects: [{ left: -9924, top: -9859, @@ -885,7 +885,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { x: 1300 }, + offset: { left: 1300 }, expectedRects: [{ left: -10174, top: -9859, @@ -976,7 +976,7 @@ module('Virtual scrolling Month View', () => { return asyncWrapper(assert, promise => { [ { - offset: { y: 0 }, + offset: { top: 0 }, expectedRects: [{ left: -9853, top: -9889, @@ -996,7 +996,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 900 }, + offset: { top: 900 }, expectedRects: [{ left: -9853, top: -9589, @@ -1016,7 +1016,7 @@ module('Virtual scrolling Month View', () => { }] }, { - offset: { y: 1100 }, + offset: { top: 1100 }, expectedRects: [{ left: -9853, top: -9789, diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.timeline.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.timeline.tests.js index 95b04225a683..4f1e6247e841 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.timeline.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/virtual_scrolling.timeline.tests.js @@ -21,8 +21,8 @@ const test = (description, callback) => { return testFunc(description, callback); }; const printOffset = offset => [ - offset.x >= 0 ? `offset.x: ${offset.x}` : '', - offset.y >= 0 ? `offset.y: ${offset.y}` : '' + offset.left >= 0 ? `offset.left: ${offset.left}` : '', + offset.top >= 0 ? `offset.top: ${offset.top}` : '' ].join(','); testStart(() => initTestMarkup()); @@ -62,11 +62,11 @@ module('Virtual scrolling timelines', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [] }, { - offset: { x: 2200 }, + offset: { left: 2200 }, expectedRects: [{ left: -9099, top: -9833, @@ -74,7 +74,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 3200 }, + offset: { left: 3200 }, expectedRects: [{ left: -10099, top: -9833, @@ -82,7 +82,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 4200 }, + offset: { left: 4200 }, expectedRects: [{ left: -10399, top: -9833, @@ -90,7 +90,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 5200 }, + offset: { left: 5200 }, expectedRects: [{ left: -10399, top: -9833, @@ -98,7 +98,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 6200 }, + offset: { left: 6200 }, expectedRects: [] }, ].forEach(({ offset, expectedRects }) => { @@ -203,11 +203,11 @@ module('Virtual scrolling timelines', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [] }, { - offset: { x: 5200 }, + offset: { left: 5200 }, expectedRects: [{ left: -9099, top: -9525, @@ -215,7 +215,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 6200 }, + offset: { left: 6200 }, expectedRects: [{ left: -8899, top: -9679, @@ -227,7 +227,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 7200 }, + offset: { left: 7200 }, expectedRects: [{ left: -9899, top: -9679, @@ -239,7 +239,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 8200 }, + offset: { left: 8200 }, expectedRects: [{ left: -10299, top: -9679, @@ -247,7 +247,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 9200 }, + offset: { left: 9200 }, expectedRects: [{ left: -10299, top: -9679, @@ -259,7 +259,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 10200 }, + offset: { left: 10200 }, expectedRects: [{ left: -10299, top: -9525, @@ -267,7 +267,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 12000 }, + offset: { left: 12000 }, expectedRects: [{ left: -9899, top: -9833, @@ -283,7 +283,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 13000 }, + offset: { left: 13000 }, expectedRects: [{ left: -10299, top: -9833, @@ -299,7 +299,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 14000 }, + offset: { left: 14000 }, expectedRects: [{ left: -10299, top: -9833, @@ -315,7 +315,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 15000 }, + offset: { left: 15000 }, expectedRects: [{ left: -10299, top: -9833, @@ -331,7 +331,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 17000 }, + offset: { left: 17000 }, expectedRects: [{ left: -10299, top: -9833, @@ -347,7 +347,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 17500 }, + offset: { left: 17500 }, expectedRects: [{ left: -10399, top: -9833, @@ -363,7 +363,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 18000 }, + offset: { left: 18000 }, expectedRects: [{ left: -10299, top: -9833, @@ -379,7 +379,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 19000 }, + offset: { left: 19000 }, expectedRects: [{ left: -10299, top: -9525, @@ -387,7 +387,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 20000 }, + offset: { left: 20000 }, expectedRects: [{ left: -10299, top: -9525, @@ -395,7 +395,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 20500 }, + offset: { left: 20500 }, expectedRects: [{ left: -10399, top: -9525, @@ -403,7 +403,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 20800 }, + offset: { left: 20800 }, expectedRects: [{ left: -10299, top: -9525, @@ -411,7 +411,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 21200 }, + offset: { left: 21200 }, expectedRects: [] } ].forEach(({ offset, expectedRects }) => { @@ -484,7 +484,7 @@ module('Virtual scrolling timelines', () => { return asyncWrapper(assert, promise => { [ { - offset: { x: 0 }, + offset: { left: 0 }, expectedRects: [{ left: -9899, top: -9609, @@ -492,7 +492,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 10000 }, + offset: { left: 10000 }, expectedRects: [{ left: -10299, top: -9609, @@ -500,7 +500,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 20000 }, + offset: { left: 20000 }, expectedRects: [{ left: -10299, top: -9609, @@ -508,7 +508,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 21700 }, + offset: { left: 21700 }, expectedRects: [{ left: -10399, top: -9609, @@ -516,7 +516,7 @@ module('Virtual scrolling timelines', () => { }] }, { - offset: { x: 23000 }, + offset: { left: 23000 }, expectedRects: [] } ].forEach(({ offset, expectedRects }) => { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/treeList.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/treeList.tests.js index 07790d7005d3..d3e41d46ed3a 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/treeList.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/treeList.tests.js @@ -1248,7 +1248,7 @@ QUnit.module('Expand/Collapse rows', () => { const isNativeScrolling = devices.real().deviceType !== 'desktop' || devices.real().mac; try { - scrollable.scrollTo({ y: 300 }); // scroll to the last page + scrollable.scrollTo({ top: 300 }); // scroll to the last page isNativeScrolling && $(scrollable.container()).trigger('scroll'); clock.tick(10); @@ -1286,7 +1286,7 @@ QUnit.module('Expand/Collapse rows', () => { dataSource: generateData(100) }); - treeList.getScrollable().scrollTo({ y: 1000 }); + treeList.getScrollable().scrollTo({ top: 1000 }); setTimeout(function() { // act @@ -1993,8 +1993,8 @@ QUnit.module('Scroll', defaultModuleConfig, () => { const scrollable = treeList.getScrollable(); // act - scrollable.scrollTo({ y: 200 }); - scrollable.scrollTo({ y: 500 }); + scrollable.scrollTo({ top: 200 }); + scrollable.scrollTo({ top: 500 }); setTimeout(function() { // assert @@ -2099,7 +2099,7 @@ QUnit.module('Scroll', defaultModuleConfig, () => { this.clock.tick(100); // act - treeList.getScrollable().scrollTo({ y: 10 }); + treeList.getScrollable().scrollTo({ top: 10 }); this.clock.tick(100); treeList.expandRow(2); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/virtualScrolling.integration.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/virtualScrolling.integration.tests.js index 1afee373e326..73c1bdc549ab 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/virtualScrolling.integration.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.treeList/virtualScrolling.integration.tests.js @@ -143,7 +143,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const $scrollableContainer = $(scrollable.container()); // act - scrollable.scrollTo({ y: 10000 }); + scrollable.scrollTo({ top: 10000 }); $scrollableContainer.trigger('scroll'); this.clock.tick(1000); @@ -201,9 +201,9 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { const $scrollableContainer = $(scrollable.container()); // act - scrollable.scrollTo({ y: 350 }); - scrollable.scrollTo({ y: 400 }); - scrollable.scrollTo({ y: 10000 }); + scrollable.scrollTo({ top: 350 }); + scrollable.scrollTo({ top: 400 }); + scrollable.scrollTo({ top: 10000 }); setTimeout(() => { // assert diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js index 00924c6b2859..bb43f3af0049 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollView.tests.js @@ -923,7 +923,7 @@ QUnit.module('dynamic', moduleConfig, () => { onReachBottom: function() { count++; scrollView.release(false); - scrollView.scrollTo({ x: 0, y: 250 }); + scrollView.scrollTo({ left: 0, top: 250 }); if(count > 1) { assert.ok(true); @@ -934,7 +934,7 @@ QUnit.module('dynamic', moduleConfig, () => { const scrollView = $scrollView.dxScrollView('instance'); scrollView.toggleLoading(true); - scrollView.scrollTo({ x: 0, y: 220 }); + scrollView.scrollTo({ left: 0, top: 220 }); }); QUnit.test('onReachBottom should not be called when scroll delta is 0', function(assert) { @@ -955,7 +955,7 @@ QUnit.module('dynamic', moduleConfig, () => { }); const scrollView = $scrollView.dxScrollView('instance'); - scrollView.scrollTo({ x: 0, y: 150 }); + scrollView.scrollTo({ left: 0, top: 150 }); $(scrollView.content()).trigger('scroll'); }); @@ -1708,11 +1708,11 @@ QUnit.module('native pullDown strategy', { const scrollView = $('#scrollView').dxScrollView('instance'); const $container = $('.' + SCROLLABLE_CONTAINER_CLASS, $scrollView); - scrollView.scrollTo({ y: 10 }); + scrollView.scrollTo({ top: 10 }); $($container).trigger('scroll'); assert.equal(scrollView.scrollTop(), 10, 'correct scroll position'); - scrollView.scrollTo({ y: 0 }); + scrollView.scrollTo({ top: 0 }); $($container).trigger('scroll'); assert.equal(scrollView.scrollTop(), 0, 'correct scroll position'); }); @@ -1730,13 +1730,13 @@ QUnit.module('native pullDown strategy', { const $pullDownText = $scrollView.find('.' + SCROLLVIEW_PULLDOWN_TEXT_CLASS); const topPocketHeight = $topPocket.height(); - scrollView.scrollTo({ y: -topPocketHeight }); + scrollView.scrollTo({ top: -topPocketHeight }); $($container).trigger('scroll'); assert.equal($topPocket.children().eq(0).hasClass(SCROLLVIEW_PULLDOWN_READY_CLASS), true, 'scrollview-pull-down-ready class added'); assert.equal($pullDownText.children().eq(1).css('opacity'), 1, 'pullDown ready text'); - scrollView.scrollTo({ y: -topPocketHeight + 1 }); + scrollView.scrollTo({ top: -topPocketHeight + 1 }); $($container).trigger('scroll'); assert.equal($topPocket.children().eq(0).hasClass(SCROLLVIEW_PULLDOWN_READY_CLASS), false, 'scrollview-pull-down-ready class removed'); assert.equal($pullDownText.children().eq(0).css('opacity'), 1, 'pullDown to refresh text'); @@ -1879,14 +1879,14 @@ QUnit.module('native pullDown strategy', { $($container).trigger('scroll'); checkLastScrollEvent(); - scrollView.scrollTo({ x: 1, y: 1 }); + scrollView.scrollTo({ left: 1, top: 1 }); top = false; left = false; $($container).trigger('scroll'); checkLastScrollEvent(); scrollView.scrollTo({ - x: $container.prop('scrollWidth') - $container.prop('clientWidth'), - y: $container.prop('scrollHeight') - $container.prop('clientHeight') + left: $container.prop('scrollWidth') - $container.prop('clientWidth'), + top: $container.prop('scrollHeight') - $container.prop('clientHeight') }); right = true; bottom = true; $($container).trigger('scroll'); @@ -2009,7 +2009,7 @@ QUnit.module('native swipeDown strategy', { const $container = $scrollView.find('.' + SCROLLABLE_CONTAINER_CLASS); pointerMock($container).start().down().move(0, -500).up(); - $scrollView.dxScrollView('scrollTo', { y: 500 }); + $scrollView.dxScrollView('scrollTo', { top: 500 }); $($container).trigger('scroll'); this.clock.tick(400); @@ -2193,14 +2193,14 @@ QUnit.module('native swipeDown strategy', { $($container).trigger('scroll'); checkLastScrollEvent(); - scrollView.scrollTo({ x: 1, y: 1 }); + scrollView.scrollTo({ left: 1, top: 1 }); top = false; left = false; $($container).trigger('scroll'); checkLastScrollEvent(); scrollView.scrollTo({ - x: $container.prop('scrollWidth') - $container.prop('clientWidth'), - y: $container.prop('scrollHeight') - $container.prop('clientHeight') + left: $container.prop('scrollWidth') - $container.prop('clientWidth'), + top: $container.prop('scrollHeight') - $container.prop('clientHeight') }); right = true; bottom = true; $($container).trigger('scroll'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.api.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.api.tests.js index 7069c52b59a9..8ccf3697ecb2 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.api.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.api.tests.js @@ -132,29 +132,6 @@ QUnit.test('scroll event should be triggered if scroll position changed', functi assert.equal(location.left, -distance, 'scroll to correctly horizontal position'); } }); - - QUnit.test(`scrollBy with plain object: { x: value; y: value}, useNative: ${useNative}`, function(assert) { - assert.expect(2); - - const distance = 10; - const $scrollable = $('#scrollable').dxScrollable({ - useNative, - onEnd: function() { - const location = getScrollOffset($scrollable); - assert.equal(location.top, -distance, 'scroll to correctly vertical position'); - assert.equal(location.left, 0, 'scroll to correctly horizontal position'); - } - }); - const scrollable = $scrollable.dxScrollable('instance'); - - scrollable.scrollBy({ x: distance, y: distance }); - - if(useNative) { - const location = getScrollOffset($scrollable); - assert.equal(location.top, -distance, 'scroll to correctly vertical position'); - assert.equal(location.left, -distance, 'scroll to correctly horizontal position'); - } - }); }); QUnit.test('scrollBy with numeric', function(assert) { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js index 780a1d32e7c2..24d8461b42df 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/sortable.tests.js @@ -2855,7 +2855,7 @@ QUnit.module('With scroll', getModuleConfigForTestsWithScroll('#itemsWithScroll' }); // act - scrollView.scrollTo({ y: 100 }); + scrollView.scrollTo({ top: 100 }); this.clock.tick(10); // assert @@ -2866,7 +2866,7 @@ QUnit.module('With scroll', getModuleConfigForTestsWithScroll('#itemsWithScroll' const pointer = pointerMock(items.last()).start().down().move(0, -200); this.clock.tick(10); - scrollView.scrollTo({ y: 0 }); + scrollView.scrollTo({ top: 0 }); $(scrollView.content()).trigger('scroll'); this.clock.tick(10); @@ -2913,7 +2913,7 @@ QUnit.module('With scroll', getModuleConfigForTestsWithScroll('#itemsWithScroll' const pointer = pointerMock(items.first()).start().down().move(0, 200); this.clock.tick(10); - scrollView.scrollTo({ y: 100 }); + scrollView.scrollTo({ top: 100 }); this.clock.tick(100); pointer.move(0, 40); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.markup.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.markup.tests.js index 2a0667b81b47..cf40cac0909c 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.markup.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.markup.tests.js @@ -69,7 +69,7 @@ const configs = { position: 'top', ratio: 'heightRatio' }, - scrollByProp: 'x' + scrollByProp: 'left' }, 'vertical': { main: { @@ -80,7 +80,7 @@ const configs = { position: 'left', ratio: 'widthRatio' }, - scrollByProp: 'y' + scrollByProp: 'top' } }; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.tests.js index 0384890fb859..28c72ba484e9 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/tileView.tests.js @@ -75,7 +75,7 @@ const configs = { position: 'top', ratio: 'heightRatio' }, - scrollByProp: 'x' + scrollByProp: 'left' }, 'vertical': { main: { @@ -86,7 +86,7 @@ const configs = { position: 'left', ratio: 'widthRatio' }, - scrollByProp: 'y' + scrollByProp: 'top' } }; diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeViewParts/focusing.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeViewParts/focusing.js index c0501aba6394..5c2d73d81185 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeViewParts/focusing.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/treeViewParts/focusing.js @@ -194,11 +194,11 @@ QUnit.test('Scroll should not jump down when focusing on item (T492496)', functi const clock = sinon.useFakeTimers(); try { - scrollable.scrollTo({ y: 56 }); + scrollable.scrollTo({ top: 56 }); $items.last().trigger('dxpointerdown'); assert.equal(scrollable.scrollTop(), 56, 'scroll top position'); - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); $treeView.trigger('focusin'); assert.equal(scrollable.scrollTop(), 0, 'scroll top position'); @@ -247,11 +247,11 @@ QUnit.test('Scroll should not jump down when focusing on Select All (T517945)', const clock = sinon.useFakeTimers(); try { - scrollable.scrollTo({ y: 99 }); + scrollable.scrollTo({ top: 99 }); $lastItem.trigger('dxpointerdown'); assert.equal(scrollable.scrollTop(), 99, 'scroll top position'); - scrollable.scrollTo({ y: 0 }); + scrollable.scrollTo({ top: 0 }); assert.equal(scrollable.scrollTop(), 0, 'scroll top position'); $treeView.trigger('focusin'); diff --git a/packages/testcafe-models/dataGrid/index.ts b/packages/testcafe-models/dataGrid/index.ts index 1b15c448712b..db327feb1e35 100644 --- a/packages/testcafe-models/dataGrid/index.ts +++ b/packages/testcafe-models/dataGrid/index.ts @@ -372,7 +372,7 @@ export default class DataGrid extends GridCore { async scrollTo( t: TestController, - options: { x?: number; y?: number; top?: number }, + options: { top?: number; left?: number }, ): Promise { await t.expect(this.hasScrollable()).ok(); @@ -404,8 +404,8 @@ export default class DataGrid extends GridCore { async scrollBy( t: TestController, - options: { x?: number; y?: number; top?: number; left?: number - }): Promise { + options: { top?: number; left?: number }, + ): Promise { await t.expect(this.hasScrollable()).ok(); const { getInstance } = this;