This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
5 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue5793.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#if UITEST | ||
using Xamarin.Forms.Core.UITests; | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
#if UITEST | ||
[Category(UITestCategories.CollectionView)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 5793, "[CollectionView/ListView] Not listening for Reset command", | ||
PlatformAffected.iOS | PlatformAffected.Android)] | ||
class Issue5793 : TestNavigationPage | ||
{ | ||
protected override void Init() | ||
{ | ||
#if APP | ||
Device.SetFlags(new List<string>(Device.Flags ?? new List<string>()) { "CollectionView_Experimental" }); | ||
|
||
PushAsync(new GalleryPages.CollectionViewGalleries.ObservableCollectionResetGallery()); | ||
#endif | ||
} | ||
|
||
#if UITEST | ||
[Test] | ||
public void Reset() | ||
{ | ||
RunningApp.WaitForElement("Reset"); | ||
|
||
// Verify the item is there | ||
RunningApp.WaitForElement("cover1.jpg, 0"); | ||
|
||
// Clear the collection | ||
RunningApp.Tap("Reset"); | ||
|
||
// Verify the item is gone | ||
RunningApp.WaitForNoElement("cover1.jpg, 0"); | ||
} | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters