File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
tests/MaterialDesignThemes.UITests/WPF/TextBoxes Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -585,6 +585,33 @@ await Wait.For(async() =>
585585
586586 recorder . Success ( ) ;
587587 }
588+
589+ [ Test ]
590+ [ Description ( "Issue 3914" ) ]
591+ public async Task TextBox_ClearButtonRemainsHidden_WhenInitiallyCollapsedAndMadeVisible ( )
592+ {
593+ await using var recorder = new TestRecorder ( App ) ;
594+
595+ var grid = await LoadXaml < Grid > ( $ """
596+ <Grid Margin="30">
597+ <TextBox Visibility="Collapsed"
598+ VerticalAlignment="Center"
599+ materialDesign:TextFieldAssist.HasClearButton="True">
600+ </TextBox>
601+ </Grid>
602+ """ ) ;
603+
604+ var textBox = await grid . GetElement < TextBox > ( "/TextBox" ) ;
605+
606+ await textBox . SetVisibility ( Visibility . Visible ) ;
607+
608+ var clearButton = await grid . GetElement < Button > ( "PART_ClearButton" ) ;
609+ Visibility clearButtonVisibility = await clearButton . GetVisibility ( ) ;
610+
611+ await Assert . That ( clearButtonVisibility ) . IsEqualTo ( Visibility . Collapsed ) ;
612+
613+ recorder . Success ( ) ;
614+ }
588615}
589616
590617public class NotEmptyValidationRule : ValidationRule
You can’t perform that action at this time.
0 commit comments