11import { render , screen } from "@testing-library/react" ;
22import { dynamic , ListValueBuilder } from "@mendix/widget-plugin-test-utils" ;
33
4- import MxCalendar from "../Calendar" ;
54import { CalendarContainerProps } from "../../typings/CalendarProps" ;
5+ import MxCalendar from "../Calendar" ;
66import { CalendarPropsBuilder } from "../helpers/CalendarPropsBuilder" ;
77
88// Mock react-big-calendar to avoid View.title issues
@@ -305,7 +305,7 @@ describe("CalendarPropsBuilder multi-day time formats", () => {
305305 const buildWithTimeFormat = ( timeFormatValue : string ) => {
306306 const props = {
307307 ...customViewProps ,
308- timeFormat : dynamic ( timeFormatValue )
308+ timeFormat : dynamic . available ( timeFormatValue )
309309 } ;
310310 const builder = new CalendarPropsBuilder ( props ) ;
311311 return builder . build ( mockLocalizer , "en" ) ;
@@ -370,8 +370,8 @@ describe("CalendarPropsBuilder showEventDate hides multi-day formats", () => {
370370 it ( "blanks eventTimeRangeStartFormat when showEventDate=false" , ( ) => {
371371 const props = {
372372 ...customViewProps ,
373- showEventDate : dynamic ( false ) ,
374- timeFormat : dynamic ( "HH:mm" )
373+ showEventDate : dynamic . available ( false ) ,
374+ timeFormat : dynamic . available ( "HH:mm" )
375375 } ;
376376 const builder = new CalendarPropsBuilder ( props ) ;
377377 const result = builder . build ( mockLocalizer , "en" ) ;
@@ -387,8 +387,8 @@ describe("CalendarPropsBuilder showEventDate hides multi-day formats", () => {
387387 it ( "blanks eventTimeRangeEndFormat when showEventDate=false" , ( ) => {
388388 const props = {
389389 ...customViewProps ,
390- showEventDate : dynamic ( false ) ,
391- timeFormat : dynamic ( "HH:mm" )
390+ showEventDate : dynamic . available ( false ) ,
391+ timeFormat : dynamic . available ( "HH:mm" )
392392 } ;
393393 const builder = new CalendarPropsBuilder ( props ) ;
394394 const result = builder . build ( mockLocalizer , "en" ) ;
@@ -404,8 +404,8 @@ describe("CalendarPropsBuilder showEventDate hides multi-day formats", () => {
404404 it ( "blanks eventTimeRangeFormat when showEventDate=false" , ( ) => {
405405 const props = {
406406 ...customViewProps ,
407- showEventDate : dynamic ( false ) ,
408- timeFormat : dynamic ( "HH:mm" )
407+ showEventDate : dynamic . available ( false ) ,
408+ timeFormat : dynamic . available ( "HH:mm" )
409409 } ;
410410 const builder = new CalendarPropsBuilder ( props ) ;
411411 const result = builder . build ( mockLocalizer , "en" ) ;
@@ -421,8 +421,8 @@ describe("CalendarPropsBuilder showEventDate hides multi-day formats", () => {
421421 it ( "preserves all time range formats when showEventDate=true" , ( ) => {
422422 const props = {
423423 ...customViewProps ,
424- showEventDate : dynamic ( true ) ,
425- timeFormat : dynamic ( "p" )
424+ showEventDate : dynamic . available ( true ) ,
425+ timeFormat : dynamic . available ( "p" )
426426 } ;
427427 const builder = new CalendarPropsBuilder ( props ) ;
428428 const result = builder . build ( mockLocalizer , "en" ) ;
0 commit comments