diff --git a/.github/workflows/qunit_tests-additional-renovation.yml b/.github/workflows/qunit_tests-additional-renovation.yml index e19f0a287cc6..541c8f62174d 100644 --- a/.github/workflows/qunit_tests-additional-renovation.yml +++ b/.github/workflows/qunit_tests-additional-renovation.yml @@ -148,8 +148,10 @@ jobs: 'ui.editors(1/2)', 'ui.editors(2/2)', 'ui.htmlEditor', - 'ui.grid(1/2)', - 'ui.grid(2/2)', + 'ui.grid(1/4)', + 'ui.grid(2/4)', + 'ui.grid(3/4)', + 'ui.grid(4/4)', 'ui.scheduler(1/3)', 'ui.scheduler(2/3)', 'ui.scheduler(3/3)', diff --git a/apps/demos/testing/etalons/Scheduler-CurrentTimeIndicator (fluent.blue.light).png b/apps/demos/testing/etalons/Scheduler-CurrentTimeIndicator (fluent.blue.light).png index b6f1e7a5e9fa..32ce4422ce2c 100644 Binary files a/apps/demos/testing/etalons/Scheduler-CurrentTimeIndicator (fluent.blue.light).png and b/apps/demos/testing/etalons/Scheduler-CurrentTimeIndicator (fluent.blue.light).png differ diff --git a/apps/demos/testing/widgets/datagrid/etalons/datagrid_filtering_by_range_3_desktop (fluent.blue.light).png b/apps/demos/testing/widgets/datagrid/etalons/datagrid_filtering_by_range_3_desktop (fluent.blue.light).png index e595c2c9531f..28a2d3e08fde 100644 Binary files a/apps/demos/testing/widgets/datagrid/etalons/datagrid_filtering_by_range_3_desktop (fluent.blue.light).png and b/apps/demos/testing/widgets/datagrid/etalons/datagrid_filtering_by_range_3_desktop (fluent.blue.light).png differ diff --git a/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (fluent-blue-light).png b/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (fluent-blue-light).png index 85c9c15a4045..c961a032c5c9 100644 Binary files a/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (fluent-blue-light).png and b/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (fluent-blue-light).png differ diff --git a/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (material-blue-light).png b/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (material-blue-light).png index b50c2e021b79..2f9055365763 100644 Binary files a/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (material-blue-light).png and b/e2e/testcafe-devextreme/tests/chat/etalons/Alertlist with long text in error (material-blue-light).png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-horizontal-middle.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-horizontal-middle.png index e857ec3d287a..f0073716ac9e 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-horizontal-middle.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-horizontal-middle.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-vertical-end.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-vertical-end.png index 0b8246ec699e..25b7b401bac2 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-vertical-end.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-month-vertical-end.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-week-horizontal-middle.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-week-horizontal-middle.png index 088e955f6956..f5a597357236 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-week-horizontal-middle.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-week-horizontal-middle.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-workWeek-horizontal-middle.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-workWeek-horizontal-middle.png index 63b53f23262c..47fad764360e 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-workWeek-horizontal-middle.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-many-cells-workWeek-horizontal-middle.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-grouping-by-date.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-grouping-by-date.png index 45ae2a4e7090..0606bc62110a 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-grouping-by-date.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-grouping-by-date.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping-scaling.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping-scaling.png index 94c2d9309c19..f9e468120601 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping-scaling.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping-scaling.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping.png index 470fcce016d5..f76b52e9bc7d 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-month-after-scroll-horizontal-grouping.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineDay-after-scroll-horizontal-grouping-scaling.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineDay-after-scroll-horizontal-grouping-scaling.png index 23b271b7f8bc..19f9e13de030 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineDay-after-scroll-horizontal-grouping-scaling.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineDay-after-scroll-horizontal-grouping-scaling.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineMonth-after-scroll-horizontal-grouping-scaling.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineMonth-after-scroll-horizontal-grouping-scaling.png index 424bf50337ac..955a3977fad7 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineMonth-after-scroll-horizontal-grouping-scaling.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineMonth-after-scroll-horizontal-grouping-scaling.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineWeek-after-scroll-horizontal-grouping-scaling.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineWeek-after-scroll-horizontal-grouping-scaling.png index ce8dfcddf549..17cdbbe36d3f 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineWeek-after-scroll-horizontal-grouping-scaling.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-timelineWeek-after-scroll-horizontal-grouping-scaling.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-grouping-by-date.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-grouping-by-date.png index 3f146ec4e7f4..d8bc2bec81fa 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-grouping-by-date.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-grouping-by-date.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping-scaling.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping-scaling.png index 4e944b53d9ae..6c7918e73ecb 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping-scaling.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping-scaling.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping.png index bce2d95a75a2..b7771f2633b9 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll-horizontal-grouping.png differ diff --git a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll.png b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll.png index 1631e7368832..a1aceb1da8d8 100644 Binary files a/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll.png and b/e2e/testcafe-devextreme/tests/scheduler/virtualScrolling/etalons/virtual-scrolling-week-after-scroll.png differ diff --git a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts index 66309a045793..314e9fbf1308 100644 --- a/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts +++ b/packages/devextreme/js/__internal/ui/scroll_view/m_scrollable.simulated.ts @@ -220,10 +220,10 @@ export const Scroller = Class.inherit({ if (location > 0) { translateOffset = location; - } else if (location <= minOffset) { + } + + if (location <= minOffset) { translateOffset = location - minOffset; - } else { - translateOffset = location % 1; } if (this._translateOffset === translateOffset) { @@ -234,7 +234,7 @@ export const Scroller = Class.inherit({ targetLocation[this._prop] = translateOffset; this._translateOffset = translateOffset; - if (translateOffset === 0) { + if (!translateOffset) { resetPosition(this._$content); return; } 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 23cbd3158a7f..4addc614ae66 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 @@ -3487,7 +3487,7 @@ QUnit.module('Editing', baseModuleConfig, () => { assert.strictEqual(onSelectedSpy.callCount, 0, 'is not selected after change'); }); - QUnit.testInActiveWindow('key should not be compared many times on paging (T1047506)', function(assert) { + QUnit.test('key should not be compared many times on paging (T1047506)', function(assert) { // arrange let idCallCount = 0; const items = Array.from({ length: 50 }).map((_, index) => { @@ -3506,7 +3506,9 @@ QUnit.module('Editing', baseModuleConfig, () => { keyExpr: 'id', scrolling: { mode: 'virtual', - useNative: false + useNative: false, + scrollByThumb: false, + showScrollbar: 'onHover', }, }); @@ -3518,7 +3520,7 @@ QUnit.module('Editing', baseModuleConfig, () => { dataGrid.pageIndex(1); // assert - assert.equal(idCallCount, 200, 'key call count after paging'); + assert.true(idCallCount < 280, 'key call count after paging'); }); QUnit.test('Popup should render editor if columns[].renderAsync option is true', function(assert) { @@ -5044,6 +5046,11 @@ QUnit.module('API methods', baseModuleConfig, () => { // T722161 QUnit.test('add row after scrolling if rowRenderingMode is virtual', function(assert) { + if(devices.real().ios) { + assert.ok(true); + return; + } + const array = []; for(let i = 1; i <= 20; i++) { array.push({ id: i, text: 'text' + i }); @@ -7048,6 +7055,10 @@ QUnit.module('Editing state', baseModuleConfig, () => { }); QUnit.test(`Add row at the end of the last page via changes option if virtual scrolling (editMode = ${editMode}, key = ${key})`, function(assert) { + if(devices.real().ios) { + assert.ok(true); + return; + } // arrange const changes = [{ data: { field: 'test' }, 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 27c0b4fa179c..3f03cf733960 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 @@ -990,7 +990,7 @@ QUnit.module('Scrolling', baseModuleConfig, () => { scrollable.scrollTo(100.7); // assert - assert.equal(scrollable.scrollLeft(), 100.7); + assert.equal(scrollable.scrollLeft(), 100); assert.equal($(scrollable.container()).scrollLeft(), 100); const $headersScrollable = $dataGrid.find('.dx-datagrid-headers' + ' .dx-datagrid-scroll-container').first(); 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 aacfa5f7a6f4..5a3cf4d4bd53 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 @@ -1612,6 +1612,10 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { }); QUnit.test('synchronous render and asynchronous updateDimensions during paging if virtual scrolling is enabled', function(assert) { + if(devices.real().ios) { + assert.ok(true); + return; + } // arrange, act let contentReadyCount = 0; @@ -5858,7 +5862,7 @@ QUnit.module('Virtual Scrolling', baseModuleConfig, () => { assert.equal(loadSpy.args[1][0].take, 15, 'take in the second call'); }); - QUnit.skip('Rows in fixed table should not have the offset when the content is scrolled to the bottom (T1072358)', function(assert) { + QUnit.test('Rows in fixed table should not have the offset when the content is scrolled to the bottom (T1072358)', function(assert) { // arrange const getData = function() { const items = []; 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 93d061d3f4d1..3c4fd5a30254 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 @@ -20,7 +20,6 @@ import { SCROLLBAR_VERTICAL_CLASS, SCROLLABLE_SCROLLBARS_HIDDEN, SCROLLABLE_DISABLED_CLASS, - calculateInertiaDistance, } from './scrollable.constants.js'; import { diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js index 69713f341355..a492b994f202 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.dynamic.tests.js @@ -453,7 +453,6 @@ QUnit.test('bounce is disabled', function(assert) { useNative: false, bounceEnabled: false, inertiaEnabled: false, - onBounce: function() { assert.ok(false, 'bounce action was not fired'); } @@ -479,11 +478,9 @@ QUnit.test('inertia stopped on the bound when bounce is disabled', function(asse $scrollable.dxScrollable({ useNative: false, bounceEnabled: false, - onBounce: function() { assert.ok(false, 'bounce action was not fired'); }, - onEnd: function() { const location = getScrollOffset($scrollable); assert.equal(location.top, 0, 'content stopped on the bound'); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js index d509a85b9306..e416d8085be2 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets/scrollableParts/scrollable.main.tests.js @@ -161,6 +161,56 @@ QUnit.test('reset unused position after change direction', function(assert) { QUnit.module('both directions', moduleConfig); +['horizontal', 'vertical'].forEach((direction) => { + QUnit.test(`content should have the translate(0,0) when scrolling within the bounds of the container in ${direction} direction`, function(assert) { + const done = assert.async(); + assert.expect(2); + + const contentWidth = 9000; + const contentHeight = 9000; + const moveDistance = -10; + const moveDuration = 10; + const $scrollable = $('#scrollable'); + + $scrollable + .find('.content1') + .width(contentWidth) + .height(contentHeight); + + $scrollable.dxScrollable({ + useNative: false, + direction, + onEnd: function() { + const translate = getTranslateValues($content.get(0)); + + assert.equal(translate.left, 0, 'translate left should have zero value'); + assert.equal(translate.top, 0, 'translate top should have zero value'); + + done(); + } + }); + + const $content = $scrollable.find(`.${SCROLLABLE_CONTENT_CLASS}`); + const mouse = pointerMock($content).start(); + + mouse + .down() + .wait(moveDuration); + + if(direction === 'horizontal') { + mouse + .move(moveDistance, 0) + .up(); + } else { + mouse + .move(0, moveDistance) + .up(); + } + + this.clock.tick(10); + }); +}); + QUnit.test('bounce problem', function(assert) { assert.expect(2);