Skip to content

Commit 3ad9105

Browse files
updated changes
1 parent 4919da3 commit 3ad9105

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,22 @@ void HideSoftInputOnTappedPageTestForMac(string control, bool hideOnTapped)
3838
try
3939
{
4040
if (hideOnTapped)
41+
{
42+
App.WaitForElement("HideSoftInputOnTappedTrue");
4143
App.Click("HideSoftInputOnTappedTrue");
44+
}
4245
else
46+
{
47+
App.WaitForElement("HideSoftInputOnTappedFalse");
4348
App.Click("HideSoftInputOnTappedFalse");
49+
}
4450

4551
App.WaitForElement(control);
4652
App.Click(control);
4753

4854
ClassicAssert.IsTrue(App.IsFocused(control));
4955

56+
App.WaitForElement("EmptySpace");
5057
App.Click("EmptySpace");
5158
ClassicAssert.AreEqual(!hideOnTapped, App.IsFocused(control));
5259
}
@@ -64,15 +71,22 @@ void HideSoftInputOnTappedPageTestForAndroidiOS(string control, bool hideOnTappe
6471
App.DismissKeyboard();
6572

6673
if (hideOnTapped)
74+
{
75+
App.WaitForElement("HideSoftInputOnTappedTrue");
6776
App.Tap("HideSoftInputOnTappedTrue");
77+
}
6878
else
79+
{
80+
App.WaitForElement("HideSoftInputOnTappedFalse");
6981
App.Tap("HideSoftInputOnTappedFalse");
82+
}
7083

7184
App.WaitForElement(control);
7285
App.Tap(control);
7386

7487
ClassicAssert.True(App.IsKeyboardShown());
7588

89+
App.WaitForElement("EmptySpace");
7690
App.Tap("EmptySpace");
7791
ClassicAssert.AreEqual(!hideOnTapped, App.IsKeyboardShown());
7892
}
@@ -103,18 +117,25 @@ public void TogglingHideSoftInputOnTappedForMac()
103117
{
104118
try
105119
{
120+
App.WaitForElement("HideSoftInputOnTappedFalse");
106121
App.Click("HideSoftInputOnTappedFalse");
107122

108123
// Switch between enabling/disabling feature
109124
for (int i = 0; i < 2; i++)
110125
{
126+
App.WaitForElement("HideKeyboardWhenTappingPage");
111127
App.Click("HideKeyboardWhenTappingPage");
112128
ClassicAssert.True(App.IsFocused("HideKeyboardWhenTappingPage"));
129+
130+
App.WaitForElement("EmptySpace");
113131
App.Click("EmptySpace");
114132
ClassicAssert.AreEqual(false, App.IsFocused("HideKeyboardWhenTappingPage"));
115133

134+
App.WaitForElement("DontHideKeyboardWhenTappingPage");
116135
App.Click("DontHideKeyboardWhenTappingPage");
117136
ClassicAssert.True(App.IsFocused("DontHideKeyboardWhenTappingPage"));
137+
138+
App.WaitForElement("EmptySpace");
118139
App.Click("EmptySpace");
119140
ClassicAssert.AreEqual(true, App.IsFocused("DontHideKeyboardWhenTappingPage"));
120141
}
@@ -132,6 +153,7 @@ public void TogglingHideSoftInputOnTappedForAndroidiOS()
132153
if (App.IsKeyboardShown())
133154
App.DismissKeyboard();
134155

156+
App.WaitForElement("HideSoftInputOnTappedFalse");
135157
App.Tap("HideSoftInputOnTappedFalse");
136158

137159
// Switch between enabling/disabling feature
@@ -140,11 +162,14 @@ public void TogglingHideSoftInputOnTappedForAndroidiOS()
140162
App.WaitForElement("HideKeyboardWhenTappingPage");
141163
App.Tap("HideKeyboardWhenTappingPage");
142164
ClassicAssert.True(App.IsKeyboardShown());
165+
App.WaitForElement("EmptySpace");
143166
App.Tap("EmptySpace");
144167
ClassicAssert.AreEqual(false, App.IsKeyboardShown());
145168

169+
App.WaitForElement("DontHideKeyboardWhenTappingPage");
146170
App.Tap("DontHideKeyboardWhenTappingPage");
147171
ClassicAssert.True(App.IsKeyboardShown());
172+
App.WaitForElement("EmptySpace");
148173
App.Tap("EmptySpace");
149174
ClassicAssert.AreEqual(true, App.IsKeyboardShown());
150175
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/Issue9711.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@ public void TestTappingHeaderDoesNotCrash()
2323

2424
Assert.DoesNotThrowAsync(async () =>
2525
{
26+
App.WaitForElement("Group2");
2627
App.Tap("Group2");
2728
await Task.Delay(3000);
29+
App.WaitForElement("Group1");
2830
App.Tap("Group1");
2931
await Task.Delay(3000);
32+
App.WaitForElement("Group0");
3033
App.Tap("Group0");
3134
await Task.Delay(3000);
3235
App.WaitForElement("9711TestListView");

0 commit comments

Comments
 (0)