File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
TestCases.Shared.Tests/Tests/Issues Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public MainPage()
2727 class CarouselViewTestPage : ContentPage
2828 {
2929 CollectionView cv ;
30+ List < string > items ;
3031 public CarouselViewTestPage ( )
3132 {
3233 cv = new CollectionView
@@ -42,25 +43,25 @@ public CarouselViewTestPage()
4243 } ;
4344 label . SetBinding ( Label . TextProperty , new Binding ( "." ) ) ;
4445 label . SetBinding ( Label . AutomationIdProperty , new Binding ( "." ) ) ;
46+ var tapGestureRecognizer = new TapGestureRecognizer ( ) ;
47+ tapGestureRecognizer . Tapped += ( sender , e ) => LabelTapped ( ) ;
48+ label . GestureRecognizers . Add ( tapGestureRecognizer ) ;
4549 return label ;
4650 } )
4751 } ;
48- Content = cv ;
49- InitCV ( ) ;
50- }
5152
52- async void InitCV ( )
53- {
54- var items = new List < string > ( ) ;
53+ items = new List < string > ( ) ;
5554 for ( int i = 0 ; i < 10 ; i ++ )
5655 {
5756 items . Add ( $ "items{ i } ") ;
5857 }
59-
6058 cv . ItemsSource = items ;
61-
62- //give the cv time to draw the items
63- await Task . Delay ( 1000 ) ;
59+ Content = cv ;
60+ }
61+
62+ // Scrolls to last item then pops the page
63+ async void LabelTapped ( )
64+ {
6465
6566 cv . ScrollTo ( items . Count - 1 ) ;
6667
Original file line number Diff line number Diff line change 1- #if TEST_FAILS_ON_ANDROID // More information: https://github.com/dotnet/maui/issues/28640
21using NUnit . Framework ;
32using UITest . Appium ;
43using UITest . Core ;
@@ -18,8 +17,8 @@ public void Issue10222Test()
1817 {
1918 App . WaitForElement ( "goTo" ) ;
2019 App . Tap ( "goTo" ) ;
21- App . WaitForElement ( "items1" , timeout : TimeSpan . FromSeconds ( 1 ) ) ;
20+ App . WaitForElement ( "items1" ) ;
21+ App . Tap ( "items1" ) ;
2222 App . WaitForElement ( "goTo" , timeout : TimeSpan . FromSeconds ( 2 ) ) ;
2323 }
24- }
25- #endif
24+ }
You can’t perform that action at this time.
0 commit comments