public void CreateNewProject(AccountData account, ProjectData projectData) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); Mantis.ProjectData project = new Mantis.ProjectData(); project.name = projectData.Name; project.status = new Mantis.ObjectRef(); project.status.id = projectData.Status; if (projectData.InheritGlobal == "1") { project.inherit_global = true; } else { project.inherit_global = false; } project.view_state = new Mantis.ObjectRef(); project.view_state.id = projectData.ViewState; project.description = projectData.Description; client.mc_project_add(account.Username, account.Password, project); driver.Navigate().Refresh(); }
public void ProjectRemovalTest() { if (app.Projects.GetProjectsCount() == 0) { ProjectData project = new ProjectData("ProjectToRemove"); app.Projects.Create(project); } List <ProjectData> oldProjects = ProjectData.GetAll(); ProjectData toBeRemoved = oldProjects[0]; app.Projects.Remove(toBeRemoved); Assert.AreEqual(oldProjects.Count - 1, app.Projects.GetProjectsCount()); List <ProjectData> newProjects = ProjectData.GetAll(); oldProjects.Remove(toBeRemoved); Assert.AreEqual(oldProjects, newProjects); foreach (ProjectData project in newProjects) { Assert.AreNotEqual(project.Id, toBeRemoved.Id); } }
public void TestDeleteProject() { AccountData account = new AccountData() { Name = "administrator", Password = "******" }; ProjectData project = new ProjectData() { Name = "second", Status = "stable", Description = "my" }; List <ProjectData> oldProjectTable = new List <ProjectData>(); oldProjectTable = app.API.ListFromTable(account); if (!app.API.DeleteProjectFromTable(account, project)) { app.API.CreateNewProject(account, project); oldProjectTable.Add(project); } app.API.DeleteProjectFromTable(account, project); List <ProjectData> newProjectTable = new List <ProjectData>(); newProjectTable = app.API.ListFromTable(account); oldProjectTable.Remove(project); oldProjectTable.Sort(); newProjectTable.Sort(); Assert.AreEqual(oldProjectTable, newProjectTable); }
public ProjectManagementHelper FillField(ProjectData projectData) { Type(By.Name("name"), projectData.Pjdata_name); Type(By.Name("description"), projectData.Pjdata_desc); return(this); }
public void TestProjectRemoving() { /* * int i = 3; * List<ProjectData> oldprojects = new List<ProjectData>(); * oldprojects = app.Project.GetProjectList(); * * while (oldprojects.Count <= i) * { * ProjectData project = new ProjectData * { * Name = "projectForDelete " + oldprojects.Count.ToString(), * Description = "forRemovingTest" * }; * * app.Project.AddProject(project); * oldprojects = app.Project.GetProjectList(); * } * * ProjectData removedProject = oldprojects[i]; * * app.Project.RemoveProject(i); * * oldprojects.Remove(removedProject); * List<ProjectData> newprojects = app.Project.GetProjectList(); * * oldprojects.Sort(); * newprojects.Sort(); * Assert.AreEqual(oldprojects, newprojects); */ AccountData admin = new AccountData { Name = "administrator", Password = "******" }; int i = 3; List <ProjectData> oldprojects = new List <ProjectData>(); oldprojects = app.API.APIGetProjectList(admin); while (oldprojects.Count <= i) { ProjectData project = new ProjectData { Name = "projectForDelete " + oldprojects.Count.ToString(), Description = "forRemovingTest" }; app.Project.AddProject(project); oldprojects = app.Project.GetProjectList(); } ProjectData removedProject = oldprojects[i]; app.Project.RemoveProject(i); oldprojects.Remove(removedProject); List <ProjectData> newprojects = app.API.APIGetProjectList(admin); oldprojects.Sort(); newprojects.Sort(); Assert.AreEqual(oldprojects, newprojects); }
private void FillCreationForm(ProjectData project) { Type(By.Id("project-name"), project.Name); }
public int AddProjectToDb(ProjectData project) { return(project.AddProject(project).GetValueOrDefault()); }
public void RemoveProject(ProjectData project) { manager.Navigate.OpenProjectEditPage(project); driver.FindElement(By.CssSelector("input.btn.btn-primary.btn-sm.btn-white.btn-round")).Click(); driver.FindElement(By.CssSelector("input.btn.btn-primary.btn-white.btn-round")).Click(); }
public void FillProjectData(ProjectData project) { Tipe(By.Id("project-name"), project.Name); Tipe(By.Id("project-description"), project.Description); }
public void SelectProgect(ProjectData proj) { GotoProjectPage(); driver.FindElement(By.XPath(@"//tr/td/a[contains(text(), '" + proj.Name + "')]")).Click(); }
public void CreateProject(ProjectData project) { FindByCss("fieldset > button[type='submit']"); Type(By.Name("name"), project.Name); FindByCss("input[value='Добавить проект']"); }
public void SelectProject(ProjectData project) { driver.FindElement(By.XPath("//a[@href='manage_proj_edit_page.php?project_id=" + project.Id + "']")).Click(); }
public ProjectManagementHelper FillProjectForm(ProjectData project) { Type(By.Name("name"), project.Name); return(this); }
public ProjectHelper FillProjectForm(ProjectData project) { driver.FindElement(By.Name("name")).SendKeys(project.Name); driver.FindElement(By.Name("description")).SendKeys(project.Description); return(this); }
private void FillProjectModification(ProjectData project) { driver.FindElement(By.Id("project-name")).Click(); driver.FindElement(By.Id("project-name")).Clear(); driver.FindElement(By.Id("project-name")).SendKeys(project.Name); }
public void RemoveProject(ProjectData project1) { Mantis_tests.Mantis.MantisConnectPortTypeClient client = new Mantis_tests.Mantis.MantisConnectPortTypeClient(); client.mc_project_delete("administrator", "root", project1.Id); }
private void FillProjectRegistrtionForm(ProjectData project) { driver.FindElement(By.Name("name")).SendKeys(project.Name); driver.FindElement(By.Name("description")).SendKeys(project.Description); }
public void FillProjectCreationForm(ProjectData project) { Type(By.Name("name"), project.Name); Type(By.Name("description"), project.Description); }
public void Remove(ProjectData projectData) { SelectProject(projectData.Id); RemoveProject(); SubmitProjectRemoval(); }
private void FillNewProjectForm(ProjectData project) { Type(By.Id("project-name"), project.Name); }
public void FillProjectForm(ProjectData project) { driver.FindElement(By.Name("name")).SendKeys(project.Name); driver.FindElement(By.Name("description")).SendKeys(project.Description); }
public void Delete(ProjectData project) { manager.Navigator.GoToProjPage(); OpenProjectForm(project.Name); DeleteProject(); }
public void Remove(ProjectData projectForRemove) { OpenProject(projectForRemove); Remove(); Submit(); }
public void RemoveProject(AccountData account, ProjectData project) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); client.mc_project_delete(account.Name, account.Password, project.Id); }
public void FillNewProjectForm(ProjectData project) { driver.FindElement(By.Name("name")).SendKeys(project.Name); //driver.FindElement(By.Name("description")).SendKeys(project.Description); driver.FindElement(By.CssSelector("input.btn.btn-primary.btn-white.btn-round")).Click(); }
public bool EnsureThereHasProject() { List <ProjectData> projects = ProjectData.GetAll(); return(projects.Count != 0); }
private void FillProjectData(ProjectData project) { Driver.FindElement(By.Id("project-name")).SendKeys(project.Name); Driver.FindElement(By.Id("project-description")).SendKeys(project.Description); }
public void DeleteProject(AccountData account, ProjectData projectData) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); Mantis.ProjectData project = new Mantis.ProjectData(); project.name = projectData.Name; }
private void FillProjectForm(ProjectData project) { driver.FindElement(By.Name("name")).SendKeys(project.Name); }
public void CreateNewProject(ProjectData project) { driver.FindElement(By.XPath("//button[contains(text(),'Create New Project')]")).Click(); Type(By.Name("name"), project.Name); driver.FindElement(By.XPath("//input[@value='Add Project']")).Click(); }