public void AddOneProductToCart()
        {
            _productsPageSteps.AddFirstProductToCart();
            Assert.That(_productsPage.ProductAddedMessage.Text, Is.EqualTo("Product 1 added to cart"));

            _productsPage.MiniCart.CartButton.Click();

            var cartPage = new CartPage(Driver);
            var actualCountOfItemsInCart = cartPage.ItemsInCart.Count - 1;

            Assert.AreEqual("Cart: quantity - 1, cost - 100 USD", _productsPage.MiniCart.InfoAboutCart.Text);
            Assert.AreEqual(1, actualCountOfItemsInCart);
        }
Пример #2
0
        public void SetUp()
        {
            var productsSteps = new ProductsPageSteps(Driver);

            productsSteps.AddFirstProductToCart();
            productsSteps.GoToTheCart();

            _cartPage = new CartPage(Driver);
        }
Пример #3
0
        public void SetUp()
        {
            var productsPageSteps = new ProductsPageSteps(Driver);

            productsPageSteps.AddFirstProductToCart();

            var cartPage = new CartPage(Driver, true);

            cartPage.CheckoutButton.Click();

            _checkoutPage     = new CheckoutPage(Driver);
            _detailsFormSteps = new DetailsFormSteps(Driver);

            _wait = new WaitService(Driver);
        }