示例#1
0
        public void ShouldBeAbleToFilterProductsByHighPrice()
        {
            var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            _driver = new FirefoxDriver(outPutDirectory);
            var InventoryPO = new InventoryPO(_driver);

            InventoryPO.Visit();
            InventoryPO.filterByHighPrice();

            Assert.AreEqual("$49.99", _driver.FindElement(By.ClassName("inventory_item_price")).Text);
        }
示例#2
0
        public void ShouldBeAbleToFilterProductsByNameZtoA()
        {
            var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            _driver = new FirefoxDriver(outPutDirectory);
            var InventoryPO = new InventoryPO(_driver);

            InventoryPO.Visit();
            InventoryPO.filterByNameZtoA();

            Assert.AreEqual("Test.allTheThings() T-Shirt (Red)",
                            _driver.FindElement(By.ClassName("inventory_item_name")).Text);
        }
示例#3
0
        public void ShouldBeAbleToCompletePurchase()
        {
            var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            _driver = new FirefoxDriver(outPutDirectory);
            var InventoryPO   = new InventoryPO(_driver);
            var CartPO        = new CartPO(_driver);
            var CheckoutOnePO = new CheckoutOnePO(_driver);
            var CheckoutTwoPO = new CheckoutTwoPO(_driver);

            InventoryPO.Visit();
            InventoryPO.addAllItemsToCart();
            CartPO.confirmCart();
            CheckoutOnePO.fillInformationForm("Andrei", "Gonçalves", "1109657");
            CheckoutOnePO.submitForm();
            CheckoutTwoPO.finishPurchase();

            Assert.IsTrue(_driver.Url.Contains("checkout-complete.html"));
        }