Beispiel #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"]);
        }
Beispiel #2
0
        public void CreateUser(String newUser, String newPassword)
        {
            LoginPage loginPage = new LoginPage(this.Driver);

            UserCommons.CreateUser(
                loginPage,
                ConfigurationManager.AppSettings["USERNAME"],
                ConfigurationManager.AppSettings["PASSWORD"],
                newUser,
                newPassword,
                true,
                true);
        }
Beispiel #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);
        }