コード例 #1
0
ファイル: ShoPom2.cs プロジェクト: eisoftserv/Selenium
        public void SubtractButtonCart()
        {
            var menu = new MenuPart(driver);

            // hitting the menu should return at least one result
            Assert.That(menu.BringTshirts(), Is.True);

            var    offer = new OfferPart(driver);
            double price = offer.PutProductInCart(0, 2);

            Assert.That(price >= 0, Is.True);

            var   cart    = new CartPart(driver);
            Stock classic = cart.StepClassicCart("-");

            Assert.That(classic != null, Is.True);
            Stock ajax = cart.GetAjaxCart();

            Assert.That(ajax != null, Is.True);

            cart.EmptyAjaxCart();

            // check Classic Cart
            Assert.That((1 == classic.Quantity && price == classic.Value), Is.True);
            //check Ajax Cart
            Assert.That((1 == ajax.Quantity && price == ajax.Value), Is.True);
        } // SubtractButtonInCart
コード例 #2
0
ファイル: ShoPom2.cs プロジェクト: eisoftserv/Selenium
        public void EmptyCartBySubtractButton()
        {
            var menu = new MenuPart(driver);

            // hitting the menu should return at least one result
            Assert.That(menu.BringTshirts(), Is.True);

            var    offer = new OfferPart(driver);
            double price = offer.PutProductInCart(0, 1);

            Assert.That(price >= 0, Is.True);

            var   cart    = new CartPart(driver);
            Stock classic = cart.StepClassicCart(".");

            Assert.That(classic == null, Is.True);

            Stock ajax = cart.GetAjaxCart();

            Assert.That(ajax == null, Is.True);
        } // EmptyCartBySubtractButton