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-09-28 23:07:02 +0300
committerManish Sinha <manish.sinha@xamarin.com>2015-09-29 18:11:28 +0300
commit46ba26d34a388a1eabcb4151a3f52215b650ecf4 (patch)
tree2ecee56ea995c8a3101eba50f2a512de44f55e25 /main/tests/UserInterfaceTests/Workbench.cs
parent7a83d6af7f8cbed286209b6c4551a016034c0d5e (diff)
[UITest] Added OpenWorkspace and CloseWorkspace functionality
Diffstat (limited to 'main/tests/UserInterfaceTests/Workbench.cs')
-rw-r--r--main/tests/UserInterfaceTests/Workbench.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/tests/UserInterfaceTests/Workbench.cs b/main/tests/UserInterfaceTests/Workbench.cs
index 9c2a5195e5..8f9ea9047f 100644
--- a/main/tests/UserInterfaceTests/Workbench.cs
+++ b/main/tests/UserInterfaceTests/Workbench.cs
@@ -93,6 +93,25 @@ namespace UserInterfaceTests
}
}
+ public static void OpenWorkspace (string solutionPath, UITestBase testContext = null)
+ {
+ if (testContext != null)
+ testContext.ReproStep (string.Format ("Open solution path '{0}'", solutionPath));
+ Action<string> takeScreenshot = GetScreenshotAction (testContext);
+ Session.GlobalInvoke ("MonoDevelop.Ide.IdeApp.Workspace.OpenWorkspaceItem", new FilePath (solutionPath), true);
+ takeScreenshot ("Solution-Opened");
+ }
+
+ public static void CloseWorkspace (UITestBase testContext = null)
+ {
+ if (testContext != null)
+ testContext.ReproStep ("Close current workspace");
+ Action<string> takeScreenshot = GetScreenshotAction (testContext);
+ takeScreenshot ("About-To-Close-Workspace");
+ Session.ExecuteCommand (FileCommands.CloseWorkspace);
+ takeScreenshot ("Closed-Workspace");
+ }
+
public static string Configuration
{
get {
@@ -104,5 +123,15 @@ namespace UserInterfaceTests
Ide.WaitUntil (() => Workbench.Configuration == value);
}
}
+
+ public static Action<string> GetScreenshotAction (UITestBase testContext)
+ {
+ Action<string> takeScreenshot = delegate {
+ };
+ if (testContext != null)
+ takeScreenshot = testContext.TakeScreenShot;
+
+ return takeScreenshot;
+ }
}
}