Beispiel #1
0
 public void Remove(AccountData account, String projectId)
 {
     Mantis.MantisConnectPortTypeClient client = new Mantis.MantisConnectPortTypeClient();
     client.mc_project_delete(account.Name, account.Password, projectId);
 }
Beispiel #2
0
 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);
 }
Beispiel #5
0
 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());
 }
Beispiel #6
0
 public void FillLoginForm(AccountData account)
 {
     driver.FindElement(By.Name("username")).SendKeys(account.Name);
     Login();
     driver.FindElement(By.Name("password")).SendKeys(account.Password);
 }
Beispiel #7
0
 private void FillRegistrationForm(AccountData account)
 {
     Type(By.Name("username"), account.Name);
     Type(By.Name("email"), account.Name);
 }
Beispiel #8
0
 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();
 }
Beispiel #9
0
 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();
 }
Beispiel #10
0
 public void SetupLogin()
 {
     Administrator = new AccountData("administrator", "root");
     app.Auth.Login(Administrator);
 }
Beispiel #11
0
        public static List <ProjectData> GetAllFromMantisApi(AccountData accountData)
        {
            var client = new Mantis.MantisConnectPortTypeClient();

            return(client.mc_project_add(accountData.Name, accountData.Password));
        }
Beispiel #12
0
 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);
 }
Beispiel #14
0
 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;
 }
Beispiel #16
0
 public void DeleteProject(AccountData account, int id)
 {
     OpenProject(id);
     InitDeleteProject();
     SubmitRemoval();
 }
Beispiel #17
0
 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);
 }
Beispiel #19
0
 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);
 }
Beispiel #21
0
        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);
 }
Beispiel #26
0
 private void EnterUserPassword(AccountData account)
 {
     Type(By.Id("password"), account.Password);
     driver.FindElement(By.CssSelector("input[type=submit]")).Click();
 }
Beispiel #27
0
 public void DeleteProject(AccountData account, string id)
 {
     client.mc_project_delete(account.Username, account.Password, id);
 }
Beispiel #28
0
 public void EnterUserName(AccountData account)
 {
     Type(By.Id("username"), account.Name);
     driver.FindElement(By.CssSelector("input[type=submit]")).Click();
 }
Beispiel #29
0
 private void FillUserNameInput(AccountData accountData)
 {
     Driver.FindElement(By.Id("username")).SendKeys(accountData.Name);
 }
Beispiel #30
0
        public string GetConfirmationUrl(AccountData account)
        {
            string message = manager.Mail.GetLastMail(account);

            return(Regex.Match(message, @"http://\S*").Value);
        }