Skip to content

Commit

Permalink
[Testing] Enabling more UI Tests by removing platform specific condit…
Browse files Browse the repository at this point in the history
…ion - 4 (dotnet#27561)

* Enable Migrated Cases in All platforms

* Updated Issue20842 and UpdateCurrentItem.cs

* Updated Snapshots

* Updated Snapshots

* Update EditorScrollingWhenEnclosedInBorder.png

* Updated Changes

* Update EditorScrollingWhenEnclosedInBorder.png

* Update Issue20736.cs

* Updated Changes

* Updated changes

* Added Mac Snapshot
  • Loading branch information
HarishKumarSF4517 authored Feb 22, 2025
1 parent a564b78 commit 202e523
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 57 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue20736.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Issues.Issue20736"
xmlns:local="clr-namespace:Maui.Controls.Sample"
xmlns:ns="clr-namespace:Maui.Controls.Sample.Issues">

<Border Stroke="Red" HeightRequest="100">
<Editor AutomationId="editor"
<local:UITestEditor AutomationId="editor"
HeightRequest="100"
IsCursorVisible="False"
x:Name="editor"
Text="Line 1&#xa;Line 2&#xa;Line 3&#xa;Line 4&#xa;Line 5&#xa;Line 6&#xa;Line 7&#xa;">
</Editor>
</local:UITestEditor>
</Border>
</ContentPage>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ANDROID
#if TEST_FAILS_ON_WINDOWS //For more information : https://github.com/dotnet/maui/issues/24482
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand All @@ -19,12 +19,12 @@ public CarouselViewUpdateCurrentItem(TestDevice device)
[Category(UITestCategories.CarouselView)]
public void Issue9827Test()
{
App.WaitForNoElement("Pos:0");
App.WaitForElement("Pos:0");
App.WaitForElement("btnNext");
App.Click("btnNext");
App.WaitForNoElement("Item 1 with some additional text");
App.WaitForNoElement("Pos:1");
App.WaitForElement("Item 1 with some additional text");
App.WaitForElement("Pos:1");
}
}
}
#endif
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if WINDOWS
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -22,5 +21,4 @@ public void Issue10645Test()
VerifyScreenshot();
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if ANDROID || WINDOWS
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -24,4 +23,3 @@ public void ToolbarTextColorOnInteraction()
}
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if WINDOWS
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -25,5 +24,4 @@ public void Issue17694Test()
VerifyScreenshot();
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if IOS
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand All @@ -17,23 +16,15 @@ public Issue20439(TestDevice device) : base(device)
[Category(UITestCategories.Entry)]
public void ErrorShouldNotBeThrown()
{
try
{
_ = App.WaitForElement("GoToTest");
App.Tap("GoToTest");

_ = App.WaitForElement("entry");
App.Tap("entry");
App.Tap("button");
_ = App.WaitForElement("GoToTest");
App.Tap("GoToTest");

// The test passes if no crash is observed
App.FindElement("editor");
}
finally
{
Reset();
}
_ = App.WaitForElement("entry");
App.Tap("entry");
App.Tap("button");

// The test passes if no crash is observed
App.FindElement("editor");
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#if ANDROID || IOS

using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand Down Expand Up @@ -32,6 +30,4 @@ public void RefreshShouldNotChangeSize()

}
}
}

#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ public Issue20696(TestDevice device) : base(device)
{
}

#if IOS
[Test]
[Category(UITestCategories.Shell)]
#endif
public void FlyoutHeaderShouldBeResized()
{
_ = App.WaitForElement("GoToTest");
Expand All @@ -28,4 +26,4 @@ public void FlyoutHeaderShouldBeResized()
_ = App.WaitForElement("TestButton2");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if WINDOWS
using NUnit.Framework;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

Expand All @@ -18,19 +17,16 @@ public Issue20842(TestDevice device) : base(device)

[Test]
[Category(UITestCategories.CollectionView)]
public async Task VerifyCollectionViewItemsAfterScrolling()
public void VerifyCollectionViewItemsAfterScrolling()
{
App.WaitForElement(scrollUpButton);

App.WaitForElement(scrollDownButton);
App.Tap(scrollDownButton);
await Task.Delay(200);
App.WaitForElement(scrollUpButton);
App.Tap(scrollUpButton);
await Task.Delay(200);
App.Tap(scrollDownButton);
await Task.Delay(500);

App.WaitForElement(scrollDownButton);
App.Tap(scrollDownButton);
VerifyScreenshot();
}
}
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if ANDROID || IOS
#if ANDROID || IOS //This test case verifies "SetOrientationPotrait and Landscape works" exclusively on the Android and IOS platforms
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 202e523

Please sign in to comment.