Exemplo n.º 1
0
        public void CheckIfAddButtonIsDisabled()
        {
            var task1 = new Task1(this.Driver);
            task1.NavigateToPage(GetHost() + "task_1");
            task1.AddAmount("product1", "1");

            var elementName = task1.GetProductName();
            task1.RemoveProduct();

            Assert.False(task1.IsButtonEnabled(), "add buton is not disabled");
        }
Exemplo n.º 2
0
        public void RemoveProduct2()
        {
            var task1 = new Task1(this.Driver);
            task1.NavigateToPage(GetHost() + "task_1");
            task1.AddAmount("product1", "1");

            var elementName = task1.GetProductName();
            task1.RemoveProduct();
            task1.AddAmount("product1", "1");

            Assert.True(task1.GetBasketText().Contains(elementName), "product was not removed");
            var productPrice = task1.GetProductPrice();

            Assert.AreEqual(productPrice, task1.GetSummaryPrice().Split(' ')[0], "summary price in basket is improper, should be {0}", productPrice);
        }
Exemplo n.º 3
0
        public void RemoveProduct()
        {
            var task1 = new Task1(this.Driver);
            task1.NavigateToPage(GetHost() + "task_1");
            task1.AddAmount("product1", "1");

            var elementName = task1.GetProductName();
            task1.RemoveProduct();

            Assert.False(task1.GetBasketText().Contains(elementName), "product was not removed");
        }