public void RemovingItemShouldDecreaseCartCount() { var cart = new ShoppingCart(_driver); cart.RemoveItem(_title); //Ajax call... will return straight away. LaunchBrowser.Wait(_driver); Assert.IsTrue(_driver.FindElement(By.Id("update-message")).Displayed); Assert.AreEqual(0, cart.HeaderCount(), "Header count different"); Assert.IsFalse(cart.IsInCart(_title)); }
public void AddingItemShouldIncreaseCartNumber() { string title = "The Best Of Men At Work"; new Homepage(_driver).SelectItem(title); new ItemListing(_driver).AddToCart(); var cart = new ShoppingCart(_driver); LaunchBrowser.TakeScreenshotOnFailure(_driver, () => { Assert.AreEqual(1, cart.HeaderCount(), "Header count different"); Assert.IsTrue(cart.IsInCart(title)); }); }