Exemplo n.º 1
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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        public void Buy()
        {
            //Arrange
            var minpriceValueToSet = 100;
            var maxpriceValueToSet = 2000;
            var name            = "ю-аю-аю-цю-кю-лю-цю";
            int HowCanlongIwait = 15000;

            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, HowCanlongIwait);
            FilteringContext.ClickCheckbox(booksResultsPage, name, HowCanlongIwait);
            ResultSetContext.BuyElement(booksResultsPage, 0, HowCanlongIwait);
            BasketContext.ProceedToCheckout(Basket, HowCanlongIwait);
            CheckoutContext.InputReceiverData(Checkout, HowCanlongIwait);//modification with volid date
            //Assert
            VerificationContext.VerifyMakeOrderIsClickable(Checkout);
        }
Exemplo n.º 5
0
 public void GivenProductIsInTheBasketWithQuantity(int q)
 {
     ResultSetContext.BuyElement(Driver_init.booksResultsPage, 0);
     CartContext.EnterInQuantityField(Driver_init.CartPageWithOrders, q.ToString(), 0);
 }