static void LogReproSteps(UITestBase testContext, string message, params object[] info) { if (testContext != null) { testContext.ReproStep(message, info); } }
public static void UpdateAllNuGetPackages (UITestBase testContext = null) { Session.ExecuteCommand ("MonoDevelop.PackageManagement.Commands.UpdateAllPackagesInSolution"); WaitForNuGet.UpdateSuccess (string.Empty); if (testContext != null) testContext.TakeScreenShot ("All-NuGet-Packages-Updated"); }
public static void UpdateAllNuGetPackages(UITestBase testContext = null) { Session.ExecuteCommand("MonoDevelop.PackageManagement.Commands.UpdateAllPackagesInSolution"); WaitForNuGet.UpdateSuccess(string.Empty); if (testContext != null) { testContext.TakeScreenShot("All-NuGet-Packages-Updated"); } }
public static void UpdatePackage (NuGetPackageOptions packageOptions, UITestBase testContext = null) { Action<string> screenshotAction = delegate { }; if (testContext != null) { testContext.ReproStep (string.Format ("Update NuGet package '{0}'", packageOptions.PackageName), packageOptions); screenshotAction = testContext.TakeScreenShot; } AddUpdatePackage (packageOptions, screenshotAction, true); }
public static void CloseDocument(UITestBase testContext = null) { testContext?.ReproStep("Close current workspace"); Action <string> takeScreenshot = GetScreenshotAction(testContext); takeScreenshot("About-To-Close-Workspace"); Session.ExecuteCommand(FileCommands.CloseFile); takeScreenshot("Closed-Workspace"); }
public static void OpenWorkspace(string solutionPath, UITestBase 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); Ide.WaitForIdeIdle(); takeScreenshot("Solution-Opened"); }
public static void UpdatePackage(NuGetPackageOptions packageOptions, UITestBase testContext = null) { Action <string> screenshotAction = delegate { }; if (testContext != null) { testContext.ReproStep(string.Format("Update NuGet package '{0}'", packageOptions.PackageName), packageOptions); screenshotAction = testContext.TakeScreenShot; } AddUpdatePackage(packageOptions, screenshotAction, true); }
public static Action <string> GetScreenshotAction(UITestBase testContext) { Action <string> takeScreenshot = delegate { }; if (testContext != null) { takeScreenshot = testContext.TakeScreenShot; } return(takeScreenshot); }
public static void Create (NewFileOptions options, UITestBase testContext = null) { options.PrintData (); Action<string> screenshotAction = (s) => {}; if (testContext != null) { testContext.ReproStep (string.Format ("Add a new file of type '{0}' named '{1}'", options.FileType, options.FileName), options); screenshotAction = testContext.TakeScreenShot; } var ctrl = new NewFileController (screenshotAction); ctrl.Open (); ctrl.ConfigureAddToProject (!string.IsNullOrEmpty (options.AddToProjectName), options.AddToProjectName); ctrl.SelectFileTypeCategory (options.FileTypeCategory, options.FileTypeCategoryRoot); ctrl.SelectFileType (options.FileType); ctrl.EnterFileName (options.FileName); ctrl.Done (); }
public static void Create(NewFileOptions options, UITestBase testContext = null) { options.PrintData(); Action <string> screenshotAction = (s) => {}; if (testContext != null) { testContext.ReproStep(string.Format("Add a new file of type '{0}' named '{1}'", options.FileType, options.FileName), options); screenshotAction = testContext.TakeScreenShot; } var ctrl = new NewFileController(screenshotAction); ctrl.Open(); ctrl.ConfigureAddToProject(!string.IsNullOrEmpty(options.AddToProjectName), options.AddToProjectName); ctrl.SelectFileTypeCategory(options.FileTypeCategory, options.FileTypeCategoryRoot); ctrl.SelectFileType(options.FileType); ctrl.EnterFileName(options.FileName); ctrl.Done(); }
public static void AddSuccess(string packageName, bool waitForWarning = true, UITestBase testContext = null) { Success(packageName, NuGetOperations.Add, waitForWarning, testContext); }
public ProjectOptionsController(UITestBase testContext = null) : base(windowQuery, testContext) { }
public ProjectOptionsController(string solutionName, string projectName, UITestBase testContext = null) : base(windowQuery, testContext) { this.solutionName = solutionName; this.projectName = projectName; }
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 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); Ide.WaitForIdeIdle (); takeScreenshot ("Solution-Opened"); }
public static void Success (string packageName, NuGetOperations operation, bool waitForWarning = true, UITestBase testContext = null) { var waitPackage = new WaitForNuGet { Operation = operation, PackageName = packageName, WaitForSuccess = true, WaitForWarning = waitForWarning }; if (testContext != null) { testContext.ReproStep (string.Format ("Wait for one of these messages:\n\t{0}", string.Join ("\t\n", waitPackage.ToMessages ()))); } waitPackage.Wait (); }
public ProjectOptionsController (string solutionName, string projectName, UITestBase testContext = null) : base (windowQuery,testContext) { this.solutionName = solutionName; this.projectName = projectName; }
public static bool SelectSingleReference (string solutionName, string projectName, string referenceName, bool fromPackage = false, UITestBase testContext = null) { LogReproSteps (testContext, string.Format ("Under Solution Explorer, select NuGet package '{0}' under '{1}' > '{2}' > From Packages", referenceName, projectName.StripBold (), solutionName.StripBold ())); return fromPackage ? Select (solutionName, projectName, "From Packages", referenceName) : Select (solutionName, projectName, referenceName); }
public static bool SelectPackage (string solutionName, string projectName, string package, UITestBase testContext = null) { LogReproSteps (testContext, string.Format ("Under Solution Explorer, select package '{0}' under '{1}' > '{2}' > 'Packages'", package, projectName.StripBold (), solutionName.StripBold ())); return Select (solutionName, projectName, "Packages", package); }
public static bool SelectReferenceFolder (string solutionName, string projectName, UITestBase testContext = null) { LogReproSteps (testContext, string.Format ("Under Solution Explorer, expand References node under '{0}'> '{1}'", projectName.StripBold (), solutionName.StripBold ())); return Select (solutionName, projectName, "References"); }
public static bool SelectSolution (string solutionName, UITestBase testContext = null) { LogReproSteps (testContext, string.Format ("Under Solution Explorer, select Solution '{0}'", solutionName.StripBold ())); return Select (solutionName); }
static void LogReproSteps (UITestBase testContext, string message, params object[] info) { if (testContext != null) { testContext.ReproStep (message, info); } }
public static void Success(string packageName, NuGetOperations operation, bool waitForWarning = true, UITestBase testContext = null) { var waitPackage = new WaitForNuGet { Operation = operation, PackageName = packageName, WaitForSuccess = true, WaitForWarning = waitForWarning }; if (testContext != null) { testContext.ReproStep(string.Format("Wait for one of these messages:\n\t{0}", string.Join("\t\n", waitPackage.ToMessages()))); } waitPackage.Wait(); }
public static bool SelectSingleReference(string solutionName, string projectName, string referenceName, bool fromPackage = false, UITestBase testContext = null) { LogReproSteps(testContext, string.Format("Under Solution Explorer, select NuGet package '{0}' under '{1}' > '{2}' > From Packages", referenceName, projectName.StripBold(), solutionName.StripBold())); return(fromPackage ? Select(solutionName, projectName, "From Packages", referenceName) : Select(solutionName, projectName, referenceName)); }
public ProjectOptionsController (UITestBase testContext = null) : base (windowQuery, testContext) { }
public static bool SelectReferenceFolder(string solutionName, string projectName, UITestBase testContext = null) { LogReproSteps(testContext, string.Format("Under Solution Explorer, expand References node under '{0}'> '{1}'", projectName.StripBold(), solutionName.StripBold())); return(Select(solutionName, projectName, "References")); }
protected OptionsController (Func<AppQuery, AppQuery> windowQuery, UITestBase testContext) : this (windowQuery, testContext.TakeScreenShot) { this.testContext = testContext; }
public static bool SelectSolution(string solutionName, UITestBase testContext = null) { LogReproSteps(testContext, string.Format("Under Solution Explorer, select Solution '{0}'", solutionName.StripBold())); return(Select(solutionName)); }
public static Action<string> GetScreenshotAction (UITestBase testContext) { Action<string> takeScreenshot = delegate { }; if (testContext != null) takeScreenshot = testContext.TakeScreenShot; return takeScreenshot; }
protected OptionsController(Func <AppQuery, AppQuery> windowQuery, UITestBase testContext) : this(windowQuery, testContext.TakeScreenShot) { this.testContext = testContext; }
public static void AddSuccess (string packageName, bool waitForWarning = true, UITestBase testContext = null) { Success (packageName, NuGetOperations.Add, waitForWarning, testContext); }
public static bool SelectPackage(string solutionName, string projectName, string package, UITestBase testContext = null) { LogReproSteps(testContext, string.Format("Under Solution Explorer, select package '{0}' under '{1}' > '{2}' > 'Packages'", package, projectName.StripBold(), solutionName.StripBold())); return(Select(solutionName, projectName, "Packages", package)); }