Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Sinha <manish.sinha@xamarin.com>2015-08-13 03:32:01 +0300
committerManish Sinha <manish.sinha@xamarin.com>2015-08-13 03:32:01 +0300
commitf21c3d665cd9d474d5f67df92690aaa79f84b208 (patch)
tree2a0fd859148030fb8c3959d6763c7c42ad5b32b5 /main/tests/UserInterfaceTests/Controllers
parent96ef109274292c29ac6441cddac31fae925b3c59 (diff)
[AutoTest] Expand the row in TreeView when it is selected
It is needed for scenarios like SolutionTree because the children rows are not made available for the first time unless the row is expanded. Also update SolutionExplorerController to fully utilize this fix
Diffstat (limited to 'main/tests/UserInterfaceTests/Controllers')
-rw-r--r--main/tests/UserInterfaceTests/Controllers/SolutionExplorerController.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/main/tests/UserInterfaceTests/Controllers/SolutionExplorerController.cs b/main/tests/UserInterfaceTests/Controllers/SolutionExplorerController.cs
index 836823ec60..c12a285f83 100644
--- a/main/tests/UserInterfaceTests/Controllers/SolutionExplorerController.cs
+++ b/main/tests/UserInterfaceTests/Controllers/SolutionExplorerController.cs
@@ -51,13 +51,19 @@ namespace UserInterfaceTests
public static bool Select (params string[] selectionTree)
{
+ Func<AppQuery, AppQuery> query = GetNodeQuery (selectionTree);
+ return Session.SelectElement (GetNodeQuery (selectionTree)) && Session.WaitForElement (c => query (c).Selected ()).Any ();
+ }
+
+ public static Func<AppQuery, AppQuery> GetNodeQuery (params string[] selectionTree)
+ {
var funcs = new List<Func<AppQuery, AppQuery>> ();
funcs.Add (topLevel);
foreach (var nodeName in selectionTree) {
var lastFunc = funcs.Last ();
- funcs.Add (c => lastFunc (c).Children (false).Index (0).Property ("Label", nodeName));
+ funcs.Add (c => lastFunc (c).Children (false).Property ("Label", nodeName).Index (0));
}
- return Session.SelectElement (funcs.Last ());
+ return funcs.Last ();
}
public static bool SelectSolution (string solutionName)
@@ -72,7 +78,7 @@ namespace UserInterfaceTests
public static bool SelectReferenceFolder (string solutionName, string projectName)
{
- return Select (solutionName, projectName);
+ return Select (solutionName, projectName, "References");
}
public static bool SelectSingleReference (string solutionName, string projectName, string referenceName, bool fromPackage = false)