Esempio n. 1
0
        public void AuthenticationPageComUsuarioEPasswordCorretos()
        {
            #region Arranje

            MyAccountPage myAccountPage = new MyAccountPage(driver);

            var User = ManipularArquivoHelper.LerDeUmArquivoQueEstaNoFormatoJson();

            #endregion Arranje

            #region Act

            index.NavegaParaPagina(Resources.Resource.UrlPrincipal);

            index.ClickBtnSign_in();
            authenticationPage.PreencheCampoEmail(User.Email);
            authenticationPage.PreencheCampoPassword(User.Password);
            authenticationPage.ClickBtnSign_in();

            #endregion Act

            #region Assert

            Assert.AreEqual(myAccountPage.RetornaTextoDaMensagem(), "MY ACCOUNT");

            #endregion Assert
        }
Esempio n. 2
0
        public void ValidarCadastroDeUsuario()
        {
            #region Arranje

            MyAccountPage myAccount = new MyAccountPage(driver);
            var           usuario   = GerarUsuarioHelper.GerarUsuario();

            #endregion Arranje

            #region Act

            authenticationPage.NavegaParaPagina(Resources.Resource.UrlAuthentication);
            authenticationPage.PreencheCampoEmailCreateAccount(usuario.Email);
            authenticationPage.ClickBtnCreateAccount();
            authenticationPage.PreecherDadosUsuario(usuario);
            authenticationPage.ClickBtnRegisterAnAccount();

            #endregion Act

            #region Assert

            Assert.AreEqual(myAccount.RetornaTextoDaMensagem(), "MY ACCOUNT", "Não foi encontrado o texto referente a pagina My account");
            Assert.AreEqual(myAccount.RetornaNomeDoUsuarioDaPagina(), usuario.NomeCompleto, "O nome do usuário esta diferente do esperado");

            #endregion Assert

            #region Finalization

            ManipularArquivoHelper.SalvarNoArquivoEmFormatoJson(usuario);

            #endregion Finalization
        }