Ejemplo n.º 1
0
        public void Commons()
        {
            LoginPage loginPage = new LoginPage(this.Driver);

            UserCommons.CreateUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                ConfigurationManager.AppSettings["NEW_USER"],
                ConfigurationManager.AppSettings["NEW_PASSWORD"],
                true,
                true);
            UserCommons.ChangePassword(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                ConfigurationManager.AppSettings["NEW_USER"],
                ConfigurationManager.AppSettings["CHANGE_PASSWORD"]);
            UserCommons.CheckUser(
                loginPage,
                ConfigurationManager.AppSettings["NEW_USER"],
                ConfigurationManager.AppSettings["CHANGE_PASSWORD"]);
            UserCommons.DeleteUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                ConfigurationManager.AppSettings["NEW_USER"]);
        }
Ejemplo n.º 2
0
        public void Delete3User(String newUser)
        {
            LoginPage loginPage = new LoginPage(this.Driver);

            UserCommons.DeleteUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                newUser);
        }
Ejemplo n.º 3
0
        public void FilterTest()
        {
            String    usuario1  = "USUARIO1";
            String    usuario2  = "USUARIO2";
            LoginPage loginPage = new LoginPage(this.Driver);

            UserCommons.CreateUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                usuario1,
                "h9-Q)F5-59!N>nZC",
                true,//Con Staff
                true);
            UserCommons.CreateUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                usuario2,
                "L!JJKA<PYB4eP@u9",
                false,//Sin Staff
                true);

            DashBoardPage dashBoardPage = LoginCommons.Login(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"]);
            AuthUserPage authUserPage = dashBoardPage.UsersLinkClick();

            authUserPage.FilterByStaffYesClick();
            Assert.IsTrue(authUserPage.IsStaffStatusIconDisplayed(usuario1, "True"), "NO se mostro el icono de Staff verde");
            authUserPage.FilterByStaffNoClick();
            Assert.IsTrue(authUserPage.IsStaffStatusIconDisplayed(usuario2, "False"), "NO se mostro el icono de Staff rojo");
            authUserPage.FilterByStaffAllClick();
            Assert.IsTrue(authUserPage.IsStaffStatusIconDisplayed(usuario1, "True"), "NO se mostro el icono de Staff verde");
            Assert.IsTrue(authUserPage.IsStaffStatusIconDisplayed(usuario2, "False"), "NO se mostro el icono de Staff rojo");

            LoginCommons.Logout(authUserPage);

            UserCommons.DeleteUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                usuario1);
            UserCommons.DeleteUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                usuario2);
        }