generated from unoplatform/template
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Use fast tap to make tests run faster
- Loading branch information
1 parent
4aabfad
commit 241c9c9
Showing
4 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
namespace TestHarness.UITest; | ||
|
||
// TODO: Remove commented code if it works in CI | ||
public static class AppExtensions | ||
{ | ||
public const int UIWaitTimeInMilliseconds = 1000; | ||
public static async Task TapAndWait(this IApp app, string elementToTap, string elementToWaitFor ) | ||
{ | ||
app.WaitElement(elementToTap); | ||
await Task.Delay(UIWaitTimeInMilliseconds); | ||
//await Task.Delay(UIWaitTimeInMilliseconds); | ||
|
||
app.Tap(elementToTap); | ||
app.FastTap(elementToTap); | ||
app.WaitElement(elementToWaitFor); | ||
|
||
await Task.Delay(UIWaitTimeInMilliseconds); | ||
//await Task.Delay(UIWaitTimeInMilliseconds); | ||
} | ||
|
||
public static async Task SelectElementIndexAndWait(this IApp app, string listName, string indexToSelect, string elementToWaitFor) | ||
{ | ||
app.WaitElement(listName); | ||
await Task.Delay(UIWaitTimeInMilliseconds); | ||
//await Task.Delay(UIWaitTimeInMilliseconds); | ||
var list = new QueryEx(q => q.All().Marked(listName)); | ||
list.SetDependencyPropertyValue("SelectedIndex", indexToSelect); | ||
await Task.Delay(UIWaitTimeInMilliseconds); | ||
//await Task.Delay(UIWaitTimeInMilliseconds); | ||
|
||
app.WaitElement(elementToWaitFor); | ||
await Task.Delay(UIWaitTimeInMilliseconds); | ||
//await Task.Delay(UIWaitTimeInMilliseconds); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters