Esempio n. 1
0
 static void LogReproSteps(UITestBase testContext, string message, params object[] info)
 {
     if (testContext != null)
     {
         testContext.ReproStep(message, info);
     }
 }
Esempio n. 2
0
 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");
     }
 }
Esempio n. 3
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);
        }
Esempio n. 4
0
        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();
        }
Esempio n. 5
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();
        }
Esempio n. 6
0
 public static void AddSuccess(string packageName, bool waitForWarning = true, UITestBase testContext = null)
 {
     Success(packageName, NuGetOperations.Add, waitForWarning, testContext);
 }
Esempio n. 7
0
 public ProjectOptionsController(UITestBase testContext = null) : base(windowQuery, testContext)
 {
 }
Esempio n. 8
0
 public ProjectOptionsController(string solutionName, string projectName, UITestBase testContext = null) : base(windowQuery, testContext)
 {
     this.solutionName = solutionName;
     this.projectName  = projectName;
 }
Esempio n. 9
0
 protected OptionsController(Func <AppQuery, AppQuery> windowQuery, UITestBase testContext) : this(windowQuery, testContext.TakeScreenShot)
 {
     this.testContext = testContext;
 }
Esempio n. 10
0
 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));
 }
Esempio n. 11
0
 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));
 }
Esempio n. 12
0
 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"));
 }
Esempio n. 13
0
 public static bool SelectSolution(string solutionName, UITestBase testContext = null)
 {
     LogReproSteps(testContext, string.Format("Under Solution Explorer, select Solution '{0}'", solutionName.StripBold()));
     return(Select(solutionName));
 }