diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.currentTimeIndication.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.currentTimeIndication.tests.js index 16658975390e..b88625f72d08 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.currentTimeIndication.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.currentTimeIndication.tests.js @@ -48,14 +48,17 @@ module('Current Time Cell Indication Updating', { view: 'timelineDay', cellIndices: [4], timeDifference: HOUR, + highlightedCellsCount: 8, }, { view: 'timelineWeek', cellIndices: [28], timeDifference: HOUR, + highlightedCellsCount: 8, }, { view: 'timelineMonth', cellIndices: [8], timeDifference: HOUR * 48, + highlightedCellsCount: 1, }]; const testBasicView = (assert, scheduler, clock, currentTimeCellsNumber, cellIndices) => { @@ -144,7 +147,8 @@ module('Current Time Cell Indication Updating', { ...getBaseConfig({ type: view }), }); - testTimelineView(assert, scheduler, this.clock, timeDifference, 1, cellIndices); + const highlightedCellsCount = view === 'timelineMonth' ? 1 : 8; + testTimelineView(assert, scheduler, this.clock, timeDifference, highlightedCellsCount, cellIndices); }); }); @@ -167,15 +171,18 @@ module('Current Time Cell Indication Updating', { view: 'timelineDay', cellIndices: [4, 12], timeDifference: HOUR, + highlightedCellsCount: 16, }, { view: 'timelineWeek', cellIndices: [28, 84], timeDifference: HOUR, + highlightedCellsCount: 16, }, { view: 'timelineMonth', cellIndices: [8, 39], timeDifference: HOUR * 48, - }].forEach(({ view, cellIndices, timeDifference }) => { + highlightedCellsCount: 2, + }].forEach(({ view, cellIndices, timeDifference, highlightedCellsCount }) => { test(`Current Header Panel Cell indication should work correctly when horizontal grouping is used in ${view} view`, function(assert) { const scheduler = createWrapper({ ...getBaseConfig({ @@ -186,11 +193,11 @@ module('Current Time Cell Indication Updating', { groups: ['priorityId'], }); - testTimelineView(assert, scheduler, this.clock, timeDifference, 2, cellIndices); + testTimelineView(assert, scheduler, this.clock, timeDifference, highlightedCellsCount, cellIndices); }); }); - timelineViewsConfig.forEach(({ view, cellIndices, timeDifference }) => { + timelineViewsConfig.forEach(({ view, cellIndices, timeDifference, highlightedCellsCount }) => { test(`Current Header Panel Cell indication should work correctly when grouping by date is used in ${view} view`, function(assert) { const scheduler = createWrapper({ ...getBaseConfig({ @@ -201,7 +208,7 @@ module('Current Time Cell Indication Updating', { groups: ['priorityId'], }); - testTimelineView(assert, scheduler, this.clock, timeDifference, 1, cellIndices); + testTimelineView(assert, scheduler, this.clock, timeDifference, highlightedCellsCount, cellIndices); }); }); @@ -225,7 +232,7 @@ module('Current Time Cell Indication Updating', { }); }); - timelineViewsConfig.forEach(({ view, cellIndices, timeDifference }) => { + timelineViewsConfig.forEach(({ view, cellIndices, timeDifference, highlightedCellsCount }) => { test(`Current Header Panel Cell indication should work correctly when vertical is used in ${view} view`, function(assert) { const scheduler = createWrapper({ ...getBaseConfig({ @@ -235,7 +242,7 @@ module('Current Time Cell Indication Updating', { groups: ['priorityId'], }); - testTimelineView(assert, scheduler, this.clock, timeDifference, 1, cellIndices); + testTimelineView(assert, scheduler, this.clock, timeDifference, highlightedCellsCount, cellIndices); }); }); @@ -279,7 +286,7 @@ module('Current Time Cell Indication Updating', { let currentTimeCells = scheduler.workSpace.getHeaderPanelCurrentTimeCells(); - assert.equal(currentTimeCells.length, 0, 'Correct number of current time cells'); + assert.equal(currentTimeCells.length, 2, 'Correct number of current time cells'); this.clock.tick(timeDifference); @@ -287,7 +294,7 @@ module('Current Time Cell Indication Updating', { const currentCell = headerPanelCells.eq(cellIndex); currentTimeCells = scheduler.workSpace.getHeaderPanelCurrentTimeCells(); - assert.equal(currentTimeCells.length, 1, 'Correct number of current time cells'); + assert.equal(currentTimeCells.length, 2, 'Correct number of current time cells'); assert.ok(currentCell.hasClass(HEADER_PANEL_CURRENT_TIME_CELL_CLASS), 'The current time cell has current-time class'); }); }); diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/view_data_provider.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/view_data_provider.tests.js index 56785c8c297b..0b1ed0cab5d4 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/view_data_provider.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/view_data_provider.tests.js @@ -1624,6 +1624,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 5), groupIndex: undefined, groups: undefined, + highlighted: false, index: 0, isFirstGroupCell: false, isLastGroupCell: false, @@ -1634,6 +1635,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 6), groupIndex: undefined, groups: undefined, + highlighted: false, index: 1, isFirstGroupCell: false, isLastGroupCell: false, @@ -1661,6 +1663,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10), groupIndex: undefined, groups: undefined, + highlighted: false, index: 0, isFirstGroupCell: false, isLastGroupCell: false, @@ -1670,6 +1673,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 5), groupIndex: undefined, groups: undefined, + highlighted: false, index: 0, isFirstGroupCell: false, isLastGroupCell: false, @@ -1680,6 +1684,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 6), groupIndex: undefined, groups: undefined, + highlighted: false, index: 1, isFirstGroupCell: false, isLastGroupCell: false, @@ -1712,6 +1717,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10), groupIndex: 0, groups: { groupId: 1 }, + highlighted: false, index: 0, isFirstGroupCell: true, isLastGroupCell: false, @@ -1721,6 +1727,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 5), groupIndex: 0, groups: { groupId: 1 }, + highlighted: false, index: 0, isFirstGroupCell: true, isLastGroupCell: false, @@ -1731,6 +1738,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 6), groupIndex: 0, groups: { groupId: 1 }, + highlighted: false, index: 1, isFirstGroupCell: false, isLastGroupCell: true, @@ -1742,6 +1750,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10), groupIndex: 1, groups: { groupId: 2 }, + highlighted: false, index: 0, isFirstGroupCell: true, isLastGroupCell: false, @@ -1751,6 +1760,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 5), groupIndex: 1, groups: { groupId: 2 }, + highlighted: false, index: 0, isFirstGroupCell: true, isLastGroupCell: false, @@ -1761,6 +1771,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 6), groupIndex: 1, groups: { groupId: 2 }, + highlighted: false, index: 1, isFirstGroupCell: false, isLastGroupCell: true, @@ -1792,6 +1803,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 5), groupIndex: 0, groups: { groupId: 1 }, + highlighted: false, index: 0, isFirstGroupCell: true, isLastGroupCell: false, @@ -1802,6 +1814,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 6), groupIndex: 0, groups: { groupId: 1 }, + highlighted: false, index: 1, isFirstGroupCell: false, isLastGroupCell: true, @@ -1812,6 +1825,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 5), groupIndex: 1, groups: { groupId: 2 }, + highlighted: false, index: 0, isFirstGroupCell: true, isLastGroupCell: false, @@ -1822,6 +1836,7 @@ module('View Data Provider', { startDate: new Date(2021, 0, 10, 6), groupIndex: 1, groups: { groupId: 2 }, + highlighted: false, index: 1, isFirstGroupCell: false, isLastGroupCell: true,