Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing] Added categories to Controls.AppiumTests #20642

Merged
merged 4 commits into from Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Controls/tests/UITests/Tests/BorderUITests.cs
@@ -1,4 +1,5 @@
using UITest.Appium;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.AppiumTests
Expand Down Expand Up @@ -26,6 +27,7 @@ protected override void FixtureTeardown()

// TODO: Enable this as a test once fully working
//[Test]
//[Category(UITestCategories.Border)]
public void BordersWithVariousShapes()
{
App.WaitForElement("TargetView");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/ButtonUITests.cs
Expand Up @@ -20,6 +20,7 @@ protected override void NavigateToGallery()
}

[Test]
[Category(UITestCategories.Button)]
public void Clicked()
{
var remote = new EventViewContainerRemote(UITestContext, Test.Button.Clicked);
Expand Down
2 changes: 2 additions & 0 deletions src/Controls/tests/UITests/Tests/CarouselViewUITests.cs
Expand Up @@ -26,6 +26,7 @@ protected override void FixtureTeardown()
}

[Test]
[Category(UITestCategories.CarouselView)]
public async Task CarouselViewSetPosition()
{
if (Device != TestDevice.Android)
Expand All @@ -42,6 +43,7 @@ public async Task CarouselViewSetPosition()
}

[Test]
[Category(UITestCategories.CarouselView)]
public void CarouselViewGoToNextCurrentItem()
{
if (Device != TestDevice.Android)
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/CheckBoxUITests.cs
Expand Up @@ -18,6 +18,7 @@ protected override void NavigateToGallery()
}

[Test]
[Category(UITestCategories.CheckBox)]
public override void _IsEnabled()
{
if (Device == TestDevice.Mac ||
Expand Down
6 changes: 6 additions & 0 deletions src/Controls/tests/UITests/Tests/DragAndDropUITests.cs
Expand Up @@ -27,6 +27,7 @@ protected override void FixtureTeardown()
}

[Test]
[Category(UITestCategories.Gestures)]
public void DragEvents()
{
App.WaitForElement("TargetView");
Expand All @@ -51,6 +52,7 @@ public void DragEvents()
}

[Test]
[Category(UITestCategories.Gestures)]
public void DragAndDropBetweenLayouts()
{
App.WaitForElement("TargetView");
Expand Down Expand Up @@ -80,6 +82,7 @@ public void DragAndDropBetweenLayouts()
}

[Test]
[Category(UITestCategories.Gestures)]
public void PlatformDragEventArgs()
{
App.WaitForElement("TargetView");
Expand Down Expand Up @@ -164,6 +167,7 @@ public void PlatformDragEventArgs()
}

[Test]
[Category(UITestCategories.Gestures)]
public void DragStartEventCoordinates()
{
App.WaitForElement("TargetView");
Expand Down Expand Up @@ -197,6 +201,7 @@ public void DragStartEventCoordinates()
}

[Test]
[Category(UITestCategories.Gestures)]
public void DragEventCoordinates()
{
App.WaitForElement("TargetView");
Expand Down Expand Up @@ -235,6 +240,7 @@ public void DragEventCoordinates()
}

[Test]
[Category(UITestCategories.Gestures)]
public void DropEventCoordinates()
{
App.WaitForElement("TargetView");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/EditorUITests.cs
Expand Up @@ -18,6 +18,7 @@ protected override void NavigateToGallery()
}

[Test]
[Category(UITestCategories.Gestures)]
public override void _IsEnabled()
{
if (Device == TestDevice.Mac ||
Expand Down
Expand Up @@ -26,6 +26,7 @@ protected override void FixtureTeardown()
}

[Test]
[Category(UITestCategories.Gestures)]
public void PointerGestureTest()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.iOS },
Expand All @@ -45,6 +46,7 @@ public void PointerGestureTest()
}

[Test]
[Category(UITestCategories.Gestures)]
public void DoubleTap()
{
App.WaitForElement("TargetView");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue12211.cs
Expand Up @@ -15,6 +15,7 @@ public Issue12211(TestDevice device) : base(device)
public override string Issue => "[Android] BoxView Opacity not working";

[Test]
[Category(UITestCategories.BoxView)]
public void WhenChangingBoxViewOpacityThenValueIsCorrectlySet()
{
App.WaitForElement(buttonId);
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue14257.cs
Expand Up @@ -11,6 +11,7 @@ public class Issue14257 : _IssuesUITest
public override string Issue => "VerticalStackLayout inside Scrollview: Button at the bottom not clickable on IOS";

[Test]
[Category(UITestCategories.ScrollView)]
public void ResizeScrollViewAndTapButtonTest()
{
// Tapping the Resize button will change the height of the ScrollView content
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue14557.cs
Expand Up @@ -10,6 +10,7 @@ class Issue14557 : _IssuesUITest
public override string Issue => "CollectionView header and footer not displaying on Windows";

[Test]
[Category(UITestCategories.CollectionView)]
public void HeaderAndFooterRender()
{
App.WaitForElement("collectionView");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue15330.cs
Expand Up @@ -13,6 +13,7 @@ public Issue15330(TestDevice device)
public override string Issue => "Grid wrong Row height";

[Test]
[Category(UITestCategories.Layout)]
public void Issue15330Test()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.iOS },
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue15357.cs
Expand Up @@ -15,6 +15,7 @@ public Issue15357(TestDevice device) : base(device)
public override string Issue => "IsVisible binding not showing items again if Shadow is set";

[Test]
[Category(UITestCategories.ListView)]
public void WhenTapButtonThenListViewsChangesVisibility()
{
App.WaitForElement(buttonId);
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue15826.cs
Expand Up @@ -15,6 +15,7 @@ public Issue15826(TestDevice device) : base(device)
public override string Issue => "ListView visibility doesn't work well";

[Test]
[Category(UITestCategories.ListView)]
public void WhenTapButtonThenListViewsChangesVisibility()
{
App.WaitForElement(buttonId);
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16094.cs
Expand Up @@ -13,6 +13,7 @@ public Issue16094(TestDevice device)
public override string Issue => "Shadows don't respect control shape";

[Test]
[Category(UITestCategories.Editor)]
public void Issue16094Test()
{
App.WaitForElement("EditorControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16320.cs
Expand Up @@ -13,6 +13,7 @@ public Issue16320(TestDevice device)
public override string Issue => "Adding an item to a CollectionView with linear layout crashes";

[Test]
[Category(UITestCategories.CollectionView)]
public void Issue16320Test()
{
// TODO: It looks like this test has never passed on Android, failing with
Expand Down
2 changes: 2 additions & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16321.cs
Expand Up @@ -11,6 +11,7 @@ public class Issue16321 : _IssuesUITest
public override string Issue => "Alerts Open on top of current presented view";

[Test]
[Category(UITestCategories.DisplayAlert)]
public void OpenAlertWithModals()
{
this.IgnoreIfPlatforms(new[]
Expand All @@ -23,6 +24,7 @@ public void OpenAlertWithModals()
}

[Test]
[Category(UITestCategories.DisplayAlert)]
public void OpenAlertWithNewUIWindow()
{
this.IgnoreIfPlatforms(new[]
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16386.cs
Expand Up @@ -14,6 +14,7 @@ public Issue16386(TestDevice device)
public override string Issue => "Process the hardware enter key as \"Done\"";

[Test]
[Category(UITestCategories.Entry)]
public void HittingEnterKeySendsDone()
{
this.IgnoreIfPlatforms(new[]
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16499.cs
Expand Up @@ -13,6 +13,7 @@ public Issue16499(TestDevice device) : base(device)
public override string Issue => "Crash when using NavigationPage.TitleView and Restarting App";

[Test]
[Category(UITestCategories.Navigation)]
public void AppDoesntCrashWhenReusingSameTitleView()
{
App.WaitForElement("SuccessLabel");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16561.cs
Expand Up @@ -21,6 +21,7 @@ public Issue16561(TestDevice device) : base(device)
public override string Issue => "Quick single taps on Android have wrong second tap location";

[Test]
[Category(UITestCategories.Label)]
public void TapTwoPlacesQuickly()
{
// https://github.com/dotnet/maui/issues/17435
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue16787.cs
Expand Up @@ -13,6 +13,7 @@ public Issue16787(TestDevice device) : base(device)
public override string Issue => "CollectionView runtime binding errors when loading the ItemSource asynchronously";

[Test]
[Category(UITestCategories.CollectionView)]
public void CollectionViewBindingContextOnlyChangesOnce()
{
Assert.AreEqual("1", App.WaitForElement("LabelBindingCount").GetText());
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/tests/UITests/Tests/Issues/Issue17022.cs
Expand Up @@ -14,7 +14,8 @@ public Issue17022(TestDevice device)

// TODO: Add shell navigation bar tests when we can call shell in UITest
[Test]
[TestCase("NewNavigationPageButton", false)]
[Category(UITestCategories.Navigation)]
[TestCase("NewNavigationPageButton", false)]
[TestCase("NewNavigationPageTransparentButton", false)]
[TestCase("NewNavigationPageTranslucentButton", false)]
[TestCase("NewNavigationPageTransparentTranslucentButton", false)]
Expand Down Expand Up @@ -69,7 +70,6 @@ public void Issue17022Test(string testButtonID, bool isTopOfScreen, bool require
{
App.WaitForElement("PopPageButton").Click();
}

}
}
}
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17347.cs
Expand Up @@ -13,6 +13,7 @@ public Issue17347(TestDevice device) : base(device)
public override string Issue => "Setting a new TitleView on an already created page crashes iOS";

[Test]
[Category(UITestCategories.Page)]
public void AppDoesntCrashWhenSettingNewTitleViewOnExistingPage()
{
try
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17366.cs
Expand Up @@ -13,6 +13,7 @@ public Issue17366(TestDevice device) : base(device)
public override string Issue => "Wrong gray color using transparent in iOS gradients";

[Test]
[Category(UITestCategories.Brush)]
public void Issue17366Test()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Mac, TestDevice.Windows },
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17400.cs
Expand Up @@ -13,6 +13,7 @@ public Issue17400(TestDevice device)
public override string Issue => "CollectionView wrong Layout";

[Test]
[Category(UITestCategories.CollectionView)]
public void Issue17400Test()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.iOS, TestDevice.Android, TestDevice.Mac },
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17453.cs
Expand Up @@ -11,6 +11,7 @@ class Issue17453 : _IssuesUITest
public override string Issue => "Clear Entry text tapping the clear button not working";

[Test]
[Category(UITestCategories.Entry)]
public void EntryClearButtonWorksEntryDoesntClearWhenNotClickingOnClear()
{
// https://github.com/dotnet/maui/issues/17453
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17490.cs
Expand Up @@ -13,6 +13,7 @@ public Issue17490(TestDevice device) : base(device)
public override string Issue => "Crash using Pinvoke.SetParent to create Window as Child";

[Test]
[Category(UITestCategories.Window)]
public void AppDoesntCrashWhenOpeningWinUIWindowParentedToCurrentWindow()
{
this.IgnoreIfPlatforms(new[]
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17610.cs
Expand Up @@ -16,6 +16,7 @@ public Issue17610(TestDevice device) : base(device)
public override string Issue => "Cancelling Refresh With Slow Scroll Leaves Refresh Icon Visible";

[Test]
[Category(UITestCategories.RefreshView)]
public void RefreshIconDisappearsWhenUserCancelsRefreshByScrollingBackUp()
{
this.IgnoreIfPlatforms(new[]
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue17789.cs
Expand Up @@ -13,6 +13,7 @@ public Issue17789(TestDevice device) : base(device)
public override string Issue => "ContentPage BackgroundImageSource not working";

[Test]
[Category(UITestCategories.Page)]
public void ContentPageBackgroundImageSourceWorks()
{
App.WaitForElement("WaitForStubControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18111.cs
Expand Up @@ -13,6 +13,7 @@ public Issue18111(TestDevice device) : base(device)
public override string Issue => "Setting MaximumTrackColor on Slider has no effect";

[Test]
[Category(UITestCategories.Slider)]
public void SettingMaximumTrackColorOnSliderWorks()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Windows }, "Regression test validating the design differences between iOS and Mac specifically");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18282.cs
Expand Up @@ -11,6 +11,7 @@ class Issue18282 : _IssuesUITest
public override string Issue => "The editor placeholder can't able to changed, It's default placed at center";

[Test]
[Category(UITestCategories.Editor)]
public void EditorPlaceholderPosition()
{
this.IgnoreIfPlatforms(new[]
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18617.cs
Expand Up @@ -13,6 +13,7 @@ public Issue18617(TestDevice device)
public override string Issue => "Button Command CanExecute can disable the control";

[Test]
[Category(UITestCategories.Button)]
public void CommandCanExecuteDisableButton()
{
App.WaitForElement("WaitForStubControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18623.cs
Expand Up @@ -13,6 +13,7 @@ public Issue18623(TestDevice device) : base(device)
public override string Issue => "Entry IsPassword obscure the text";

[Test]
[Category(UITestCategories.Entry)]
public async Task EntryIsPasswordObscureText()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.iOS },
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18645.cs
Expand Up @@ -13,6 +13,7 @@ public Issue18645(TestDevice device) : base(device)
public override string Issue => "Editor MaxLength property works as expected";

[Test]
[Category(UITestCategories.Editor)]
public void EditorMaxLengthWorks()
{
App.WaitForElement("WaitForStubControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18647.cs
Expand Up @@ -14,6 +14,7 @@ public Issue18647(TestDevice device) : base(device)
public override string Issue => "Editor TextTransform property works as expected";

[Test]
[Category(UITestCategories.Editor)]
public void EditorTextTransformWorks()
{
App.WaitForElement("WaitForStubControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18675.cs
Expand Up @@ -13,6 +13,7 @@ public Issue186751(TestDevice device) : base(device)
public override string Issue => "Editor IsReadOnly property prevent from modifying the text";

[Test]
[Category(UITestCategories.Editor)]
public async Task EditorIsReadOnlyPreventModify()
{
App.WaitForElement("WaitForStubControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18706.cs
Expand Up @@ -11,6 +11,7 @@ public class Issue18706 : _IssuesUITest
public override string Issue => "Editor Background works";

[Test]
[Category(UITestCategories.Editor)]
public void EditorBackgroundWorks()
{
App.WaitForElement("WaitForStubControl");
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18740.cs
Expand Up @@ -13,6 +13,7 @@ public Issue18740(TestDevice device)
public override string Issue => "Virtual keyboard appears with focus on Entry";

[Test]
[Category(UITestCategories.Entry)]
[TestCase("Entry")]
[TestCase("Editor")]
[TestCase("SearchBar")]
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18751.cs
Expand Up @@ -13,6 +13,7 @@ public Issue18751(TestDevice device) : base(device)
public override string Issue => "Can scroll CollectionView inside RefreshView";

[Test]
[Category(UITestCategories.CollectionView)]
[Ignore("This test is failing on iOS17, https://github.com/dotnet/maui/issues/20582")]
public async Task Issue18751Test()
{
Expand Down
1 change: 1 addition & 0 deletions src/Controls/tests/UITests/Tests/Issues/Issue18754.cs
Expand Up @@ -11,6 +11,7 @@ public class Issue18754 : _IssuesUITest
public override string Issue => "[D9] Editor IsReadOnly works";

[Test]
[Category(UITestCategories.Editor)]
public void Issue18754Test()
{
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Mac, TestDevice.Windows },
Expand Down