@@ -13,7 +13,9 @@ fixture.disablePageReloads`Appointment Form: Main Form`
1313const SCHEDULER_SELECTOR = '#container' ;
1414
1515const openAppointmentPopup = async (
16+ t : TestController ,
1617 appointment : any ,
18+ isRecurringAppointment : boolean ,
1719) : Promise < AppointmentPopup > => {
1820 await ClientFunction ( ( appointmentData ) => {
1921 const instance = ( $ ( '#container' ) as any ) . dxScheduler ( 'instance' ) ;
@@ -22,6 +24,10 @@ const openAppointmentPopup = async (
2224
2325 const scheduler = new Scheduler ( SCHEDULER_SELECTOR ) ;
2426
27+ if ( isRecurringAppointment ) {
28+ await t . click ( Scheduler . getEditRecurrenceDialog ( ) . series ) ;
29+ }
30+
2531 return scheduler . appointmentPopup ;
2632} ;
2733
@@ -56,10 +62,10 @@ const windowSize: [number, number] = [1500, 1500];
5662[
5763 // 'generic.light',
5864 // 'generic.light.compact',
59- 'material.blue.light' ,
60- 'material.blue.light.compact' ,
61- // 'fluent.blue.light',
62- // 'fluent.blue.light.compact',
65+ // 'material.blue.light',
66+ // 'material.blue.light.compact',
67+ 'fluent.blue.light' ,
68+ 'fluent.blue.light.compact' ,
6369] . forEach ( ( theme ) => {
6470 [
6571 { isRecurringAppointment : false , isAllDay : true } ,
@@ -81,23 +87,23 @@ const windowSize: [number, number] = [1500, 1500];
8187 safeSizeTest ( `appointment main form (${ theme } )` , async ( t ) => {
8288 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
8389
84- const appointmentPopup = await openAppointmentPopup ( appointment ) ;
90+ const appointmentPopup = await openAppointmentPopup ( t , appointment , isRecurringAppointment ) ;
8591
8692 await takeScreenshot (
8793 `scheduler__appointment__main-form.png (recurring=${ isRecurringAppointment } ,allDay=${ isAllDay } ,theme=${ theme } )` ,
88- appointmentPopup . popup . content ,
94+ appointmentPopup . contentElement ,
8995 ) ;
9096
9197 await t
9298 . expect ( compareResults . isValid ( ) )
9399 . ok ( compareResults . errorMessages ( ) ) ;
94- } , windowSize ) . before ( async ( ) => {
100+ } ) . before ( async ( ) => {
95101 await changeTheme ( theme ) ;
96102 await createWidget ( 'dxScheduler' , {
97103 dataSource : [ appointment ] ,
98104 views : [ 'week' ] ,
99105 currentView : 'week' ,
100- currentDate : new Date ( 2021 , 2 , 25 ) . toISOString ( ) ,
106+ currentDate : new Date ( 2021 , 2 , 25 ) ,
101107 } ) ;
102108 } ) . after ( async ( ) => {
103109 await changeTheme ( 'generic.light' ) ;
@@ -106,11 +112,11 @@ const windowSize: [number, number] = [1500, 1500];
106112 safeSizeTest ( `appointment main form with timezones (${ theme } )` , async ( t ) => {
107113 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
108114
109- const appointmentPopup = await openAppointmentPopup ( appointment ) ;
115+ const appointmentPopup = await openAppointmentPopup ( t , appointment , isRecurringAppointment ) ;
110116
111117 await takeScreenshot (
112118 `scheduler__appointment__main-form__with-timezones.png (recurring=${ isRecurringAppointment } ,allDay=${ isAllDay } ,theme=${ theme } )` ,
113- appointmentPopup . popup . content ,
119+ appointmentPopup . contentElement ,
114120 ) ;
115121
116122 await t
@@ -122,7 +128,7 @@ const windowSize: [number, number] = [1500, 1500];
122128 dataSource : [ appointment ] ,
123129 views : [ 'week' ] ,
124130 currentView : 'week' ,
125- currentDate : new Date ( 2021 , 2 , 25 ) . toISOString ( ) ,
131+ currentDate : new Date ( 2021 , 2 , 25 ) ,
126132 editing : {
127133 allowTimeZoneEditing : true ,
128134 } ,
@@ -134,11 +140,11 @@ const windowSize: [number, number] = [1500, 1500];
134140 safeSizeTest ( `appointment main form with resources (${ theme } )` , async ( t ) => {
135141 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
136142
137- const appointmentPopup = await openAppointmentPopup ( appointment ) ;
143+ const appointmentPopup = await openAppointmentPopup ( t , appointment , isRecurringAppointment ) ;
138144
139145 await takeScreenshot (
140146 `scheduler__appointment__main-form__with-resources.png (recurring=${ isRecurringAppointment } ,allDay=${ isAllDay } ,theme=${ theme } )` ,
141- appointmentPopup . popup . content ,
147+ appointmentPopup . contentElement ,
142148 ) ;
143149
144150 await t
@@ -150,7 +156,7 @@ const windowSize: [number, number] = [1500, 1500];
150156 dataSource : [ appointment ] ,
151157 views : [ 'week' ] ,
152158 currentView : 'week' ,
153- currentDate : new Date ( 2021 , 2 , 25 ) . toISOString ( ) ,
159+ currentDate : new Date ( 2021 , 2 , 25 ) ,
154160 resources : getResources ( ) ,
155161 } ) ;
156162 } ) . after ( async ( ) => {
@@ -160,11 +166,11 @@ const windowSize: [number, number] = [1500, 1500];
160166 safeSizeTest ( `appointment main form with resources and timezones (${ theme } )` , async ( t ) => {
161167 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
162168
163- const appointmentPopup = await openAppointmentPopup ( appointment ) ;
169+ const appointmentPopup = await openAppointmentPopup ( t , appointment , isRecurringAppointment ) ;
164170
165171 await takeScreenshot (
166172 `scheduler__appointment__main-form__with-resources-and-timezones.png (recurring=${ isRecurringAppointment } ,allDay=${ isAllDay } ,theme=${ theme } )` ,
167- appointmentPopup . popup . content ,
173+ appointmentPopup . contentElement ,
168174 ) ;
169175
170176 await t
@@ -176,7 +182,7 @@ const windowSize: [number, number] = [1500, 1500];
176182 dataSource : [ appointment ] ,
177183 views : [ 'week' ] ,
178184 currentView : 'week' ,
179- currentDate : new Date ( 2021 , 2 , 25 ) . toISOString ( ) ,
185+ currentDate : new Date ( 2021 , 2 , 25 ) ,
180186 resources : getResources ( ) ,
181187 editing : {
182188 allowTimeZoneEditing : true ,
0 commit comments