File tree Expand file tree Collapse file tree
TestCases.Shared.Tests/Tests/Issues Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ public class Issue33706 : ContentPage
77{
88 private readonly ActivityIndicator _activityIndicator ;
99 private readonly Label _statusLabel ;
10+ private readonly Label _resumedLabel ;
1011
1112 public Issue33706 ( )
1213 {
@@ -31,6 +32,12 @@ public Issue33706()
3132 HorizontalOptions = LayoutOptions . Center
3233 } ;
3334
35+ _resumedLabel = new Label
36+ {
37+ Text = "" ,
38+ AutomationId = "ResumedLabel"
39+ } ;
40+
3441 Content = new VerticalStackLayout
3542 {
3643 Padding = 20 ,
@@ -45,9 +52,14 @@ public Issue33706()
4552 } ,
4653 pickButton ,
4754 _activityIndicator ,
48- _statusLabel
55+ _statusLabel ,
56+ _resumedLabel
4957 }
5058 } ;
59+ this . Loaded += ( s , e ) =>
60+ {
61+ this . Window . Resumed += ( s , e ) => _resumedLabel . Text = "Resumed" ;
62+ } ;
5163 }
5264
5365 private async void OnPickMediaClicked ( object sender , EventArgs e )
Original file line number Diff line number Diff line change @@ -21,11 +21,9 @@ public void Issue33706Test()
2121 var initialStatus = App . FindElement ( "StatusLabel" ) . GetText ( ) ;
2222 Assert . That ( initialStatus , Is . EqualTo ( "Ready" ) , "Initial status should be 'Ready'" ) ;
2323 App . Tap ( "PickMediaButton" ) ;
24- Task . Delay ( 500 ) . Wait ( ) ;
2524 App . BackgroundApp ( ) ;
26- // Wait for app to background and resume
27- Task . Delay ( 500 ) . Wait ( ) ;
2825 App . ForegroundApp ( ) ;
26+ App . WaitForElement ( "ResumedLabel" ) ;
2927 App . WaitForElement ( "StatusLabel" ) ;
3028 App . WaitForElement ( "PickMediaButton" ) ;
3129 var finalStatus = App . FindElement ( "StatusLabel" ) . GetText ( ) ;
@@ -34,4 +32,4 @@ public void Issue33706Test()
3432 }
3533 }
3634}
37- #endif
35+ #endif
You can’t perform that action at this time.
0 commit comments