@@ -2247,6 +2247,23 @@ describe('Appointment Popup', () => {
22472247 expect ( POM . popup . dxForm . option ( 'formData' ) ) . toMatchObject ( { ...commonAppointment } ) ;
22482248 } ) ;
22492249
2250+ it ( 'should focus appointment after closing popup' , async ( ) => {
2251+ const { POM , keydown } = await createScheduler ( {
2252+ ...getDefaultConfig ( ) ,
2253+ dataSource : [ { ...recurringAppointment } ] ,
2254+ } ) ;
2255+
2256+ const appointmentElement = POM . getAppointment ( 'recurring-app' ) . element as HTMLElement ;
2257+ appointmentElement . focus ( ) ;
2258+
2259+ jest . useFakeTimers ( ) ;
2260+ keydown ( appointmentElement , 'Enter' ) ;
2261+ POM . popup . closeButton . click ( ) ;
2262+ jest . runAllTimers ( ) ;
2263+
2264+ expect ( appointmentElement ?. classList . contains ( 'dx-state-focused' ) ) . toBe ( true ) ;
2265+ } ) ;
2266+
22502267 describe ( 'Toolbar' , ( ) => {
22512268 describe ( 'Popup Title' , ( ) => {
22522269 it ( 'should display "New Appointment" when creating new appointment' , async ( ) => {
@@ -2695,25 +2712,15 @@ describe('Appointment Popup', () => {
26952712
26962713describe ( 'Appointment Popup Content' , ( ) => {
26972714 it . todo ( 'appointmentPopup should not prevent mouse/touch events by default (T968188)' ) ;
2698- it . todo ( 'showAppointmentPopup method with passed a recurrence appointment should render popup(T698732)' ) ;
26992715 it . todo ( 'showAppointmentPopup should render a popup only once' ) ;
27002716 it . todo ( 'showAppointmentPopup should work correctly after scheduler repainting' ) ;
27012717 it . todo ( 'changing editing should work correctly after showing popup' ) ;
27022718 it . todo ( 'showAppointmentPopup should render a popup form only once' ) ;
2703- it . todo ( 'popup should have right height' ) ;
27042719 it . todo ( 'showAppointmentPopup should render a popup content only once' ) ;
2705- it . todo ( 'Popup should contain editors and components with right dx-rtl classes and rtlEnabled option value' ) ;
2706- it . todo ( 'Popup should contains caption textbox with right value' ) ;
2707- it . todo ( 'Confirm dialog should be shown when showAppointmentPopup for recurrence appointment was called' ) ;
2708- it . todo ( 'Recurrence Editor should have right freq editor value if recurrence rule was set on init' ) ;
2709- it . todo ( 'Popup should contain recurrence editor with right config' ) ;
2710- it . todo ( 'Recurrence editor should change value if freq editor value changed' ) ;
27112720 it . todo ( 'Recurrence editor should has right startDate after form items change' ) ;
27122721 it . todo ( 'There are no exceptions when select date on the appointment popup,if dates are undefined' ) ;
27132722 it . todo ( 'Validate works always before done click' ) ;
27142723 it . todo ( 'Load panel should not be shown if validation is fail' ) ;
2715- it . todo ( 'Done button default configuration should be correct' ) ;
2716- it . todo ( 'Done button custom configuration should be correct' ) ;
27172724 it . todo ( 'Load panel should be hidden if event validation fail' ) ;
27182725 it . todo ( 'Load panel should be hidden at the second appointment form opening' ) ;
27192726} ) ;
0 commit comments