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 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 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 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 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; }
protected OptionsController(Func <AppQuery, AppQuery> windowQuery, UITestBase testContext) : this(windowQuery, testContext.TakeScreenShot) { this.testContext = 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)); }
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 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)); }