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()
27
27
class CarouselViewTestPage : ContentPage
28
28
{
29
29
CollectionView cv ;
30
+ List < string > items ;
30
31
public CarouselViewTestPage ( )
31
32
{
32
33
cv = new CollectionView
@@ -42,25 +43,25 @@ public CarouselViewTestPage()
42
43
} ;
43
44
label . SetBinding ( Label . TextProperty , new Binding ( "." ) ) ;
44
45
label . SetBinding ( Label . AutomationIdProperty , new Binding ( "." ) ) ;
46
+ var tapGestureRecognizer = new TapGestureRecognizer ( ) ;
47
+ tapGestureRecognizer . Tapped += ( sender , e ) => LabelTapped ( ) ;
48
+ label . GestureRecognizers . Add ( tapGestureRecognizer ) ;
45
49
return label ;
46
50
} )
47
51
} ;
48
- Content = cv ;
49
- InitCV ( ) ;
50
- }
51
52
52
- async void InitCV ( )
53
- {
54
- var items = new List < string > ( ) ;
53
+ items = new List < string > ( ) ;
55
54
for ( int i = 0 ; i < 10 ; i ++ )
56
55
{
57
56
items . Add ( $ "items{ i } ") ;
58
57
}
59
-
60
58
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
+ {
64
65
65
66
cv . ScrollTo ( items . Count - 1 ) ;
66
67
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
2
1
using NUnit . Framework ;
3
2
using UITest . Appium ;
4
3
using UITest . Core ;
@@ -18,8 +17,8 @@ public void Issue10222Test()
18
17
{
19
18
App . WaitForElement ( "goTo" ) ;
20
19
App . Tap ( "goTo" ) ;
21
- App . WaitForElement ( "items1" , timeout : TimeSpan . FromSeconds ( 1 ) ) ;
20
+ App . WaitForElement ( "items1" ) ;
21
+ App . Tap ( "items1" ) ;
22
22
App . WaitForElement ( "goTo" , timeout : TimeSpan . FromSeconds ( 2 ) ) ;
23
23
}
24
- }
25
- #endif
24
+ }
You can’t perform that action at this time.
0 commit comments