Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
d76312e
Scheduler: add elapsed-time DST grid (T1335525)
sjbur Sep 22, 2026
3ab3199
Merge branch 'feature/scheduler-dst-grid/a1' into feature/scheduler-d…
sjbur Sep 22, 2026
c9a950f
Scheduler: record the 26_1 DST grid before changing it (T1335525)
sjbur Sep 22, 2026
1ee9096
Merge branch 'feature/scheduler-dst-grid/a2' into feature/scheduler-d…
sjbur Sep 22, 2026
ef57c66
Scheduler: add DST grid test matrix and day-length checks (T1335525)
sjbur Sep 22, 2026
2f127d2
Merge branch 'feature/scheduler-dst-grid/a3' into feature/scheduler-d…
sjbur Sep 22, 2026
daaa70e
Scheduler: lay timeline cells and appointments on the DST scale (T133…
sjbur Sep 22, 2026
cf6f0ae
Scheduler: find timeline cells by instant on a repeated hour (T1335525)
sjbur Sep 22, 2026
8c6b49a
Scheduler: resolve recurring DST times with the scale detector (T1335…
sjbur Sep 22, 2026
0f6a0f8
Scheduler: import Jest globals in the DST grid matrix helper (T1335525)
sjbur Sep 22, 2026
ea3bb1b
Merge branch 'feature/scheduler-dst-grid/a3' into feature/scheduler-d…
sjbur Sep 22, 2026
faea470
Merge branch 'feature/scheduler-dst-grid/main' into feature/scheduler…
sjbur Sep 22, 2026
4a5aaf9
Merge branch 'feature/scheduler-dst-grid/main' into feature/scheduler…
sjbur Sep 22, 2026
d651bd6
Scheduler: lay vertical day and week rows on the DST scale (T1335525)
sjbur Sep 22, 2026
e109c4a
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
5487bde
Scheduler: pass the origin cell into the DST instant check (T1335525)
sjbur Sep 22, 2026
30a97e4
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
643e97a
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
6200d56
Scheduler: type the timeline indicator lookup on the workspace (T1335…
sjbur Sep 22, 2026
65e6b43
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
404e379
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
47b120e
Scheduler: keep DST layout optional for workspaces without a plan (T1…
sjbur Sep 22, 2026
b46ce22
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
a411e05
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
be18833
Scheduler: keep DST layout optional for workspaces without a plan (T1…
sjbur Sep 22, 2026
53530fe
Scheduler: omit an empty groups field on all-day cells (T1335525)
sjbur Sep 22, 2026
d2259a8
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
6d73abc
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
036f1c9
Scheduler: omit an empty groups field on all-day cells (T1335525)
sjbur Sep 22, 2026
1cf0ff2
Scheduler: expect no skipped hour on a Pacific spring timeline (T1335…
sjbur Sep 22, 2026
fd1ed87
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
e7bf68c
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 22, 2026
b95c4f1
Scheduler: expect no skipped hour on a Pacific spring timeline (T1335…
sjbur Sep 22, 2026
287728a
Scheduler: match timeline DST tests to the elapsed-time grid (T1335525)
sjbur Sep 23, 2026
d8d6cae
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
957c0d3
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
d1a3dcf
Scheduler: match timeline DST tests to the elapsed-time grid (T1335525)
sjbur Sep 23, 2026
e20934f
Merge branch 'feature/scheduler-dst-grid/c' into feature/scheduler-ds…
sjbur Sep 23, 2026
fd7d4b0
Scheduler: keep the duration of a recurrence that starts in a skipped…
sjbur Sep 23, 2026
1f90e27
Merge branch 'feature/scheduler-dst-grid/c' into feature/scheduler-ds…
sjbur Sep 23, 2026
e460501
Scheduler: keep the duration of a recurrence that starts in a skipped…
sjbur Sep 23, 2026
74a09ff
Scheduler: place a 3:00 appointment at the start of a spring timeline…
sjbur Sep 23, 2026
bddaed7
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
eef0981
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
4308a68
Scheduler: place a 3:00 appointment at the start of a spring timeline…
sjbur Sep 23, 2026
4f8b7e1
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
1f502df
Scheduler: read the DST jump from the zone offset (T1335525)
sjbur Sep 23, 2026
30ce568
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
77ffe35
Scheduler: keep the current-time mark and the skipped-hour shift (T13…
sjbur Sep 23, 2026
5df0d86
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
9a09234
Scheduler: match vertical DST tests to the skipped hour (T1335525)
sjbur Sep 23, 2026
4a0183b
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
6f190fd
Scheduler: match week DST selection and cell dates to the grid (T1335…
sjbur Sep 23, 2026
b5f3b3d
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
ab77cdb
Scheduler: place an offset appointment on the offset row (T1335525)
sjbur Sep 23, 2026
1a172ea
Scheduler: keep the wall time of an appointment in the skipped hour (…
sjbur Sep 23, 2026
5c535d3
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
4ac7443
Merge branch 'feature/scheduler-dst-grid/c' into feature/scheduler-ds…
sjbur Sep 23, 2026
316352a
Scheduler: drop the unused daylight plan read (T1335525)
sjbur Sep 23, 2026
3db78d8
Scheduler: expect an offset appointment on the shifted cell (T1335525)
sjbur Sep 23, 2026
982221c
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
df0f946
Scheduler: expect the spring drop to skip the missing 2:00 row (T1335…
sjbur Sep 23, 2026
a67920b
Merge branch 'feature/scheduler-dst-grid/b' into feature/scheduler-ds…
sjbur Sep 23, 2026
17801e1
Scheduler: measure a spring day from the requested start hour (T1335525)
sjbur Sep 23, 2026
452a8e3
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
b3c43c5
Scheduler: check the skipped Cairo half-hour by its wall clock (T1335…
sjbur Sep 23, 2026
6f53860
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
bb0d746
Scheduler: place the second pass after the whole first hour (T1335525)
sjbur Sep 23, 2026
1f06cd9
Scheduler: do not extend an appointment that ends on the fall-back ju…
sjbur Sep 23, 2026
9772dc7
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
c316886
Merge branch 'feature/scheduler-dst-grid/c' into feature/scheduler-ds…
sjbur Sep 23, 2026
96c13a5
Scheduler: expect 1:30 before the second 1:00 (T1335525)
sjbur Sep 23, 2026
f1a604b
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
94bc69a
Scheduler: start an offset week at the offset hour (T1335525)
sjbur Sep 23, 2026
284e59b
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 23, 2026
a2d2a2e
Scheduler: put offset night hours in the neighboring day column (T133…
sjbur Sep 24, 2026
d166e49
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
037b9e1
Scheduler: show the next morning in the last offset column (T1335525)
sjbur Sep 24, 2026
b0ed687
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
839e32d
Scheduler: refresh Los Angeles DST screenshots (T1335525)
sjbur Sep 24, 2026
38e9021
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
90a4458
Scheduler: preserve vertical layout outside offset DST rows (T1335525)
sjbur Sep 24, 2026
d1d4482
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
94c054b
Scheduler: scope repeated time labels by resource group (T1335525)
sjbur Sep 24, 2026
668c4a7
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
5353222
Scheduler: preserve legacy time labels around DST (T1335525)
sjbur Sep 24, 2026
29c936e
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
d106e7c
Scheduler: normalize negative full-day header offsets (T1335525)
sjbur Sep 24, 2026
98ddd9d
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
2b8b628
Scheduler: normalize calendar view offsets by day (T1335525)
sjbur Sep 24, 2026
011f128
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
6211d34
Scheduler: keep timeline offset headers on wall scale (T1335525)
sjbur Sep 24, 2026
318fba7
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
91f3b22
Scheduler: keep full-day week headers on plan dates (T1335525)
sjbur Sep 24, 2026
c2a2689
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
f16b63b
Scheduler: normalize full-day offsets before cell generation (T1335525)
sjbur Sep 24, 2026
cfa3c52
Merge branch 'feature/scheduler-dst-grid/e' into feature/scheduler-ds…
sjbur Sep 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ const BERLIN_SUMMER_CASE_OFFSET: TestCase = {
currentDate: '2024-03-31',
startDate: new Date('2024-03-30T23:00:00Z'),
cellIdxArray: Array.from({ length: 8 }, (_, idx) => [idx, 3]),
expectedTopPosition: [0, 25, 50, 75, 100, 125, 150, 175],
// Row 2 is still the missing 02:00. The view offset does not move that hole.
expectedTopPosition: [0, 25, 25, 75, 100, 125, 150, 175],
};

const BERLIN_WINTER_CASE: TestCase = {
Expand Down Expand Up @@ -98,7 +99,8 @@ const LOS_ANGELES_SUMMER_CASE_OFFSET: TestCase = {
currentDate: '2024-03-10',
startDate: new Date('2024-03-10T08:00:00Z'),
cellIdxArray: Array.from({ length: 8 }, (_, idx) => [idx, 3]),
expectedTopPosition: [0, 25, 50, 75, 100, 125, 150, 175],
// Row 2 is still the missing 02:00. The view offset does not move that hole.
expectedTopPosition: [0, 25, 25, 75, 100, 125, 150, 175],
};

const LOS_ANGELES_WINTER_CASE: TestCase = {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ exports[`scheduler should render correct workspace in Santiago DST for view: Day
"9:00 PM",
"",
"11:00 PM",
"",
]
`;

Expand Down Expand Up @@ -257,7 +256,6 @@ exports[`scheduler should render correct workspace in Santiago DST for view: Tim
"9:00 PM",
"10:00 PM",
"11:00 PM",
"12:00 AM",
]
`;

Expand All @@ -274,30 +272,30 @@ exports[`scheduler should render correct workspace in Santiago DST for view: Tim
"7:00 AM",
"1:00 PM",
"7:00 PM",
"1:00 AM",
"7:00 AM",
"1:00 PM",
"7:00 PM",
"1:00 AM",
"7:00 AM",
"1:00 PM",
"7:00 PM",
"1:00 AM",
"7:00 AM",
"1:00 PM",
"7:00 PM",
"1:00 AM",
"7:00 AM",
"1:00 PM",
"7:00 PM",
"1:00 AM",
"7:00 AM",
"1:00 PM",
"7:00 PM",
"1:00 AM",
"7:00 AM",
"1:00 PM",
"7:00 PM",
"12:00 AM",
"6:00 AM",
"12:00 PM",
"6:00 PM",
"12:00 AM",
"6:00 AM",
"12:00 PM",
"6:00 PM",
"12:00 AM",
"6:00 AM",
"12:00 PM",
"6:00 PM",
"12:00 AM",
"6:00 AM",
"12:00 PM",
"6:00 PM",
"12:00 AM",
"6:00 AM",
"12:00 PM",
"6:00 PM",
"12:00 AM",
"6:00 AM",
"12:00 PM",
"6:00 PM",
]
`;

Expand Down Expand Up @@ -386,29 +384,29 @@ exports[`scheduler should render correct workspace in Santiago DST for view: Wee

exports[`scheduler should render correct workspace in Santiago DST for view: Week started at Sun 2`] = `
[
"1:00 AM",
"12:00 AM",
"",
"3:00 AM",
"2:00 AM",
"",
"5:00 AM",
"4:00 AM",
"",
"7:00 AM",
"6:00 AM",
"",
"9:00 AM",
"8:00 AM",
"",
"11:00 AM",
"10:00 AM",
"",
"1:00 PM",
"12:00 PM",
"",
"3:00 PM",
"2:00 PM",
"",
"5:00 PM",
"4:00 PM",
"",
"7:00 PM",
"6:00 PM",
"",
"9:00 PM",
"8:00 PM",
"",
"11:00 PM",
"10:00 PM",
"",
]
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/**
* @timezone Etc/UTC
*/

import {
afterEach, beforeEach, describe, expect, it,
} from '@jest/globals';

import fx from '../../../common/core/animation/fx';
import { createScheduler } from './__mock__/create_scheduler';
import { DEFAULT_CELL_WIDTH, setupSchedulerTestEnvironment } from './__mock__/mock_scheduler';

const FIRST_PASS = new Date('2026-10-29T20:30:00.000Z');
const SECOND_PASS = new Date('2026-10-29T21:30:00.000Z');

describe('cell search on a Cairo fall-back timeline', () => {
beforeEach(() => {
fx.off = true;
setupSchedulerTestEnvironment({ width: DEFAULT_CELL_WIDTH, height: 80 });
});

afterEach(() => {
fx.off = false;
document.body.innerHTML = '';
});

const createTimeline = async (offset = 0) => {
const { scheduler, POM } = await createScheduler({
dataSource: [{
text: 'A',
startDate: new Date('2026-10-29T23:00:00+03:00'),
endDate: new Date('2026-10-29T23:15:00+03:00'),
}],
views: [{ type: 'timelineDay', cellDuration: 60, offset }],
currentView: 'timelineDay',
currentDate: new Date(2026, 9, 29),
cellDuration: 60,
timeZone: 'Africa/Cairo',
indicatorTime: SECOND_PASS,
showCurrentTimeIndicator: true,
});
const workspace = scheduler.getWorkSpace();
const provider = workspace.viewDataProvider;
const row = provider.completeViewDataMap[0];

return {
scheduler, POM, workspace, provider, row,
};
};

it('findGlobalCellPosition tells the two 23:00 instants apart', async () => {
const { provider } = await createTimeline();
const first = provider.findGlobalCellPosition(FIRST_PASS);
const second = provider.findGlobalCellPosition(SECOND_PASS);

expect(first?.cellData.startDateUTC?.toISOString()).toBe('2026-10-29T20:00:00.000Z');
expect(second?.cellData.startDateUTC?.toISOString()).toBe('2026-10-29T21:00:00.000Z');
expect(first?.position.columnIndex).toBe(23);
expect(second?.position.columnIndex).toBe(24);
});

it('getSkippedDaysCount counts a cell whose wall clock ends where it starts', async () => {
const { provider, row } = await createTimeline();
const repeated = row[23];
const startInstant = repeated.startDateUTC ?? repeated.startDate;
const endInstant = repeated.endDateUTC ?? repeated.endDate;
const included = provider.getSkippedDaysCount(0, startInstant, endInstant, 1);

expect(repeated.startDate.getTime()).toBe(repeated.endDate.getTime());
expect(included).toBe(0);
});

it('isGroupIntersectDateInterval uses the true span, including the repeated hour', async () => {
const { provider } = await createTimeline();

expect(provider.isGroupIntersectDateInterval(0, FIRST_PASS, SECOND_PASS)).toBe(true);
expect(provider.isGroupIntersectDateInterval(
0,
new Date('2026-10-28T10:00:00.000Z'),
new Date('2026-10-28T12:00:00.000Z'),
)).toBe(false);
});

it('getCellsBetween keeps both passes of 23:00', async () => {
const { provider, row } = await createTimeline();
const between = provider.getCellsBetween(row[23], row[24]);

expect(between.map((cell) => cell.startDateUTC?.toISOString())).toEqual([
'2026-10-29T20:00:00.000Z',
'2026-10-29T21:00:00.000Z',
]);
});

it('asks the plan for the indicator column of the second 23:00', async () => {
const { workspace } = await createTimeline();
const column = workspace.getIndicationCellCount?.();

expect(column).toBe(24.5);
});

it('applies viewOffset once, so the appointment stays on its cell', async () => {
const shifted = await createTimeline(60);
const appointmentCell = shifted.row[22];

expect(shifted.row[23].startDateUTC?.toISOString()).toBe('2026-10-29T21:00:00.000Z');
expect(appointmentCell.startDateUTC?.toISOString()).toBe('2026-10-29T20:00:00.000Z');
expect(shifted.POM.getAppointment('A').getGeometry().left).toBe(22 * DEFAULT_CELL_WIDTH);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/**
* @timezone Africa/Cairo
*/

import {
afterEach, beforeEach, describe, expect, it,
} from '@jest/globals';

import fx from '../../../common/core/animation/fx';
import { createScheduler } from './__mock__/create_scheduler';
import { DEFAULT_CELL_WIDTH, setupSchedulerTestEnvironment } from './__mock__/mock_scheduler';

const MINUTE_MS = 60 * 1000;

/**
* Cairo grid when the browser zone is Cairo, so grid dates carry the real offset.
*/
describe('Cairo grid when the browser zone is Cairo', () => {
beforeEach(() => {
fx.off = true;
setupSchedulerTestEnvironment({ width: DEFAULT_CELL_WIDTH, height: 80 });
});

afterEach(() => {
fx.off = false;
document.body.innerHTML = '';
});

it('folds the repeated hour into a 75-minute 23:45 cell', async () => {
const { scheduler, POM } = await createScheduler({
dataSource: [{
text: 'A',
startDate: new Date('2026-10-29T23:00:00+03:00'),
endDate: new Date('2026-10-29T23:15:00+03:00'),
}, {
text: 'B',
startDate: new Date('2026-10-29T23:00:00+02:00'),
endDate: new Date('2026-10-29T23:15:00+02:00'),
}, {
text: 'C',
startDate: new Date('2026-10-29T23:00:00+03:00'),
endDate: new Date('2026-10-29T23:30:00+02:00'),
}],
views: [{ type: 'timelineDay', intervalCount: 2, maxAppointmentsPerCell: 'unlimited' }],
currentView: 'timelineDay',
currentDate: new Date(2026, 9, 29),
cellDuration: 15,
timeZone: 'Africa/Cairo',
});
const row = scheduler.getWorkSpace().viewDataProvider.viewDataMap.dateTableMap[0];
const cell = (index: number) => row[index].cellData;
const duration = (index: number) => (
cell(index).endDate.getTime() - cell(index).startDate.getTime()
);
const firstPass = POM.getAppointment('A');
const secondPass = POM.getAppointment('B');
const across = POM.getAppointment('C');

expect(row).toHaveLength(196);
expect(duration(92)).toBe(15 * MINUTE_MS);
expect(duration(95)).toBe(15 * MINUTE_MS);
expect(cell(95).startDate.toISOString()).toBe('2026-10-29T20:45:00.000Z');
expect(cell(95).endDate.toISOString()).toBe('2026-10-29T21:00:00.000Z');
expect(cell(96).startDate.toISOString()).toBe('2026-10-29T21:00:00.000Z');
expect(cell(100).startDate.toISOString()).toBe('2026-10-29T22:00:00.000Z');

expect(firstPass.getGeometry().left).toBe(92 * DEFAULT_CELL_WIDTH);
expect(secondPass.getGeometry().left).toBe(96 * DEFAULT_CELL_WIDTH);
expect(firstPass.getGeometry().width).toBe(DEFAULT_CELL_WIDTH);
expect(across.getGeometry().width).toBe(6 * DEFAULT_CELL_WIDTH);
expect(firstPass.getDisplayDate()).toBe('11:00 PM - 11:15 PM');
expect(secondPass.getDisplayDate()).toBe(firstPass.getDisplayDate());
expect(across.getDisplayDate()).toBe('11:00 PM - 11:30 PM');
});

it('lets the last cell of a spring-forward day spill into the next midnight', async () => {
const { scheduler, POM } = await createScheduler({
dataSource: [],
views: [{ type: 'timelineDay', intervalCount: 2 }],
currentView: 'timelineDay',
currentDate: new Date(2026, 3, 24),
cellDuration: 60,
timeZone: 'Africa/Cairo',
});
const row = scheduler.getWorkSpace().viewDataProvider.viewDataMap.dateTableMap[0];
const cell = (index: number) => row[index].cellData;
const headers = POM.getHeaderPanelContent();

expect(row).toHaveLength(47);
expect(cell(0).startDate.getHours()).toBe(1);
expect(cell(0).startDate.toISOString()).toBe('2026-04-23T22:00:00.000Z');
expect(cell(22).startDate.getHours()).toBe(23);
expect(cell(22).startDate.getDate()).toBe(24);
expect(cell(23).startDate.getHours()).toBe(0);
expect(cell(23).startDate.getDate()).toBe(25);
expect(headers[2]).toBe('1:00 AM');
expect(headers[25]).toBe('12:00 AM');
});
});
Loading
Loading