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