Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Ignore tests that are currently irrelevant for UWP (#13630)
Browse files Browse the repository at this point in the history
* Ignore tests that are currently irrelevant for UWP

* - Fix ClickingQuicklyBetweenTopTabsBreaksContent on UWP
  • Loading branch information
PureWeen authored Feb 3, 2021
1 parent e27957f commit 48e434b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,57 @@ namespace Xamarin.Forms.Controls.Issues
[Category(UITestCategories.Shell)]
#endif
public class Issue12642 : TestShell
{
{
protected override void Init()
{
var page = AddTopTab("Tab 1");
var page2 = AddTopTab("Tab 2");

Label successLabel = new Label()
{
Text = "Success",
AutomationId = "Success",
IsVisible = false
};

page.Content = CreateContent();
page2.Content = CreateContent();
page2.Content = CreateContent(successLabel);

StackLayout CreateContent()
StackLayout CreateContent(Label label = null)
{
return new StackLayout()
StackLayout layout = null;
layout = new StackLayout()
{
Children =
{
new Label()
{
Text = "Click quickly between the tabs. If you stop clicking and the content is blank then the test has failed.",
AutomationId = "Success"
Text = "Click quickly between the tabs. If you stop clicking and the content is blank then the test has failed."
},
new Button()
{
Text = "Run Test Automated",
AutomationId = "AutomatedRun",
Command = new Command(async () =>
{
successLabel.IsVisible = false;
for(int i = 0; i < 20; i++)
{
this.CurrentItem = Items[0].Items[0].Items[0];
await Task.Delay(10);
this.CurrentItem = Items[0].Items[0].Items[1];
await Task.Delay(10);
}
successLabel.IsVisible = true;
})
}
}
};

if (label != null)
layout.Children.Add(label);

return layout;
}
}

Expand All @@ -64,9 +78,9 @@ StackLayout CreateContent()
public void ClickingQuicklyBetweenTopTabsBreaksContent()
{
RunningApp.Tap("AutomatedRun");
RunningApp.Tap("Success");
RunningApp.WaitForElement("Success");
RunningApp.Tap("AutomatedRun");
RunningApp.Tap("Success");
RunningApp.WaitForElement("Success");
}
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ namespace Xamarin.Forms.Controls.Issues
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 12848, "[Bug] CarouselView position resets when visibility toggled",
PlatformAffected.Android)]
#if UITEST
[NUnit.Framework.Category(UITestCategories.CarouselView)]
[NUnit.Framework.Category(UITestCategories.UwpIgnore)]
#endif
public partial class Issue12848 : TestContentPage
{
protected override void Init()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ protected override void OnAppearing()
Device.BeginInvokeOnMainThread(GarbageCollectionHelper.Collect);
}

#if UITEST

#if UITEST && __IOS__
[Test]
public void VerifyEditorTextChangeEventsAreFiring()
{
Expand Down

0 comments on commit 48e434b

Please sign in to comment.