@@ -60,9 +60,6 @@ public void CornersRenderCorrectly(DatePickerCorners corners, string expected)
6060 [ Fact ]
6161 public void ComponentRendersWithAllParametersSetCorrectly ( )
6262 {
63- // Because Format is a static property, set it directly
64- TimePicker . Format = "MM-dd" ;
65-
6663 // Arrange & Act
6764 var cut = RenderComponent < TimePicker > ( parameters => parameters
6865 . AddUnmatched ( "data-test" , "my-value" )
@@ -75,13 +72,18 @@ public void ComponentRendersWithAllParametersSetCorrectly()
7572 . Add ( p => p . Time , "2025-04-24T15:30:00" )
7673 . Add ( p => p . Class , "my-class" )
7774 . Add ( p => p . Style , "color:red;" )
75+ . Add ( p=> p . Format , "MM-dd" )
7876 ) ;
7977
8078 // Assert full markup
8179 cut . MarkupMatches (
8280 @"<ix-time-picker data-test=""my-value"" id=""tp1""
8381 corners=""left""
8482 format=""MM-dd""
83+ hour-interval=""1""
84+ millisecond-interval=""1""
85+ minute-interval=""1""
86+ second-interval=""1""
8587 show-hour
8688 show-minutes
8789 show-seconds
@@ -91,9 +93,6 @@ public void ComponentRendersWithAllParametersSetCorrectly()
9193 class=""my-class"">
9294 </ix-time-picker>"
9395 ) ;
94-
95- // Reset static Format to default for other tests
96- TimePicker . Format = "yyyy/MM/dd" ;
9796 }
9897
9998 [ Fact ]
@@ -134,4 +133,4 @@ public async Task DoneAndTimeChanged_JsInvokable_InvokeEventCallbacks()
134133 private string ? DoneValue { get ; set ; }
135134 private string ? TimeChangedValue { get ; set ; }
136135 }
137- }
136+ }
0 commit comments