File tree Expand file tree Collapse file tree 4 files changed +25
-25
lines changed
TestCases.Android.Tests/snapshots/android
TestCases.Shared.Tests/Tests/Issues
TestCases.iOS.Tests/snapshots/ios Expand file tree Collapse file tree 4 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,33 @@ public Issue32223()
8080 AdultTemplate = adultTemplate
8181 } ;
8282
83+ Label label = new Label
84+ {
85+ Text = "" ,
86+ AutomationId = "ReorderedLabel"
87+ } ;
88+
89+
90+ collectionView . ReorderCompleted += ( s , e ) =>
91+ {
92+ label . Text = "Success" ;
93+ } ;
94+
8395 // --- CollectionView Setup ---
8496 collectionView . SetBinding ( ItemsView . ItemsSourceProperty , "People" ) ;
8597
8698 collectionView . ItemTemplate = selector ;
8799
88- Content = new Grid
89- {
90- Children = { collectionView }
91- } ;
100+ Grid grid = new Grid ( ) ;
101+ grid . RowDefinitions . Add ( new RowDefinition { Height = GridLength . Auto } ) ;
102+ grid . RowDefinitions . Add ( new RowDefinition { Height = GridLength . Auto } ) ;
103+ grid . Children . Add ( label ) ;
104+ grid . Children . Add ( collectionView ) ;
105+
106+ grid . SetRow ( label , 0 ) ;
107+ grid . SetRow ( collectionView , 1 ) ;
92108
109+ Content = grid ;
93110 }
94111}
95112
Original file line number Diff line number Diff line change @@ -11,30 +11,13 @@ public Issue32223(TestDevice testDevice) : base(testDevice)
1111 }
1212 public override string Issue => "[Android] CollectionView items do not reorder correctly when using an item DataTemplateSelector" ;
1313
14- [ Test , Order ( 1 ) ]
14+ [ Test ]
1515 [ Category ( UITestCategories . CollectionView ) ]
16- public void CanReorderWithItemDataTemplateSelector_1 ( )
16+ public void CanReorderWithItemDataTemplateSelector ( )
1717 {
1818 App . WaitForElement ( "ReorderableCollectionView" ) ;
1919 App . DragAndDrop ( "David" , "Charlie" ) ;
20- VerifyScreenshot ( ) ;
21- }
22-
23- [ Test , Order ( 2 ) ]
24- [ Category ( UITestCategories . CollectionView ) ]
25- public void CanReorderWithItemDataTemplateSelector_2 ( )
26- {
27- App . WaitForElement ( "ReorderableCollectionView" ) ;
28- App . DragAndDrop ( "David" , "Alice" ) ;
29- VerifyScreenshot ( ) ;
30- }
31-
32- [ Test , Order ( 3 ) ]
33- [ Category ( UITestCategories . CollectionView ) ]
34- public void CanReorderWithItemDataTemplateSelector_3 ( )
35- {
36- App . WaitForElement ( "ReorderableCollectionView" ) ;
37- App . DragAndDrop ( "Charlie" , "Alice" ) ;
38- VerifyScreenshot ( ) ;
20+ var expectedText = App . WaitForElement ( "ReorderedLabel" ) . GetText ( ) ;
21+ Assert . That ( expectedText , Is . EqualTo ( "Success" ) ) ;
3922 }
4023}
You can’t perform that action at this time.
0 commit comments