File tree Expand file tree Collapse file tree 4 files changed +16
-16
lines changed
tests/MaterialDesignThemes.UITests/WPF Expand file tree Collapse file tree 4 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -198,8 +198,8 @@ public async Task ComboBox_WithHintAndHelperText_RespectsPadding(string styleNam
198198 Rect ? hintCoordinates = await hint . GetCoordinates ( ) ;
199199 Rect ? helperTextCoordinates = await helperText . GetCoordinates ( ) ;
200200
201- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsBetween ( - tolerance , tolerance ) ;
202- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) ) . IsBetween ( - tolerance , tolerance ) ;
201+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
202+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
203203
204204 recorder . Success ( ) ;
205205 }
@@ -247,8 +247,8 @@ public async Task ComboBox_WithHintAndValidationError_RespectsPadding(string sty
247247 Rect ? hintCoordinates = await hint . GetCoordinates ( ) ;
248248 Rect ? errorViewerCoordinates = await errorViewer . GetCoordinates ( ) ;
249249
250- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsBetween ( - tolerance , tolerance ) ;
251- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) ) . IsBetween ( - tolerance , tolerance ) ;
250+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
251+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
252252
253253 recorder . Success ( ) ;
254254 }
Original file line number Diff line number Diff line change @@ -176,8 +176,8 @@ public async Task DatePicker_WithHintAndHelperText_RespectsPadding(string styleN
176176 Rect ? hintCoordinates = await hint . GetCoordinates ( ) ;
177177 Rect ? helperTextCoordinates = await helperText . GetCoordinates ( ) ;
178178
179- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
180- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
179+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
180+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
181181
182182 recorder . Success ( ) ;
183183 }
@@ -225,8 +225,8 @@ public async Task DatePicker_WithHintAndValidationError_RespectsPadding(string s
225225 Rect ? hintCoordinates = await hint . GetCoordinates ( ) ;
226226 Rect ? errorViewerCoordinates = await errorViewer . GetCoordinates ( ) ;
227227
228- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
229- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
228+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
229+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
230230
231231 recorder . Success ( ) ;
232232 }
Original file line number Diff line number Diff line change @@ -230,9 +230,9 @@ public async Task PasswordBox_WithHintAndHelperText_RespectsPadding(string style
230230 Rect ? helperTextCoordinates = await helperText . GetCoordinates ( ) ;
231231
232232 await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) )
233- . IsBetween ( 0 , tolerance ) ;
233+ . IsCloseTo ( 0 , tolerance ) ;
234234 await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) )
235- . IsBetween ( 0 , tolerance ) ;
235+ . IsCloseTo ( 0 , tolerance ) ;
236236
237237 recorder . Success ( ) ;
238238 }
@@ -290,9 +290,9 @@ public async Task PasswordBox_WithHintAndValidationError_RespectsPadding(string
290290 Rect ? errorViewerCoordinates = await errorViewer . GetCoordinates ( ) ;
291291
292292 await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) )
293- . IsBetween ( 0 , tolerance ) ;
293+ . IsCloseTo ( 0 , tolerance ) ;
294294 await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) )
295- . IsBetween ( 0 , tolerance ) ;
295+ . IsCloseTo ( 0 , tolerance ) ;
296296
297297 recorder . Success ( ) ;
298298 }
Original file line number Diff line number Diff line change @@ -481,8 +481,8 @@ public async Task TextBox_WithHintAndHelperText_RespectsPadding(string styleName
481481 Rect ? hintCoordinates = await hint . GetCoordinates ( ) ;
482482 Rect ? helperTextCoordinates = await helperText . GetCoordinates ( ) ;
483483
484- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
485- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
484+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
485+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - helperTextCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
486486
487487 recorder . Success ( ) ;
488488 }
@@ -530,8 +530,8 @@ public async Task TextBox_WithHintAndValidationError_RespectsPadding(string styl
530530 Rect ? hintCoordinates = await hint . GetCoordinates ( ) ;
531531 Rect ? errorViewerCoordinates = await errorViewer . GetCoordinates ( ) ;
532532
533- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
534- await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) ) . IsBetween ( 0 , tolerance ) ;
533+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - hintCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
534+ await Assert . That ( Math . Abs ( contentHostCoordinates . Value . Left - errorViewerCoordinates . Value . Left ) ) . IsCloseTo ( 0 , tolerance ) ;
535535
536536 recorder . Success ( ) ;
537537 }
You can’t perform that action at this time.
0 commit comments