Skip to content

Commit b0c1417

Browse files
[Testing] Enabling more UI Tests by removing platform specific condition - 16 (#27968)
* enable the test case for all platform * comment modification * comment modification * comment modification * added images * added snapshot * updated the changes * code changes
1 parent b11ac4b commit b0c1417

File tree

15 files changed

+17
-28
lines changed

15 files changed

+17
-28
lines changed
Loading

Diff for: src/Controls/tests/TestCases.HostApp/Issues/Issue2617.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected override void Init()
4343
nameLabel.SetBinding(Label.TextProperty, new Binding("."));
4444
var cell = new ViewCell
4545
{
46-
View = new Frame()
46+
View = new Border()
4747
{
4848
Content = nameLabel
4949
},
@@ -63,7 +63,7 @@ protected override void Init()
6363
nameLabel.SetBinding(Label.TextProperty, new Binding("."));
6464
var cell = new ViewCell
6565
{
66-
View = new Frame()
66+
View = new Border()
6767
{
6868
Content = nameLabel
6969
},

Diff for: src/Controls/tests/TestCases.HostApp/Issues/Issue2775.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ protected override void Init()
88
{
99
var list = new ListView
1010
{
11+
AutomationId = "TestReady",
1112
ItemsSource = GetList("Normal BG Blue"),
1213
BackgroundColor = Colors.Blue,
1314
ItemTemplate = new DataTemplate(typeof(NormalCell))
@@ -49,8 +50,7 @@ protected override void Init()
4950
};
5051

5152
Content = new StackLayout
52-
{
53-
AutomationId = "TestReady",
53+
{
5454
Children = {
5555
list,
5656
listTransparent,
Loading

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue16321.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if IOS
1+
#if IOS // This test case uses iOS-specific APIs and will only be executed on iOS platforms.
22
using NUnit.Framework;
33
using UITest.Appium;
44
using UITest.Core;

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue1799.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if IOS
2-
using NUnit.Framework;
1+
using NUnit.Framework;
32
using UITest.Appium;
43
using UITest.Core;
54

@@ -29,5 +28,4 @@ public void ListViewWithoutDataDoesNotCrash()
2928
App.WaitForElement(Success);
3029
}
3130
}
32-
}
33-
#endif
31+
}

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue1900.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if IOS
1+
#if TEST_FAILS_ON_WINDOWS //On Windows App crashes on CI, but it does not replicate locally. Adding failure for Windows to ensure CI stability.
22
using NUnit.Framework;
33
using UITest.Appium;
44
using UITest.Core;

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25724.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if IOS || MACCATALYST
1+
#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // Related Issue : https://github.com/dotnet/maui/issues/27959
22
using NUnit.Framework;
33
using UITest.Appium;
44
using UITest.Core;

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue2617.cs

+3-6
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ public Issue2617(TestDevice testDevice) : base(testDevice)
1717
[Test]
1818
[Category(UITestCategories.ListView)]
1919
[Category(UITestCategories.Compatibility)]
20-
[FailsOnAndroidWhenRunningOnXamarinUITest]
21-
[FailsOnIOSWhenRunningOnXamarinUITest]
22-
[FailsOnMacWhenRunningOnXamarinUITest]
23-
public async Task BindingToValuesTypesAndScrollingNoCrash()
20+
public void BindingToValuesTypesAndScrollingNoCrash()
2421
{
25-
await Task.Delay(4000);
26-
App.WaitForNoElement(Success);
22+
Thread.Sleep(5000);
23+
App.WaitForElement(Success);
2724
}
2825
}
2926
}

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue2775.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ public Issue2775(TestDevice testDevice) : base(testDevice)
1515
[Test]
1616
[Category(UITestCategories.ListView)]
1717
[Category(UITestCategories.Compatibility)]
18-
[FailsOnIOSWhenRunningOnXamarinUITest]
19-
[FailsOnMacWhenRunningOnXamarinUITest]
20-
[FailsOnWindowsWhenRunningOnXamarinUITest]
2118
public void Issue2775Test()
2219
{
2320
App.WaitForElement("TestReady");
24-
App.Screenshot("I am at Issue 2775");
25-
App.Screenshot("I see the Label");
21+
VerifyScreenshot();
2622
}
2723
}
2824
}

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue5354.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if ANDROID
1+
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // Related Issue : https://github.com/dotnet/maui/issues/27955, https://github.com/dotnet/maui/issues/27946
22
using Microsoft.Maui.TestCases.Tests;
33
using NUnit.Framework;
44
using NUnit.Framework.Legacy;

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue5724.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if ANDROID
1+
#if ANDROID // This test case only works on Android because Send Keys functionality is platform-specific and does not behave the same way on iOS, macOS, or Windows.
22
using NUnit.Framework;
33
using NUnit.Framework.Legacy;
44
using UITest.Appium;

Diff for: src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue7313.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if IOS
2-
using NUnit.Framework;
1+
using NUnit.Framework;
32
using UITest.Appium;
43
using UITest.Core;
54

@@ -22,5 +21,4 @@ public void RefreshControlTurnsOffSuccessfully()
2221
App.WaitForNoElement("RefreshControl");
2322
}
2423
}
25-
}
26-
#endif
24+
}
Loading
Loading

0 commit comments

Comments
 (0)