public ShoppingCartSummaryPage ProceedToCheckOut()
        {
            proceedToCheckOutButton.Click();
            ShoppingCartSummaryPage shoppingCartSummaryPage = new ShoppingCartSummaryPage();

            return(shoppingCartSummaryPage);
        }
Beispiel #2
0
        public void ShouldUserAddBlouseToTheCart()
        {
            MainPage mainPage = new MainPage();
            ConfirmationBuyingPage  confirmationBuyingPage  = mainPage.MouseOverBlouse().ClickAddToCartButton();
            ShoppingCartSummaryPage shoppingCartSummaryPage = confirmationBuyingPage.ClickOnProceedToCheckoutBtn();

            Assert.AreEqual("1", shoppingCartSummaryPage.getQuantityOfAddedElements(), "Item was not added to the cart. Please investigate.");
        }
 public AddToCartSpecImplementation()
 {
     _webDriver = WebDriverManager.Driver;
     _homePage  = new HomePage(_webDriver);
     _searchCategoryResultPage = new SearchCategoryResultPage(_webDriver);
     _productPage             = new ProductPage(_webDriver);
     _addedToCartModalPage    = new AddedToCartModalPage(_webDriver);
     _shoppingCartSummaryPage = new ShoppingCartSummaryPage(_webDriver);
 }
Beispiel #4
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
        }
        public void Buy(int amountToBuy)
        {
            DressesPage dressesPage = new DressesPage();

            dressesPage.AddToCart();

            ShoppingCartSummaryPage shoppingCartSummaryPage = dressesPage.ProceedToCheckOut();

            shoppingCartSummaryPage.AddQty(amountToBuy);
            TotalOrder = shoppingCartSummaryPage.GetTotal();

            ShoppingCartAddressPage shoppingCartAddressPage = shoppingCartSummaryPage.ProceedToCheckOut();

            ShoppingCartShippingPage shoppingCartShippingPage = shoppingCartAddressPage.ProceedToCheckOut();

            shoppingCartShippingPage.AcceptTerms();

            ShoppingCartPaymentPage shoppingCartPaymentPage = shoppingCartShippingPage.ProceedToCheckOut();
            Confirm confirm = shoppingCartPaymentPage.PayByBank();

            Order orderToBuy = confirm.ConfirmOrderToBuy();

            TotalPaid = orderToBuy.GetAmount();
        }