Exemplo n.º 1
0
 protected virtual void OnSelectTemplate(NewProjectController newProject, TemplateSelectionOptions templateOptions)
 {
     Assert.IsTrue(newProject.SelectTemplateType(templateOptions.CategoryRoot, templateOptions.Category));
     TakeScreenShot("TemplateCategorySelected");
     Assert.IsTrue(newProject.SelectTemplate(templateOptions.TemplateKindRoot, templateOptions.TemplateKind));
     TakeScreenShot("TemplateSelected");
     Assert.IsTrue(newProject.Next());
     TakeScreenShot("NextAfterTemplateSelected");
 }
Exemplo n.º 2
0
        public void CreateBuildProject(string projectName, string categoryRoot, string category, string kindRoot, string kind, Action beforeBuild)
        {
            var    solutionParentDirectory = Util.CreateTmpDir(projectName);
            string actualSolutionDirectory = string.Empty;

            try {
                var newProject = new NewProjectController();
                newProject.Open();

                SelectTemplate(newProject, categoryRoot, category, kindRoot, kind);

                Assert.IsTrue(newProject.Next());

                // Wait until the next page is displayed
                Session.WaitForElement(c => c.Textfield().Marked("solutionNameTextBox"));

                EnterProjectDetails(newProject, projectName, projectName, solutionParentDirectory);

                Assert.IsTrue(newProject.CreateProjectInSolutionDirectory(false));
                Assert.IsTrue(newProject.UseGit(true, false));

                Session.RunAndWaitForTimer(() => newProject.Next(), "Ide.Shell.SolutionOpened");

                actualSolutionDirectory = GetSolutionDirectory();

                beforeBuild();

                Assert.IsTrue(Ide.BuildSolution());
            } finally {
                Ide.CloseAll();
                try {
                    if (Directory.Exists(actualSolutionDirectory))
                    {
                        Directory.Delete(actualSolutionDirectory, true);
                    }
                } catch (IOException) { }
            }
        }
        protected virtual void OnSelectTemplate(NewProjectController newProject, TemplateSelectionOptions templateOptions)
        {
            if (!newProject.SelectTemplateType(templateOptions.CategoryRoot, templateOptions.Category))
            {
                throw new TemplateSelectionException(string.Format("Failed to select Category '{0}' under '{1}'",
                                                                   templateOptions.Category, templateOptions.CategoryRoot));
            }
            TakeScreenShot("TemplateCategorySelected");

            if (!newProject.SelectTemplate(templateOptions.TemplateKindRoot, templateOptions.TemplateKind))
            {
                throw new TemplateSelectionException(string.Format("Failed to select Template '{0}' under '{1}'",
                                                                   templateOptions.TemplateKind, templateOptions.TemplateKindRoot));
            }
            TakeScreenShot("TemplateSelected");

            if (!newProject.Next())
            {
                throw new TemplateSelectionException("Clicking Next failed after selecting template");
            }
            TakeScreenShot("NextAfterTemplateSelected");
        }
		protected virtual void OnSelectTemplate (NewProjectController newProject, TemplateSelectionOptions templateOptions)
		{
			if (!newProject.SelectTemplateType (templateOptions.CategoryRoot, templateOptions.Category)) {
				throw new TemplateSelectionException (string.Format ("Failed to select Category '{0}' under '{1}'", 
					templateOptions.Category, templateOptions.CategoryRoot));
			}
			TakeScreenShot ("TemplateCategorySelected");

			if (!newProject.SelectTemplate (templateOptions.TemplateKindRoot, templateOptions.TemplateKind)) {
				throw new TemplateSelectionException (string.Format ("Failed to select Template '{0}' under '{1}'", 
					templateOptions.TemplateKind, templateOptions.TemplateKindRoot));
			}
			TakeScreenShot ("TemplateSelected");

			if (!newProject.Next ()) {
				throw new TemplateSelectionException ("Clicking Next failed after selecting template");
			}
			TakeScreenShot ("NextAfterTemplateSelected");
		}
		protected virtual void OnClickCreate (NewProjectController newProject)
		{
			Session.RunAndWaitForTimer (() => newProject.Next(), "Ide.Shell.SolutionOpened");
		}
		protected virtual void OnSelectTemplate (NewProjectController newProject, TemplateSelectionOptions templateOptions)
		{
			Assert.IsTrue (newProject.SelectTemplateType (templateOptions.CategoryRoot, templateOptions.Category));
			TakeScreenShot ("TemplateCategorySelected");
			Assert.IsTrue (newProject.SelectTemplate (templateOptions.TemplateKindRoot, templateOptions.TemplateKind));
			TakeScreenShot ("TemplateSelected");
			Assert.IsTrue (newProject.Next ());
			TakeScreenShot ("NextAfterTemplateSelected");
		}
Exemplo n.º 7
0
 protected virtual void OnClickCreate(NewProjectController newProject)
 {
     Session.RunAndWaitForTimer(() => newProject.Next(), "Ide.Shell.SolutionOpened");
 }