Exemplo n.º 1
0
        //i.	Ca si admin, dati click pe buton de administrare si accesati meniul Utilizatori, alegeti un utilizator si editati.
        public void VerifyEditUserAsAdmin()
        {
            HomePage        homePage        = new HomePage(Driver);
            LoginPage       loginPage       = new LoginPage(Driver);
            SignUpPage      signUpPage      = new SignUpPage(Driver);
            UtilizatoriPage utilizatoriPage = new UtilizatoriPage(Driver);

            //Arrange
            NavigateToUrl(SiteUrl);
            homePage.GoToAuthentication();
            loginPage.AuthenticateUser(AdminUser, AdminPassword);
            homePage.GoToMenu("Administrare");
            homePage.GoToMenu("Utilizatori");

            //Act
            //utilizatoriPage.EditUser();  //edit first user
            utilizatoriPage.ClickEditUser(AdinaUser);  //edit specific user
            signUpPage.FillInEmailField("*****@*****.**");
            utilizatoriPage.ClickActualizeazaUtilizator();

            //Assert
            loginPage.VerifyElementContainsText(loginPage.AlertMessage, "The user has been successfully updated.");

            //Change email back to initial value
            signUpPage.FillInEmailField(AdinaUser);
            utilizatoriPage.ClickActualizeazaUtilizator();
        }
Exemplo n.º 2
0
        public void WhenIEditTheUser(string userEmail)
        {
            SignUpPage      signUpPage      = new SignUpPage(Driver);
            UtilizatoriPage utilizatoriPage = new UtilizatoriPage(Driver);

            utilizatoriPage.ClickEditUser(userEmail);  //edit specific user
            signUpPage.FillInEmailField("*****@*****.**");
            utilizatoriPage.ClickActualizeazaUtilizator();
            //Change email back to initial value
            signUpPage.FillInEmailField(userEmail);
            utilizatoriPage.ClickActualizeazaUtilizator();
        }