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"); }
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); }
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"); }
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"); }
public MainMenuSteps(HomePage homePage, ProductCatalogPage productCatalogPage, IWebDriver driver) { this.homePage = homePage; this.productCatalogPage = productCatalogPage; this.driver = driver; }