예제 #1
0
        public void RemoveProducFromCart()
        {
            Product            firstTestMice = ProductCreator.WithFirstWireMice();
            ProductCatalogPage allMicePage   = new ProductCatalogPage(driver).openPage();
            CartPage           cartPage      = allMicePage.AddProductToCartByName(firstTestMice.ProductName)
                                               .ViewCart().RemoveProduct(firstTestMice.ProductName);
            string emptyCartText = cartPage.GetTextAboutEmptyCart();

            Assert.AreEqual(emptyCartText, "Your cart is empty", "Descriptions does not math");
        }
예제 #2
0
        public void CheckLocalTaxesForState()
        {
            Product              firstTestMice = ProductCreator.WithFirstWireMice();
            ProductCatalogPage   allMicePage   = new ProductCatalogPage(driver).openPage();
            DeliveryShippingPage cartPage      = allMicePage.AddProductToCartByName(firstTestMice.ProductName)
                                                 .ViewCart()
                                                 .ProceedToCheckout()
                                                 .FillAddressField()
                                                 .CotinueToShippingMethod()
                                                 .SelectExpressShipping();
            float localTaxes = cartPage.GetLocalTaxes();

            Assert.AreEqual(localTaxes, 13.3f);
        }
예제 #3
0
        public void CheckProductAddedToCart()
        {
            Product firstTestMice = ProductCreator.WithFirstWireMice();

            ProductCatalogPage allMicePage = new ProductCatalogPage(driver).openPage();
            CartPage           cartPage    = allMicePage.AddProductToCartByName(firstTestMice.ProductName)
                                             .ViewCart();
            bool isAdded = cartPage.isProductAdded(firstTestMice.ProductName);

            Assert.IsTrue(isAdded, "Product not added");
            Assert.IsTrue(cartPage.CountAddedProducts() == 1, "Count added product does not match ");
            List <string> productDescr = cartPage.GetProductDescription(firstTestMice.ProductName);

            Assert.AreEqual(productDescr, firstTestMice.ProductDescriptions, "Descriptions does not math");
        }
예제 #4
0
        public void AddTwoDifferentProductToCart()
        {
            Product            firstTestMice  = ProductCreator.WithFirstWireMice();
            Product            secondTestMice = ProductCreator.WithSecondWireMice();
            ProductCatalogPage allMicePage    = new ProductCatalogPage(driver).openPage();

            allMicePage.AddProductToCartByName(firstTestMice.ProductName);

            CartPage cartPage = allMicePage.openPage().
                                AddProductToCartByName(secondTestMice.ProductName)
                                .ViewCart();

            Assert.IsTrue(cartPage.CountAddedProducts() == 2);
            Assert.IsTrue(cartPage.isProductAdded("Razer DeathAdder V2 Pro"), "Product  not added");
            Assert.IsTrue(cartPage.isProductAdded("Razer Naga Pro"), "Product  not added");
        }
예제 #5
0
 public MainMenuSteps(HomePage homePage, ProductCatalogPage productCatalogPage, IWebDriver driver)
 {
     this.homePage           = homePage;
     this.productCatalogPage = productCatalogPage;
     this.driver             = driver;
 }