public void ThenTheImageOfTheShownProductIsTheSameAsTheImageOfTheProductWeChose(string src)
        {
            string url = Driver_init.CartPageWithOrders.GetImageSrc(0);

            CartContext.ClickLinkOfProduct(Driver_init.CartPageWithOrders, 0);
            GoodStateVerificationContext.VerifyProductImageInCart(Driver_init.SingleBookPage, src);
        }
        public void ThenTheNameOfTheShownProductIsTheSameAsTheNameOfTheProductWeChose()
        {
            string name = Driver_init.CartPageWithOrders.GetProductName(0);

            CartContext.ClickLinkOfProduct(Driver_init.CartPageWithOrders, 0);
            GoodStateVerificationContext.VerifyItemNameInCart(Driver_init.SingleBookPage, name);
        }
        public void ThenThePriceOfTheShownProductIsTheSameAsThePriceOfTheProductWeChose()
        {
            int price = Driver_init.CartPageWithOrders.GetPriceForType(0);

            CartContext.ClickLinkOfProduct(Driver_init.CartPageWithOrders, 0);
            GoodStateVerificationContext.VerifyItemPriceInCart(Driver_init.SingleBookPage, price);
        }
Exemple #4
0
        public void ThenFilterIsCorrect()
        {
            var limits           = ScenarioContext.Current.Get <KeyValuePair <int, int> >("filterLimits");
            var booksResultsPage = new FilterPage(driver);

            ResultSetContext.SelectElement(booksResultsPage, 0);
            var itemPage = new GoodsItemPage(driver);

            GoodStateVerificationContext.VerifyItemPrice(itemPage, limits.Key, limits.Value);
        }
Exemple #5
0
        public void FilterByPrice()
        {
            //Arrange
            var booksResultsPage   = new FilterPage(driver);
            var bookPage           = new GoodsItemPage(driver);
            var minpriceValueToSet = 20;
            var maxpriceValueToSet = 250;

            //Act
            FilteringContext.FilterByPriceRange(booksResultsPage, minpriceValueToSet, maxpriceValueToSet);
            ResultSetContext.SelectElement(booksResultsPage, 0);

            //Assert
            GoodStateVerificationContext.VerifyItemPrice(bookPage, minpriceValueToSet, maxpriceValueToSet);
        }
Exemple #6
0
        public void BuyAProduct()
        {
            //Arrange
            var minpriceValueToSet = 100;
            var maxpriceValueToSet = 2000;
            var name = "‘ол≥о";

            var booksResultsPage = new FilterPage(driver);
            var SingleBookPage   = new GoodsItemPage(driver);
            var Basket           = new BasketPage(driver);
            var Checkout         = new CheckoutPage(driver);

            //Act
            FilteringContext.FilterByPriceRange(booksResultsPage, minpriceValueToSet, maxpriceValueToSet);
            FilteringContext.ClickCheckbox(booksResultsPage, name);
            ResultSetContext.BuyElement(booksResultsPage, 0);
            BasketContext.ProceedToCheckout(Basket);
            CheckoutContext.InputReceiverData(Checkout, "Testik", "0980000001", "*****@*****.**");
            //Assert
            GoodStateVerificationContext.VerifyMakeOrderIsClickable(Checkout);
        }
Exemple #7
0
 public void ThenYouCanClickCrossNearProduct()
 {
     GoodStateVerificationContext.DeleteButtonIsClickable(Driver_init.CartPageWithOrders, 0);
 }
Exemple #8
0
 public void ThenThePriceOfProductShouldBeCorrectInCart()
 {
     GoodStateVerificationContext.PriceIsCorrectInCart(Driver_init.CartPageWithOrders);
 }
Exemple #9
0
 public void ThenTheQuantityOfProductShouldBe(string p0)
 {
     GoodStateVerificationContext.TheQuantityOfProductEquals(Driver_init.CartPageWithOrders, 0, p0);
 }
Exemple #10
0
 public void ThenTheWindowOfTheCartWillBeClosed()
 {
     GoodStateVerificationContext.CartIsNotOpen(Driver_init.CartPageWithOrders);
 }
Exemple #11
0
 public void ThenTheProductShoudBeDeletedFromTheCart()
 {
     GoodStateVerificationContext.ProductIsDeleted(Driver_init.CartPageWithoutOrders);
 }
Exemple #12
0
 public void ThenTheOrderProcessingWindowOpens()
 {
     GoodStateVerificationContext.CheckoutPageIsOpen(Driver_init.CheckoutPage);
 }
 public void ThenYouAreOnTheRelevantAdPage()
 {
     GoodStateVerificationContext.VerifyAdPage(Driver_init.AdPage, adtitle, adsrc);
 }
Exemple #14
0
 public void ThenThereWillBeACheckMarkNearThisProductOnProductPage()
 {
     GoodStateVerificationContext.CheckMarkOnSingleProductPage(Driver_init.SingleBookPage);
 }