Skip to content

Commit ef02f1d

Browse files
Scheduler: use testScreenshot utility in e2e tests 2 (#31628)
1 parent 1b0126f commit ef02f1d

File tree

336 files changed

+89
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

336 files changed

+89
-17
lines changed

e2e/testcafe-devextreme/tests/scheduler/common/a11y/contrast.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import { testScreenshot } from '../../../../helpers/themeUtils';
77
fixture.disablePageReloads`a11y - contrast`
88
.page(url(__dirname, '../../../container.html'));
99

10+
// visual: generic.light
11+
// visual: generic.dark
12+
// visual: fluent.light
13+
// visual: fluent.dark
1014
test('Scheduler a11y: Insufficient contrast of day numbers in the MonthView', async (t) => {
1115
const scheduler = new Scheduler('#container');
1216
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);

e2e/testcafe-devextreme/tests/scheduler/common/appointmentForm/form.visual.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ const getResources = (withIcons = false) => ([
5959
},
6060
]);
6161

62+
// visual: generic.light
63+
// visual: fluent.blue.light
64+
// visual: material.blue.light
6265
[
6366
{ isRecurringAppointment: false, isAllDay: true },
6467
{ isRecurringAppointment: false, isAllDay: false },

e2e/testcafe-devextreme/tests/scheduler/common/header/etalons/scheduler-toolbar-menu.png renamed to e2e/testcafe-devextreme/tests/scheduler/common/header/etalons/scheduler-toolbar-menu (generic.light).png

File renamed without changes.

e2e/testcafe-devextreme/tests/scheduler/common/header/sizes.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('items inside toolbar menu should stretch', async (t) => {
2020

2121
await t.click(scheduler.toolbar.menuButton);
2222

23-
await takeScreenshot('scheduler-toolbar-menu.png');
23+
await testScreenshot(t, takeScreenshot, 'scheduler-toolbar-menu.png');
2424

2525
await t
2626
.expect(compareResults.isValid())
@@ -37,6 +37,9 @@ test('items inside toolbar menu should stretch', async (t) => {
3737
},
3838
}));
3939

40+
// visual: generic.light
41+
// visual: fluent.blue.light
42+
// visual: material.blue.light
4043
test('Scheduler header should have correct sizes', async (t) => {
4144
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
4245
const scheduler = new Scheduler('#container');

e2e/testcafe-devextreme/tests/scheduler/common/layout/adaptive/adaptive.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const createScheduler = async (
2626
});
2727
};
2828

29+
// visual: generic.light
30+
// visual: fluent.blue.light
31+
// visual: material.blue.light
2932
[false, true].forEach((rtlEnabled) => {
3033
[false, true].forEach((crossScrollingEnabled) => {
3134
test.meta({ browserSize: ADAPTIVE_SIZE })(`Adaptive views layout test, crossScrollingEnabled=${crossScrollingEnabled}${rtlEnabled ? 'in RTL' : ''}`, async (t) => {

e2e/testcafe-devextreme/tests/scheduler/common/layout/appointments/collector.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ const getSchedulerBaseOptions = (view: string) => {
6262
};
6363
};
6464

65+
// visual: generic.light
66+
// visual: fluent.blue.light
67+
// visual: material.blue.light
6568
generateOptionMatrix({
6669
view: ['week', 'month', 'timelineWeek'],
6770
adaptivityEnabled: [true, false],
@@ -86,6 +89,9 @@ generateOptionMatrix({
8689
}));
8790
});
8891

92+
// visual: generic.light
93+
// visual: fluent.blue.light
94+
// visual: material.blue.light
8995
test('Appointment collector has correct offset when month view with double interval', async (t) => {
9096
const scheduler = new Scheduler('#container');
9197

e2e/testcafe-devextreme/tests/scheduler/common/layout/appointments/recurrence.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import { testScreenshot } from '../../../../../helpers/themeUtils';
77
fixture.disablePageReloads`AppointmentForm screenshot tests`
88
.page(url(__dirname, '../../../../container.html'));
99

10+
// visual: generic.light
11+
// visual: fluent.blue.light
12+
// visual: material.blue.light
1013
['day', 'week', 'workWeek', 'month', 'timelineDay', 'timelineWeek', 'timelineWorkWeek', 'timelineMonth', 'agenda'].forEach((currentView) => {
1114
[true, false].forEach((rtlEnabled) => {
1215
test('Appointemt form tests', async (t) => {

e2e/testcafe-devextreme/tests/scheduler/common/layout/legacyAppointmentForm/common.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import { testScreenshot } from '../../../../../helpers/themeUtils';
77
fixture.disablePageReloads`AppointmentForm screenshot tests`
88
.page(url(__dirname, '../../../../container.html'));
99

10+
// visual: generic.light
11+
// visual: fluent.blue.light
12+
// visual: material.blue.light
1013
test('Appointemt form tests', async (t) => {
1114
const scheduler = new Scheduler('#container');
1215
const { legacyAppointmentPopup: appointmentPopup } = scheduler;

e2e/testcafe-devextreme/tests/scheduler/common/layout/resources/base/generic.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const createScheduler = async (view: string, resourcesValue?: unknown[]): Promis
1919
});
2020
};
2121

22+
// visual: generic.light
23+
// visual: fluent.blue.light
24+
// visual: material.blue.light
2225
[undefined, resourceDataSource].forEach((resourcesValue) => {
2326
['agenda', 'day', 'week', 'month', 'workWeek'].forEach((view) => {
2427
test(`Base views layout test with resources(view='${view})', resource=${!!resourcesValue}`, async (t) => {
@@ -38,6 +41,9 @@ const createScheduler = async (view: string, resourcesValue?: unknown[]): Promis
3841
});
3942
});
4043

44+
// visual: generic.light
45+
// visual: fluent.blue.light
46+
// visual: material.blue.light
4147
[undefined, resourceDataSource].forEach((resourcesValue) => {
4248
['timelineDay', 'timelineWeek', 'timelineMonth', 'timelineWorkWeek'].forEach((view) => {
4349
test(`Timeline views layout test with resources(view='${view})', resource=${!!resourcesValue}`, async (t) => {
@@ -62,6 +68,9 @@ const createScheduler = async (view: string, resourcesValue?: unknown[]): Promis
6268
});
6369
});
6470

71+
// visual: generic.light
72+
// visual: fluent.blue.light
73+
// visual: material.blue.light
6574
test('Scheduler should have correct height in month view (T927862)', async (t) => {
6675
const scheduler = new Scheduler('#container');
6776

0 commit comments

Comments
 (0)