示例#1
0
        public void DeleteAllItemsFromCartTest()
        {
            // Arrange
            NavigateToURL();
            HomePage     homePage   = new HomePage(Driver);
            SignInPage   signInPage = new SignInPage(Driver);
            UserPage     userPage   = new UserPage(Driver);
            ProductsPage products   = new ProductsPage(Driver);

            signInPage.clickOnSignInUsButton();
            userPage.enterCredentialsAndLogin();



            //Act
            homePage.navigateInNestedMenu();
            products.AddToCardFirstDress();
            products.AddToCardSecondDress();
            products.AddTshirtToCart();
            products.OpenCartFromTshirt();
            userPage.DeleteItemsFromCart();
            userPage.DeleteItemsFromCart();
            userPage.DeleteItemsFromCart();


            //Assert

            Assert.AreEqual(products.CheckTextMessageWhenCartIsEmpty(), "Your shopping cart is empty.", "The cart is not empty");
            userPage.logoutAction();
            Assert.IsTrue(signInPage.IsSigninButtonDisplayed());
        }