Skip to content

Commit 70cc3dd

Browse files
nivetha-nagalingamAnandhan Rajagopal
andauthored
[Testing] Enabling CV related UITests in Appium (#27012)
* Verified the failures on iOS that were associated with the CV-related issues * Verified the five issues failures on iOS that were associated with the CV-related * Feedback addressed * Updated the CollectionViewItemsUpdatingScrollModeUITests * Updated the modified tests * removed unwanted changes * Added iOS and android images * Added the snapshots and updated the CollectionViewTabbedPageUITests --------- Co-authored-by: Anandhan Rajagopal <97146406+anandhan-rajagopal@users.noreply.github.com>
1 parent 246b5df commit 70cc3dd

22 files changed

Lines changed: 51 additions & 100 deletions
16.2 KB
Loading
43.9 KB
Loading
124 KB
Loading

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/CollectionViewUITests.CollectionViewTabbedPage.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,8 @@ public class CollectionViewTabbedPageUITests : _IssuesUITest
99
const string Add1 = "Add1";
1010
const string Add2 = "Add2";
1111
const string Success = "Success";
12-
#if ANDROID
13-
const string FirstPage = "7700 FIRST PAGE";
14-
const string Tab2 = "TAB2";
15-
const string Tab3 = "TAB3";
16-
#else
17-
const string FirstPage = "7700 First Page";
1812
const string Tab2 = "Tab2";
1913
const string Tab3 = "Tab3";
20-
#endif
2114
protected override bool ResetAfterEachTest => true;
2215

2316
public CollectionViewTabbedPageUITests(TestDevice device)
@@ -32,19 +25,17 @@ public void AddingItemToUnviewedCollectionViewShouldNotCrash()
3225
{
3326
App.WaitForElement(Add1);
3427
App.Tap(Add1);
35-
App.WaitForElement(Tab2);
36-
App.Tap(Tab2);
28+
App.TapTab(Tab2);
3729
App.WaitForElementTillPageNavigationSettled(Success);
3830
}
3931

4032
[Test]
4133
[Category(UITestCategories.CollectionView)]
42-
public void AddingGroupToUnviewedGroupedCollectionViewShouldNotCrash()
34+
public void AddingGroupToUnviewedGroupedCollectionViewShouldNotCrash()
4335
{
4436
App.WaitForElement(Add2);
4537
App.Tap(Add2);
46-
App.WaitForElement(Tab3);
47-
App.Tap(Tab3);
38+
App.TapTab(Tab3);
4839
App.WaitForElementTillPageNavigationSettled(Success);
4940
}
5041
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/CollectionViewUITests.EmptyViewNoCrash.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ public EmptyViewNoCrashUITests(TestDevice device)
1616
// EmptyViewShouldNotCrash (src\Compatibility\ControlGallery\src\Issues.Shared\Issue9196.xaml.cs)
1717
[Test]
1818
[Category(UITestCategories.CollectionView)]
19-
[FailsOnIOSWhenRunningOnXamarinUITest("This test is failing, likely due to product issue")]
20-
[FailsOnMacWhenRunningOnXamarinUITest("This test is failing, likely due to product issue")]
21-
[FailsOnWindowsWhenRunningOnXamarinUITest("This test is failing, likely due to product issue")]
2219
public void EmptyViewShouldNotCrash()
2320
{
24-
App.WaitForNoElement("Success");
21+
App.WaitForElement("Success");
2522
}
2623
}
2724
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue10454.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@ public Issue10454(TestDevice testDevice) : base(testDevice)
1616

1717
[Test]
1818
[Category(UITestCategories.CollectionView)]
19-
[Category(UITestCategories.Compatibility)]
20-
[FailsOnIOSWhenRunningOnXamarinUITest]
21-
[FailsOnMacWhenRunningOnXamarinUITest]
2219
public void ChildAddedShouldFire()
2320
{
24-
App.WaitForNoElement(Success);
21+
App.WaitForElement(Success);
2522
}
2623
}
2724
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12374.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NUnit.Framework;
1+
#if TEST_FAILS_ON_WINDOWS // EmptyView is not accessible through the test framework on Windows.
2+
using NUnit.Framework;
23
using UITest.Appium;
34
using UITest.Core;
45

@@ -14,16 +15,17 @@ public Issue12374(TestDevice testDevice) : base(testDevice)
1415

1516
[Test]
1617
[Category(UITestCategories.CollectionView)]
17-
[Category(UITestCategories.Compatibility)]
18-
[FailsOnIOSWhenRunningOnXamarinUITest]
19-
[FailsOnMacWhenRunningOnXamarinUITest]
2018
public void Issue12374Test()
2119
{
2220
App.WaitForElement("TestReady");
21+
App.WaitForElement("RemoveItems");
2322
App.Tap("RemoveItems");
23+
App.WaitForElement("AddItems");
2424
App.Tap("AddItems");
25+
App.WaitForElement("RemoveItems");
2526
App.Tap("RemoveItems");
26-
App.Screenshot("CollectionViewWithEmptyView");
27+
App.WaitForElement("Empty View");
2728
}
2829
}
29-
}
30+
}
31+
#endif

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue12714.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ public Issue12714(TestDevice testDevice) : base(testDevice)
1717

1818
[Test]
1919
[Category(UITestCategories.CollectionView)]
20-
[Category(UITestCategories.Compatibility)]
21-
[FailsOnIOSWhenRunningOnXamarinUITest]
22-
[FailsOnMacWhenRunningOnXamarinUITest]
20+
2321
public void InitiallyInvisbleCollectionViewSurvivesiOSLayoutNonsense()
2422
{
2523
App.WaitForElement(Show);
2624
App.Tap(Show);
27-
App.WaitForNoElement(Success);
25+
App.WaitForElement(Success);
2826
}
2927
}
3028
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue13126_2.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ public Issue13126_2(TestDevice testDevice) : base(testDevice)
1616

1717
[Test]
1818
[Category(UITestCategories.CollectionView)]
19-
[FailsOnIOSWhenRunningOnXamarinUITest]
20-
[FailsOnMacWhenRunningOnXamarinUITest]
2119
public void CollectionViewShouldSourceShouldResetWhileInvisible()
2220
{
23-
App.WaitForNoElement(Success);
21+
App.WaitForElement(Success);
2422
}
2523
}
2624
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18702.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if WINDOWS
2-
using NUnit.Framework;
1+
using NUnit.Framework;
32
using UITest.Appium;
43
using UITest.Core;
54

@@ -18,12 +17,10 @@ public Issue18702(TestDevice testDevice) : base(testDevice)
1817
[Test]
1918
[Category(UITestCategories.CollectionView)]
2019
[Category(UITestCategories.Compatibility)]
21-
[FailsOnIOSWhenRunningOnXamarinUITest]
2220
public void CollectionViewGroupFooterTemplateShouldNotCrash()
2321
{
2422
App.WaitForElement(element);
2523
VerifyScreenshot();
2624
}
2725
}
28-
}
29-
#endif
26+
}

0 commit comments

Comments
 (0)