@@ -4,8 +4,6 @@ import { ClientFunction } from 'testcafe';
44import AppointmentPopup from 'devextreme-testcafe-models/scheduler/appointment/popup' ;
55import { createWidget } from '../../../../helpers/createWidget' ;
66import url from '../../../../helpers/getPageUrl' ;
7- import { safeSizeTest } from '../../../../helpers/safeSizeTest' ;
8- import { changeTheme } from '../../../../helpers/changeTheme' ;
97
108fixture `Appointment Form: Recurrence Form`
119 . page ( url ( __dirname , '../../../container.html' ) ) ;
@@ -674,7 +672,14 @@ test.clientScripts([
674672 } ) ( ) ;
675673} ) ;
676674
677- safeSizeTest ( 'recurrence form with icons' , async ( t ) => {
675+ test . clientScripts ( [
676+ { module : 'mockdate' } ,
677+ { content : 'window.MockDate = MockDate;' } ,
678+ ] ) ( `recurrence form with icons (${ theme } )` , async ( t ) => {
679+ await ClientFunction ( ( ) => {
680+ ( window as any ) . MockDate . set ( '2025/10/29' ) ;
681+ } ) ( ) ;
682+
678683 const appointment = {
679684 text : 'Appointment' ,
680685 startDate : new Date ( '2021-04-26T16:30:00.000Z' ) ,
@@ -698,19 +703,18 @@ safeSizeTest('recurrence form with icons', async (t) => {
698703 await t
699704 . expect ( compareResults . isValid ( ) )
700705 . ok ( compareResults . errorMessages ( ) ) ;
701- } , [ 1500 , 1500 ] ) . before ( async ( ) => {
702- await changeTheme ( theme ) ;
703- return createWidget ( 'dxScheduler' , {
704- dataSource : [ ] ,
705- views : [ 'week' ] ,
706- currentView : 'week' ,
707- currentDate : new Date ( 2021 , 2 , 25 ) ,
708- editing : {
709- form : {
710- iconsShowMode : 'both' ,
711- } ,
706+ } ) . before ( async ( ) => createWidget ( 'dxScheduler' , {
707+ dataSource : [ ] ,
708+ views : [ 'week' ] ,
709+ currentView : 'week' ,
710+ currentDate : new Date ( 2021 , 2 , 25 ) ,
711+ editing : {
712+ form : {
713+ iconsShowMode : 'both' ,
712714 } ,
713- } ) ;
714- } ) . after ( async ( ) => {
715- await changeTheme ( 'generic.light' ) ;
715+ } ,
716+ } ) ) . after ( async ( ) => {
717+ await ClientFunction ( ( ) => {
718+ ( window as any ) . MockDate . reset ( ) ;
719+ } ) ( ) ;
716720} ) ;
0 commit comments