Skip to content

Commit abada83

Browse files
authored
[UI Testing] Split mouse and touch Appium actions and added pending ones (TouchAndHold etc) (#21305)
* Split mouse and touch Appium actions * More changes * Fixes * Fix build errors * More changes * Fix build errors * More updates
1 parent d92bebd commit abada83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+714
-171
lines changed

src/Controls/tests/UITests/Tests/BorderUITests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void BordersWithVariousShapes()
3232
{
3333
App.WaitForElement("TargetView");
3434
App.EnterText("TargetView", "BordersWithVariousShapes");
35-
App.Click("GoButton");
35+
App.Tap("GoButton");
3636

3737
App.WaitForElement("WaitForStubControl");
3838

src/Controls/tests/UITests/Tests/CarouselViewUITests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ public void CarouselViewGoToNextCurrentItem()
5959
CheckLabelValue("lblPosition", index);
6060
CheckLabelValue("lblCurrentItem", index);
6161

62-
App.Click("btnNext");
62+
App.Tap("btnNext");
6363
CheckLabelValue("lblPosition", nextIndex);
6464
CheckLabelValue("lblCurrentItem", nextIndex);
6565
CheckLabelValue("lblSelected", nextIndex);
66-
App.Click("btnPrev");
66+
App.Tap("btnPrev");
6767
}
6868
}
6969

src/Controls/tests/UITests/Tests/DragAndDropUITests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void DragEvents()
3232
{
3333
App.WaitForElement("TargetView");
3434
App.EnterText("TargetView", "DragAndDropEvents");
35-
App.Click("GoButton");
35+
App.Tap("GoButton");
3636

3737
App.WaitForElement("LabelDragElement");
3838
App.DragAndDrop("LabelDragElement", "DragTarget");
@@ -57,10 +57,10 @@ public void DragAndDropBetweenLayouts()
5757
{
5858
App.WaitForElement("TargetView");
5959
App.EnterText("TargetView", "DragAndDropBetweenLayouts");
60-
App.Click("GoButton");
60+
App.Tap("GoButton");
6161

6262
App.WaitForElement("ResetButton");
63-
App.Click("ResetButton");
63+
App.Tap("ResetButton");
6464

6565
App.WaitForElement("Red");
6666
App.WaitForElement("Green");
@@ -87,7 +87,7 @@ public void PlatformDragEventArgs()
8787
{
8888
App.WaitForElement("TargetView");
8989
App.EnterText("TargetView", "DragAndDropEventArgs");
90-
App.Click("GoButton");
90+
App.Tap("GoButton");
9191

9292
App.WaitForElement("LabelDragElement");
9393
App.DragAndDrop("LabelDragElement", "DragTarget");
@@ -172,9 +172,9 @@ public void DragStartEventCoordinates()
172172
{
173173
App.WaitForElement("TargetView");
174174
App.EnterText("TargetView", "DragAndDropBetweenLayouts");
175-
App.Click("GoButton");
175+
App.Tap("GoButton");
176176

177-
App.Click("ResetButton");
177+
App.Tap("ResetButton");
178178

179179
App.WaitForElement("Blue");
180180
App.WaitForElement("Green");
@@ -206,9 +206,9 @@ public void DragEventCoordinates()
206206
{
207207
App.WaitForElement("TargetView");
208208
App.EnterText("TargetView", "DragAndDropBetweenLayouts");
209-
App.Click("GoButton");
209+
App.Tap("GoButton");
210210

211-
App.Click("ResetButton");
211+
App.Tap("ResetButton");
212212

213213
App.WaitForElement("Blue");
214214
App.WaitForElement("Green");
@@ -245,9 +245,9 @@ public void DropEventCoordinates()
245245
{
246246
App.WaitForElement("TargetView");
247247
App.EnterText("TargetView", "DragAndDropBetweenLayouts");
248-
App.Click("GoButton");
248+
App.Tap("GoButton");
249249

250-
App.Click("ResetButton");
250+
App.Tap("ResetButton");
251251

252252
App.WaitForElement("Blue");
253253
App.WaitForElement("Green");

src/Controls/tests/UITests/Tests/GestureRecognizerUITests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public void PointerGestureTest()
3434

3535
App.WaitForElement("TargetView");
3636
App.EnterText("TargetView", "PointerGestureRecognizerEvents");
37-
App.Click("GoButton");
37+
App.Tap("GoButton");
3838

3939
App.WaitForElement("primaryLabel");
4040
// using Tap in place of moving mouse for now
41-
App.Click("primaryLabel");
42-
App.Click("secondaryLabel");
41+
App.Tap("primaryLabel");
42+
App.Tap("secondaryLabel");
4343

4444
var secondaryLabelText = App.FindElement("secondaryLabel").GetText();
4545
Assert.IsNotEmpty(secondaryLabelText);
@@ -51,10 +51,10 @@ public void DoubleTap()
5151
{
5252
App.WaitForElement("TargetView");
5353
App.EnterText("TargetView", "DoubleTapGallery");
54-
App.Click("GoButton");
54+
App.Tap("GoButton");
5555

5656
App.WaitForElement("DoubleTapSurface");
57-
App.DoubleClick("DoubleTapSurface");
57+
App.DoubleTap("DoubleTapSurface");
5858

5959
var result = App.FindElement("DoubleTapResults").GetText();
6060
Assert.AreEqual("Success", result);

src/Controls/tests/UITests/Tests/Issues/GroupListViewHeaderIndexOutOfRange.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public GroupListViewHeaderIndexOutOfRange(TestDevice device) : base(device)
1717
public void GroupListViewHeaderIndexOutOfRangeTest()
1818
{
1919
App.WaitForElement(ButtonId);
20-
App.Click(ButtonId);
20+
App.Tap(ButtonId);
2121
App.WaitForElement(ButtonId);
2222
}
2323
}

src/Controls/tests/UITests/Tests/Issues/HideSoftInputOnTappedPageTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ void HideSoftInputOnTappedPageTestForAndroidiOS(string control, bool hideOnTappe
6666
App.DismissKeyboard();
6767

6868
if (hideOnTapped)
69-
App.Click("HideSoftInputOnTappedTrue");
69+
App.Tap("HideSoftInputOnTappedTrue");
7070
else
71-
App.Click("HideSoftInputOnTappedFalse");
71+
App.Tap("HideSoftInputOnTappedFalse");
7272

73-
App.Click(control);
73+
App.Tap(control);
7474

7575
Assert.True(App.IsKeyboardShown());
7676

77-
App.Click("EmptySpace");
77+
App.Tap("EmptySpace");
7878
Assert.AreEqual(!hideOnTapped, App.IsKeyboardShown());
7979
}
8080
finally
@@ -137,19 +137,19 @@ public void TogglingHideSoftInputOnTappedForAndroidiOS()
137137
if (App.IsKeyboardShown())
138138
App.DismissKeyboard();
139139

140-
App.Click("HideSoftInputOnTappedFalse");
140+
App.Tap("HideSoftInputOnTappedFalse");
141141

142142
// Switch between enabling/disabling feature
143143
for (int i = 0; i < 2; i++)
144144
{
145-
App.Click("HideKeyboardWhenTappingPage");
145+
App.Tap("HideKeyboardWhenTappingPage");
146146
Assert.True(App.IsKeyboardShown());
147-
App.Click("EmptySpace");
147+
App.Tap("EmptySpace");
148148
Assert.AreEqual(false, App.IsKeyboardShown());
149149

150-
App.Click("DontHideKeyboardWhenTappingPage");
150+
App.Tap("DontHideKeyboardWhenTappingPage");
151151
Assert.True(App.IsKeyboardShown());
152-
App.Click("EmptySpace");
152+
App.Tap("EmptySpace");
153153
Assert.AreEqual(true, App.IsKeyboardShown());
154154
}
155155
}

src/Controls/tests/UITests/Tests/Issues/IsInvokeRequiredRaceCondition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public IsInvokeRequiredRaceCondition(TestDevice device) : base(device)
1616
public void ApplicationDispatcherIsInvokeRequiredRaceConditionCausesCrash()
1717
{
1818
App.WaitForElement("crashButton");
19-
App.Click("crashButton");
19+
App.Tap("crashButton");
2020
App.WaitForElement("successLabel");
2121
}
2222
}

src/Controls/tests/UITests/Tests/Issues/Issue10234.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ public void ScrollCarouselViewAfterDispose()
2020
try
2121
{
2222
_ = App.WaitForElement("GoToTest");
23-
App.Click("GoToTest");
23+
App.Tap("GoToTest");
2424
App.WaitForElement("goToShow");
25-
App.Click("goToShow");
25+
App.Tap("goToShow");
2626
App.WaitForElement("goToBack");
2727
ScrollNextItem();
28-
App.Click("goToBack");
28+
App.Tap("goToBack");
2929
App.WaitForElement("goToShow");
30-
App.Click("goToShow");
30+
App.Tap("goToShow");
3131
ScrollNextItem();
3232
App.WaitForElement("goToBack");
33-
App.Click("goToBack");
33+
App.Tap("goToBack");
3434
App.WaitForElement("goToShow");
3535
}
3636
finally{

src/Controls/tests/UITests/Tests/Issues/Issue10947.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public void CollectionViewHeaderShouldNotScroll()
2222
var footerEntry = App.WaitForElement(FooterEntry);
2323
var footerLocation = headerEntry.GetRect();
2424

25-
App.Click(HeaderEntry);
25+
App.Tap(HeaderEntry);
2626

2727
var newHeaderEntry = App.WaitForElement(HeaderEntry);
2828
var newHeaderLocation = headerEntry.GetRect();
2929
Assert.AreEqual(headerLocation, newHeaderLocation);
3030

31-
App.Click(FooterEntry);
31+
App.Tap(FooterEntry);
3232

3333
var newFooterEntry = App.WaitForElement(FooterEntry);
3434
var newFooterLocation = headerEntry.GetRect();

src/Controls/tests/UITests/Tests/Issues/Issue11501.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ public void MakingFragmentRelatedChangesWhileAppIsBackgroundedFails(string scena
2323
try
2424
{
2525
App.WaitForElement(scenario);
26-
App.Click(scenario);
26+
App.Tap(scenario);
2727
App.WaitForElement("BackgroundMe");
2828
App.BackgroundApp();
2929
App.WaitForNoElement("BackgroundMe");
3030
App.ForegroundApp();
3131
App.WaitForElement("Restore");
32-
App.Click("Restore");
32+
App.Tap("Restore");
3333
}
3434
catch
3535
{

0 commit comments

Comments
 (0)