示例#1
0
        public static void ChangePassword(LoginPage loginPage, String userName, String password, String newUser, String changePassword)
        {
            DashBoardPage dashBoardPage = LoginCommons.Login(loginPage, userName, password);

            Assert.IsTrue(dashBoardPage.IsUsersLinkDisplayed(), "NO se mostro el link de Users");

            AuthUserPage authUserPage = dashBoardPage.UsersLinkClick();

            Assert.IsTrue(authUserPage.IsTitleDisplayed(), "NO se mostro el titulo");
            Assert.IsTrue(authUserPage.IsUserLinkDisplayed(newUser), "NO se mostro el link del usuario");

            ChangeUserPage changeUserPage = authUserPage.UserLinkClick(newUser);

            Assert.IsTrue(changeUserPage.IsChangePasswordLinkDisplayed(), "No se mostro el link para cambiar la clave");

            ChangePasswordPage changePasswordPage = changeUserPage.ChangePasswordClick();

            Assert.IsTrue(changePasswordPage.IsPassword1Displayed(), "No se mostro el campo Password1");
            Assert.IsTrue(changePasswordPage.IsPassword2Displayed(), "No se mostro el campo Password2");

            changePasswordPage.FillPassword1(changePassword);
            changePasswordPage.FillPassword2(changePassword);
            changeUserPage = changePasswordPage.Submit();

            Assert.IsTrue(changeUserPage.IsTitleDisplayed(), "No se mostro el titulo");
            LoginCommons.Logout(changeUserPage);
        }
示例#2
0
        public void ChangePassword()
        {
            LoginPage loginPage = new LoginPage(this.Driver);

            loginPage.FillUserName(ConfigurationManager.AppSettings["USERNAME"]);
            loginPage.FillPassword(ConfigurationManager.AppSettings["PASSWORD"]);

            DashBoardPage dashBoardPage = loginPage.Submit();

            Assert.IsTrue(dashBoardPage.IsLogOutDisplayed(), "Logout link not displayed");
            Assert.IsTrue(dashBoardPage.IsChangePasswordDisplayed(), "Change password link not displayed");

            AuthUserPage authUserPage = dashBoardPage.UsersLinkClick();

            Assert.IsTrue(authUserPage.IsTitleDisplayed(), "NO se mostro el titulo");
            Assert.IsTrue(authUserPage.IsUserLinkDisplayed(ConfigurationManager.AppSettings["NEW_USER"]), "NO se mostro el link del usuario");

            ChangeUserPage changeUserPage = authUserPage.UserLinkClick(ConfigurationManager.AppSettings["NEW_USER"]);

            Assert.IsTrue(changeUserPage.IsChangePasswordLinkDisplayed(), "No se mostro el link para cambiar la clave");

            ChangePasswordPage changePasswordPage = changeUserPage.ChangePasswordClick();

            Assert.IsTrue(changePasswordPage.IsPassword1Displayed(), "No se mostro el campo Password1");
            Assert.IsTrue(changePasswordPage.IsPassword2Displayed(), "No se mostro el campo Password2");

            changePasswordPage.FillPassword1(ConfigurationManager.AppSettings["CHANGE_PASSWORD"]);
            changePasswordPage.FillPassword2(ConfigurationManager.AppSettings["CHANGE_PASSWORD"]);
            changeUserPage = changePasswordPage.Submit();

            Assert.IsTrue(changeUserPage.IsTitleDisplayed(), "No se mostro el titulo");
        }
示例#3
0
        public static void DeleteUser(LoginPage loginPage, String userName, String password, String newUser)
        {
            // llenar el formulario de login
            DashBoardPage dashBoardPage = LoginCommons.Login(loginPage, userName, password);

            Assert.IsTrue(dashBoardPage.IsUsersLinkDisplayed(), "NO se mostro el link de Users");

            AuthUserPage authUserPage = dashBoardPage.UsersLinkClick();

            Assert.IsTrue(authUserPage.IsTitleDisplayed(), "NO se mostro el titulo");
            Assert.IsTrue(authUserPage.IsUserLinkDisplayed(newUser), "NO se mostro el link del usuario");

            ChangeUserPage changeUserPage = authUserPage.UserLinkClick(newUser);

            Assert.IsTrue(changeUserPage.IsDeleteLinkDisplayed(), "No se mostro el link para cambiar la clave");

            DeleteUserPage deleteUserPage = changeUserPage.DeleteLinkClick();

            authUserPage = deleteUserPage.Submit();
            Assert.IsFalse(authUserPage.IsUserLinkDisplayed(newUser), "SI se mostro el link del usuario");
            LoginCommons.Logout(authUserPage);
        }
示例#4
0
        public void CreateUser()
        {
            LoginPage loginPage = new LoginPage(this.Driver);

            loginPage.FillUserName(ConfigurationManager.AppSettings["USERNAME"]);
            loginPage.FillPassword(ConfigurationManager.AppSettings["PASSWORD"]);

            DashBoardPage dashBoardPage = loginPage.Submit();

            Assert.IsTrue(dashBoardPage.IsLogOutDisplayed(), "Logout link not displayed");
            Assert.IsTrue(dashBoardPage.IsChangePasswordDisplayed(), "Change password link not displayed");

            AuthUserPage authUserPage = dashBoardPage.UsersLinkClick();

            Assert.IsTrue(authUserPage.IsTitleDisplayed(), "NO se mostro el titulo");
            Assert.IsTrue(authUserPage.IsAddUserLinkDisplayed(), "NO se mostro el boton de Add Users");

            authUserPage.FilterByStaffYesClick();
            authUserPage.FilterByStaffNoClick();
            authUserPage.FilterByStaffAllClick();

            AddUserPage addUserPage = authUserPage.AddUserClick();

            Assert.IsTrue(addUserPage.IsTitleDisplayed(), "No se mostro el titulo");

            addUserPage.FillUserName(ConfigurationManager.AppSettings["NEW_USER"]);
            addUserPage.FillPasswod1(ConfigurationManager.AppSettings["NEW_PASSWORD"]);
            addUserPage.FillPasswod2(ConfigurationManager.AppSettings["NEW_PASSWORD"]);
            ChangeUserPage changeUserPage = addUserPage.Submit();

            Assert.IsTrue(changeUserPage.IsTitleDisplayed(), "No se mostro el titulo");

            changeUserPage.CheckStaff();
            changeUserPage.CheckSuperuser();
            authUserPage = changeUserPage.Submit();

            Assert.IsTrue(authUserPage.IsUserLinkDisplayed(ConfigurationManager.AppSettings["NEW_USER"]), "No se mostro el nuevo usuario");
        }
示例#5
0
        public static void CreateUser(LoginPage loginPage, String userName, String password, String newUser, String newPassword, Boolean checkStaff, Boolean checkSuperuser)
        {
            // llenar el formulario de login
            DashBoardPage dashBoardPage = LoginCommons.Login(loginPage, userName, password);

            Assert.IsTrue(dashBoardPage.IsUsersLinkDisplayed(), "NO se mostro el link de Users");

            AuthUserPage authUserPage = dashBoardPage.UsersLinkClick();

            Assert.IsTrue(authUserPage.IsTitleDisplayed(), "NO se mostro el titulo");
            Assert.IsTrue(authUserPage.IsAddUserLinkDisplayed(), "NO se mostro el boton de Add Users");

            AddUserPage addUserPage = authUserPage.AddUserClick();

            Assert.IsTrue(addUserPage.IsTitleDisplayed(), "No se mostro el titulo");

            addUserPage.FillUserName(newUser);
            addUserPage.FillPasswod1(newPassword);
            addUserPage.FillPasswod2(newPassword);
            ChangeUserPage changeUserPage = addUserPage.Submit();

            Assert.IsTrue(changeUserPage.IsTitleDisplayed(), "No se mostro el titulo");

            if (checkStaff)
            {
                changeUserPage.CheckStaff();
            }
            if (checkSuperuser)
            {
                changeUserPage.CheckSuperuser();
            }
            authUserPage = changeUserPage.Submit();

            Assert.IsTrue(authUserPage.IsUserLinkDisplayed(newUser), "No se mostro el nuevo usuario");
            LoginCommons.Logout(authUserPage);
        }