|
1 | 1 | import Scheduler from 'devextreme-testcafe-models/scheduler'; |
| 2 | +import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; |
2 | 3 | import { getStyleAttribute, setStyleAttribute } from '../../../helpers/domUtils'; |
3 | 4 | import { createWidget } from '../../../helpers/createWidget'; |
4 | 5 | import url from '../../../helpers/getPageUrl'; |
@@ -39,3 +40,48 @@ test.skip('Appointment should not repaint after scrolling if present on viewport |
39 | 40 | }], |
40 | 41 | }); |
41 | 42 | }); |
| 43 | + |
| 44 | +test('The appointment should render correctly when scrolling vertically (T1263428)', async (t) => { |
| 45 | + const scheduler = new Scheduler('#container'); |
| 46 | + const { takeScreenshot, compareResults } = createScreenshotsComparer(t); |
| 47 | + |
| 48 | + await scrollTo(new Date('2024-11-12T09:00:00+0100')); |
| 49 | + |
| 50 | + await takeScreenshot('T1263428-virtual-scrolling-render-appointment.png', scheduler.element); |
| 51 | + |
| 52 | + await t |
| 53 | + .expect(compareResults.isValid()) |
| 54 | + .ok(compareResults.errorMessages()); |
| 55 | +}).before(async () => { |
| 56 | + await createWidget('dxScheduler', { |
| 57 | + height: 500, |
| 58 | + width: 900, |
| 59 | + timeZone: 'Europe/Vienna', |
| 60 | + dateSerializationFormat: 'yyyy-MM-ddTHH:mm:ssxx', |
| 61 | + currentDate: new Date(2024, 10, 11, 20, 54, 23, 361), |
| 62 | + cellDuration: 20, |
| 63 | + firstDayOfWeek: 1, |
| 64 | + startDayHour: 12.0, |
| 65 | + endDayHour: 18.0, |
| 66 | + allDayPanelMode: 'hidden', |
| 67 | + scrolling: { |
| 68 | + mode: 'virtual', |
| 69 | + }, |
| 70 | + crossScrollingEnabled: true, |
| 71 | + currentView: 'week', |
| 72 | + textExpr: 'Subject', |
| 73 | + startDateExpr: 'StartDate', |
| 74 | + endDateExpr: 'EndDate', |
| 75 | + views: [{ |
| 76 | + type: 'week', |
| 77 | + groupByDate: true, |
| 78 | + startDayHour: 6.0, |
| 79 | + endDayHour: 22.0, |
| 80 | + }], |
| 81 | + dataSource: [{ |
| 82 | + Subject: 'Website Re-Design Plan', |
| 83 | + StartDate: new Date('2024-11-11T12:10:00+0100'), |
| 84 | + EndDate: new Date('2024-11-12T21:00:00+0100'), |
| 85 | + }], |
| 86 | + }); |
| 87 | +}); |
0 commit comments