This repository was 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
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0cff619
[Controls] Add repo for issue #4341
rmarinho f2937c8
[iOS] Clear the global closer delegate from ContextActionCell when di…
rmarinho fe1a0cb
[Controls] Rename to correct issue number
rmarinho b6bce7b
[Controls] Try fix opening context menu on iOS10
rmarinho 9348411
[Controls] Add more testing to #4314
rmarinho 58439b4
[iOS] Fix Globalcloser when no cell exists
rmarinho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4314.cs
This file contains hidden or 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,57 @@ | ||
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.ContextActions)] | ||
#endif | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Github, 4314, "When ListView items is removed and it is empty, Xamarin Forms crash", PlatformAffected.iOS)] | ||
public class Issue4314 : TestNavigationPage // or TestMasterDetailPage, etc ... | ||
{ | ||
const string Success = "Success"; | ||
#if !UITEST | ||
MessagesViewModel viewModel; | ||
protected override void Init() | ||
{ | ||
var page = new ContextActionsGallery(false, true, 2) { Title = "Swipe and delete both" }; | ||
viewModel = page.BindingContext as MessagesViewModel; | ||
viewModel.Messages.CollectionChanged += (s, e) => | ||
{ | ||
if (viewModel.Messages.Count == 0) | ||
{ | ||
Navigation.PushAsync(new ContentPage { Title = "Success", Content = new Label { Text = Success } }); | ||
} | ||
}; | ||
Navigation.PushAsync(page); | ||
} | ||
#else | ||
protected override void Init() | ||
{ | ||
} | ||
#endif | ||
#if UITEST && __IOS__ | ||
[Test] | ||
public void Issue4341Test() | ||
{ | ||
RunningApp.WaitForElement(c=> c.Marked("Email")); | ||
RunningApp.ActivateContextMenu("Subject Line 0"); | ||
RunningApp.WaitForElement("Delete"); | ||
RunningApp.Tap("Delete"); | ||
RunningApp.ActivateContextMenu("Subject Line 1"); | ||
RunningApp.Tap("Delete"); | ||
RunningApp.WaitForElement(c=> c.Marked(Success)); | ||
RunningApp.Back(); | ||
RunningApp.WaitForElement(c => c.Marked("Email")); | ||
RunningApp.SwipeRightToLeft(); | ||
} | ||
#endif | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only real change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's all this other stuff?