static void LogReproSteps(UITestBase testContext, string message, params object[] info) { if (testContext != null) { testContext.ReproStep(message, info); } }
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 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 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(); }
protected void ReproStep(string stepDescription, params object[] info) { testContext.ReproStep(stepDescription, info); }