public void Remove(AccountData account, String projectId) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); client.mc_project_delete(account.Name, account.Password, projectId); }
public bool IsLoggedIn(AccountData account) { return(IsLoggedIn() && GetLoggedUserName() == account.Name); }
private void FillPasswordInput(AccountData accountData) { Driver.FindElement(By.Id("password")).SendKeys(accountData.Password); }
public void FillPasswordForm(string url, AccountData account) { driver.Url = url; driver.FindElement(By.Name("password")).SendKeys(account.Password); driver.FindElement(By.Name("password_confirm")).SendKeys(account.Password); }
public List <Mantis.ProjectData> GetProjectsList(AccountData account) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); Mantis.ProjectData[] projectDatas = client.mc_projects_get_user_accessible(account.Name, account.Password); return(projectDatas.ToList()); }
public void FillLoginForm(AccountData account) { driver.FindElement(By.Name("username")).SendKeys(account.Name); Login(); driver.FindElement(By.Name("password")).SendKeys(account.Password); }
private void FillRegistrationForm(AccountData account) { Type(By.Name("username"), account.Name); Type(By.Name("email"), account.Name); }
public void FillAuthForm(AccountData admin) { driver.FindElement(By.Name("username")).SendKeys(admin.Username); driver.FindElement(By.Name("password")).SendKeys(admin.Password); driver.FindElement(By.CssSelector("input[class = 'button'][value = 'Login']")).Click(); }
public void Login(AccountData account) { Type(By.Name("username"), account.Username); Type(By.Name("password"), account.Password); driver.FindElement(By.XPath("//input[@value='Login']")).Click(); }
public void SetupLogin() { Administrator = new AccountData("administrator", "root"); app.Auth.Login(Administrator); }
public static List <ProjectData> GetAllFromMantisApi(AccountData accountData) { var client = new Mantis.MantisConnectPortTypeClient(); return(client.mc_project_add(accountData.Name, accountData.Password)); }
public void Login(AccountData account) { Type(By.Name("username"), account.Name); Type(By.Name("password"), account.Password); driver.FindElement(By.CssSelector("input.button")).Click(); }
private void FillPasswordForm(string url, AccountData account) // Адрес для подтверждения регистрации: Ввод пароля { driver.Url = url; driver.FindElement(By.Name("password")).SendKeys(account.Password); driver.FindElement(By.Name("pasword_confirm")).SendKeys(account.Password); }
public void DeleteAccount(AccountData account) { driver.Url = "http://localhost/mantisbt-2.22.0/manage_user_edit_page.php?user_id=" + account.Id; driver.FindElement(By.CssSelector("form[id='manage-user-delete-form']")).Click(); driver.FindElement(By.CssSelector("input.btn")).Click(); }
public void DeleteProject(AccountData account, ProjectData projectData) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); Mantis.ProjectData project = new Mantis.ProjectData(); project.name = projectData.Name; }
public void DeleteProject(AccountData account, int id) { OpenProject(id); InitDeleteProject(); SubmitRemoval(); }
public void Login(AccountData account) { OpenMainPage(); FillLoginForm(account); Login(); }
public void FillRegictrationForm(AccountData account) { Type(By.Name("username"), account.Name); Type(By.Name("email"), account.Email); }
public ProjectManagementHelper CheckSpecificProjectCreateIfNot(ProjectData project, AccountData account) { if (!IsSpecificProjectExist(project, account)) { Mantis.ProjectData projectNew = new Mantis.ProjectData() { name = "project to delete" }; Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); client.mc_project_add(account.Name, account.Password, projectNew); } return(this); }
public void FillLoginForm(AccountData account) { Type(By.Name("username"), account.Name); Type(By.Name("password"), account.Password); }
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); }
public void IsLoginSuccuss(AccountData account) { Assert.IsTrue(IsLoggedIn(account)); }
// public List <Mantis.ProjectData> GetProjectsListFromApi(AccountData account) { Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient(); return(new List <Mantis.ProjectData> (client.mc_projects_get_user_accessible(account.Name, account.Password))); }
public void IsLoginFail(AccountData account) { Assert.IsFalse(IsLoggedIn(account)); }
void FillRegistrationForm(AccountData account) { driver.FindElement(By.Name("username")).SendKeys(account.Name); driver.FindElement(By.Name("email")).SendKeys(account.Email); }
private void EnterUserPassword(AccountData account) { Type(By.Id("password"), account.Password); driver.FindElement(By.CssSelector("input[type=submit]")).Click(); }
public void DeleteProject(AccountData account, string id) { client.mc_project_delete(account.Username, account.Password, id); }
public void EnterUserName(AccountData account) { Type(By.Id("username"), account.Name); driver.FindElement(By.CssSelector("input[type=submit]")).Click(); }
private void FillUserNameInput(AccountData accountData) { Driver.FindElement(By.Id("username")).SendKeys(accountData.Name); }
public string GetConfirmationUrl(AccountData account) { string message = manager.Mail.GetLastMail(account); return(Regex.Match(message, @"http://\S*").Value); }