Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        public void RunASPTest(string templateName)
        {
            var templateOptions = new TemplateSelectionOptions {
                CategoryRoot     = OtherCategoryRoot,
                Category         = aspCategory,
                TemplateKindRoot = GeneralKindRoot,
                TemplateKind     = templateName
            };

            CreateBuildProject(templateOptions, () => Ide.WaitForIdeIdle(totalTimeoutInSecs: 50));
        }
Ejemplo n.º 3
0
        public void RunDotNetTests(string templateName, int totalTimeoutInSecs)
        {
            var templateOptions = new TemplateSelectionOptions {
                CategoryRoot     = OtherCategoryRoot,
                Category         = dotNetCategory,
                TemplateKindRoot = GeneralKindRoot,
                TemplateKind     = templateName
            };

            CreateBuildProject(templateOptions, () => Ide.WaitForIdeIdle((uint)totalTimeoutInSecs));
        }
Ejemplo n.º 4
0
        public void RunMiscTemplatesTest(string templateName, string templateKind)
        {
            var templateOptions = new TemplateSelectionOptions {
                CategoryRoot     = OtherCategoryRoot,
                Category         = miscCategory,
                TemplateKindRoot = templateKind,
                TemplateKind     = templateName
            };

            CreateBuildProject(templateOptions, () => Ide.WaitForIdeIdle());
            IsTemplateSelected(templateOptions);
        }
Ejemplo n.º 5
0
        public void TestDontOpenReadmeOpenedInOther()
        {
            var packageInfo = new NuGetPackageOptions {
                PackageName  = "RestSharp",
                Version      = "105.2.3",
                IsPreRelease = true
            };

            var projectDetails = CreateProject();

            NuGetController.AddPackage(packageInfo, this);
            WaitForNuGetReadmeOpened();
            Session.ExecuteCommand(FileCommands.CloseFile);

            var pclTemplateOptions = new TemplateSelectionOptions {
                CategoryRoot     = "Other",
                Category         = ".NET",
                TemplateKindRoot = "General",
                TemplateKind     = "Library"
            };
            var pclProjectDetails = ProjectDetails.ToExistingSolution(projectDetails.SolutionName,
                                                                      GenerateProjectName(pclTemplateOptions.TemplateKind));

            CreateProject(pclTemplateOptions, pclProjectDetails);
            Ide.WaitForIdeIdle(30);

            SolutionExplorerController.SelectProject(projectDetails.SolutionName, pclProjectDetails.ProjectName);
            NuGetController.AddPackage(packageInfo, this);
            try {
                WaitForNuGetReadmeOpened(false);
                var failureMessage = string.Format("Expected: {0}\nActual:{1}",
                                                   "readme.txt tab should not open", "readme.txt tab opens");
                ReproStep(failureMessage);
                Assert.Fail(failureMessage);
            } catch (TimeoutException) {
                Session.DebugObject.Debug("readme.txt tab failed to open as expected");
            }
        }
Ejemplo n.º 6
0
 public void TestGitClone(string url)
 {
     TestClone(url);
     Ide.WaitForIdeIdle();
 }