Exemplo 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
        }
Exemplo n.º 2
0
        public void AdicionarItemNoCarrinho()
        {
            #region Arranje

            IndexPage               index     = new IndexPage(driver);
            AuthenticationPage      login     = new AuthenticationPage(driver);
            WomenPage               womenPage = new WomenPage(driver);
            ShoppingCartSummaryPage shoppingCartSummaryPage = new ShoppingCartSummaryPage(driver);
            AddressesPage           addressesPage           = new AddressesPage(driver);
            ShippingPage            shippingPage            = new ShippingPage(driver);
            PaymentPage             paymentPage             = new PaymentPage(driver);

            var User = ManipularArquivoHelper.LerDeUmArquivoQueEstaNoFormatoJson();

            #endregion Arranje

            #region Act

            index.NavegaParaPagina(Resources.Resource.UrlPrincipal);
            index.ClickBtnSign_in();

            login.PreencheCampoEmail(User.Email);
            login.PreencheCampoPassword(User.Password);
            login.ClickBtnSign_in();

            womenPage.NavegaParaAPaginaWomen();
            womenPage.ColocarItemCarrinho();

            shoppingCartSummaryPage.ContinuarCheckout();

            addressesPage.ContinuarCheckout();

            shippingPage.ContinuarCheckout();

            paymentPage.EscolherTipoDePagamento();
            paymentPage.ConfirmarOrdem();

            #endregion Act

            #region Assert

            Assert.AreEqual(paymentPage.RetornaTextoDaMensagem(), "ORDER CONFIRMATION");

            #endregion Assert

            #region Finalization

            index.ClickBtnSign_Out();

            #endregion Finalization
        }
Exemplo n.º 3
0
        public void LoginComUsuarioEPasswordIncorretosFail()
        {
            #region Arranje

            AuthenticationPage login = new AuthenticationPage(driver);

            #endregion Arranje

            #region Act

            login.NavegaParaPagina(Properties.Resource.UrlAuthentication);
            login.PreencheCampoEmail("*****@*****.**");
            login.PreencheCampoPassword("SuperSecretPassword!");
            login.ClickBtnSign_in();

            #endregion Act

            #region Assert

            Assert.AreEqual(login.RetornaTextoDaMensagem(), "Authentication failed.", "Mensagem com erro para simular uma falha");

            #endregion Assert
        }