@@ -9,70 +9,37 @@ public async Task SameHeightWithDefaultStyle()
9
9
{
10
10
await using var recorder = new TestRecorder ( App ) ;
11
11
12
- // TODO: Remove controls from here as they adopt the new SmartHint approach
13
- var stackPanel = await LoadXaml < StackPanel > ( """
14
- <StackPanel>
15
- <DatePicker />
16
- </StackPanel>
17
- """ ) ;
18
-
19
- await GetHeight ( stackPanel , "DatePicker" ) ;
20
-
21
- recorder . Success ( ) ;
22
- }
23
-
24
- [ Fact ]
25
- public async Task SameHeightWithDefaultStyle_PostSmartHintRefactor ( )
26
- {
27
- await using var recorder = new TestRecorder ( App ) ;
28
-
29
- // TODO: Add controls here as they adopt the new SmartHint approach. Once all controls have migrated, collapse into a single test with the old name.
30
12
var stackPanel = await LoadXaml < StackPanel > ( """
31
13
<StackPanel>
32
14
<TextBox />
33
15
<PasswordBox />
34
16
<ComboBox IsEditable="True" />
17
+ <DatePicker />
35
18
<materialDesign:TimePicker />
36
19
</StackPanel>
37
20
""" ) ;
38
21
39
22
double height = await GetHeight ( stackPanel , "TextBox" ) ;
40
23
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" ) , Precision ) ;
41
24
Assert . Equal ( height , await GetHeight ( stackPanel , "ComboBox" ) , Precision ) ;
25
+ Assert . Equal ( height , await GetHeight ( stackPanel , "DatePicker" ) , Precision ) ;
42
26
Assert . Equal ( height , await GetHeight ( stackPanel , "TimePicker" ) , Precision ) ;
43
27
44
28
recorder . Success ( ) ;
45
29
}
46
30
47
- [ Fact ]
31
+ [ Fact ]
48
32
public async Task SameHeightWithFloatingHintStyle ( )
49
33
{
50
34
await using var recorder = new TestRecorder ( App ) ;
51
35
52
- // TODO: Remove controls from here as they adopt the new SmartHint approach
53
- var stackPanel = await LoadXaml < StackPanel > ( """
54
- <StackPanel>
55
- <DatePicker Style="{StaticResource MaterialDesignFloatingHintDatePicker}" materialDesign:HintAssist.Hint="Hint" />
56
- </StackPanel>
57
- """ ) ;
58
-
59
- await GetHeight ( stackPanel , "DatePicker" ) ;
60
-
61
- recorder . Success ( ) ;
62
- }
63
-
64
- [ Fact ]
65
- public async Task SameHeightWithFloatingHintStyle_PostSmartHintRefactor ( )
66
- {
67
- await using var recorder = new TestRecorder ( App ) ;
68
-
69
- // TODO: Add controls here as they adopt the new SmartHint approach. Once all controls have migrated, collapse into a single test with the old name.
70
36
var stackPanel = await LoadXaml < StackPanel > ( """
71
37
<StackPanel>
72
38
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}" materialDesign:HintAssist.Hint="Hint" />
73
39
<PasswordBox Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" materialDesign:HintAssist.Hint="Hint" />
74
40
<PasswordBox x:Name="RevealPasswordBox" Style="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}" materialDesign:HintAssist.Hint="Hint" />
75
41
<ComboBox IsEditable="True" Style="{StaticResource MaterialDesignFloatingHintComboBox}" materialDesign:HintAssist.Hint="Hint" />
42
+ <DatePicker Style="{StaticResource MaterialDesignFloatingHintDatePicker}" materialDesign:HintAssist.Hint="Hint" />
76
43
<materialDesign:TimePicker Style="{StaticResource MaterialDesignFloatingHintTimePicker}" materialDesign:HintAssist.Hint="Hint" />
77
44
</StackPanel>
78
45
""" ) ;
@@ -81,6 +48,7 @@ public async Task SameHeightWithFloatingHintStyle_PostSmartHintRefactor()
81
48
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" ) , Precision ) ;
82
49
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" , "RevealPasswordBox" ) , Precision ) ;
83
50
Assert . Equal ( height , await GetHeight ( stackPanel , "ComboBox" ) , Precision ) ;
51
+ Assert . Equal ( height , await GetHeight ( stackPanel , "DatePicker" ) , Precision ) ;
84
52
Assert . Equal ( height , await GetHeight ( stackPanel , "TimePicker" ) , Precision ) ;
85
53
86
54
recorder . Success ( ) ;
@@ -91,30 +59,13 @@ public async Task SameHeightWithFilledStyle()
91
59
{
92
60
await using var recorder = new TestRecorder ( App ) ;
93
61
94
- // TODO: Remove controls from here as they adopt the new SmartHint approach
95
- var stackPanel = await LoadXaml < StackPanel > ( """
96
- <StackPanel>
97
- <DatePicker Style="{StaticResource MaterialDesignFilledDatePicker}" materialDesign:HintAssist.Hint="Hint" />
98
- </StackPanel>
99
- """ ) ;
100
-
101
- await GetHeight ( stackPanel , "DatePicker" ) ;
102
-
103
- recorder . Success ( ) ;
104
- }
105
-
106
- [ Fact ]
107
- public async Task SameHeightWithFilledStyle_PostSmartHintRefactor ( )
108
- {
109
- await using var recorder = new TestRecorder ( App ) ;
110
-
111
- // TODO: Add controls here as they adopt the new SmartHint approach. Once all controls have migrated, collapse into a single test with the old name.
112
62
var stackPanel = await LoadXaml < StackPanel > ( """
113
63
<StackPanel>
114
64
<TextBox Style="{StaticResource MaterialDesignFilledTextBox}" materialDesign:HintAssist.Hint="Hint" />
115
65
<PasswordBox Style="{StaticResource MaterialDesignFilledPasswordBox}" materialDesign:HintAssist.Hint="Hint" />
116
66
<PasswordBox x:Name="RevealPasswordBox" Style="{StaticResource MaterialDesignFilledRevealPasswordBox}" materialDesign:HintAssist.Hint="Hint" />
117
67
<ComboBox IsEditable="True" Style="{StaticResource MaterialDesignFilledComboBox}" materialDesign:HintAssist.Hint="Hint" />
68
+ <DatePicker Style="{StaticResource MaterialDesignFilledDatePicker}" materialDesign:HintAssist.Hint="Hint" />
118
69
<materialDesign:TimePicker Style="{StaticResource MaterialDesignFilledTimePicker}" materialDesign:HintAssist.Hint="Hint" />
119
70
</StackPanel>
120
71
""" ) ;
@@ -123,6 +74,7 @@ public async Task SameHeightWithFilledStyle_PostSmartHintRefactor()
123
74
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" ) , Precision ) ;
124
75
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" , "RevealPasswordBox" ) , Precision ) ;
125
76
Assert . Equal ( height , await GetHeight ( stackPanel , "ComboBox" ) , Precision ) ;
77
+ Assert . Equal ( height , await GetHeight ( stackPanel , "DatePicker" ) , Precision ) ;
126
78
Assert . Equal ( height , await GetHeight ( stackPanel , "TimePicker" ) , Precision ) ;
127
79
128
80
recorder . Success ( ) ;
@@ -133,30 +85,13 @@ public async Task SameHeightWithOutlinedStyle()
133
85
{
134
86
await using var recorder = new TestRecorder ( App ) ;
135
87
136
- // TODO: Remove controls from here as they adopt the new SmartHint approach
137
- var stackPanel = await LoadXaml < StackPanel > ( """
138
- <StackPanel>
139
- <DatePicker Style="{StaticResource MaterialDesignOutlinedDatePicker}" materialDesign:HintAssist.Hint="Hint" />
140
- </StackPanel>
141
- """ ) ;
142
-
143
- await GetHeight ( stackPanel , "DatePicker" ) ;
144
-
145
- recorder . Success ( ) ;
146
- }
147
-
148
- [ Fact ]
149
- public async Task SameHeightWithOutlinedStyle_PostSmartHintRefactor ( )
150
- {
151
- await using var recorder = new TestRecorder ( App ) ;
152
-
153
- // TODO: Add controls here as they adopt the new SmartHint approach. Once all controls have migrated, collapse into a single test with the old name.
154
88
var stackPanel = await LoadXaml < StackPanel > ( """
155
89
<StackPanel>
156
90
<TextBox Style="{StaticResource MaterialDesignOutlinedTextBox}" materialDesign:HintAssist.Hint="Hint" />
157
91
<PasswordBox Style="{StaticResource MaterialDesignOutlinedPasswordBox}" materialDesign:HintAssist.Hint="Hint" />
158
92
<PasswordBox x:Name="RevealPasswordBox" Style="{StaticResource MaterialDesignOutlinedRevealPasswordBox}" materialDesign:HintAssist.Hint="Hint" />
159
93
<ComboBox IsEditable="True" Style="{StaticResource MaterialDesignOutlinedComboBox}" />
94
+ <DatePicker Style="{StaticResource MaterialDesignOutlinedDatePicker}" materialDesign:HintAssist.Hint="Hint" />
160
95
<materialDesign:TimePicker Style="{StaticResource MaterialDesignOutlinedTimePicker}" materialDesign:HintAssist.Hint="Hint" />
161
96
</StackPanel>
162
97
""" ) ;
@@ -165,6 +100,7 @@ public async Task SameHeightWithOutlinedStyle_PostSmartHintRefactor()
165
100
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" ) , Precision ) ;
166
101
Assert . Equal ( height , await GetHeight ( stackPanel , "PasswordBox" , "RevealPasswordBox" ) , Precision ) ;
167
102
Assert . Equal ( height , await GetHeight ( stackPanel , "ComboBox" ) , Precision ) ;
103
+ Assert . Equal ( height , await GetHeight ( stackPanel , "DatePicker" ) , Precision ) ;
168
104
Assert . Equal ( height , await GetHeight ( stackPanel , "TimePicker" ) , Precision ) ;
169
105
170
106
recorder . Success ( ) ;
0 commit comments