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()); }
public void SearchForProductTest() { // Arrange NavigateToURL(); HomePage homePage = new HomePage(Driver); SignInPage signInPage = new SignInPage(Driver); UserPage userPage = new UserPage(Driver); ProductsPage products = new ProductsPage(Driver); //Act products.searchforTshirt(); products.AddTshirtToCart(); products.OpenCartFromTshirt(); userPage.ProceedTocheckoutFromSummaryPageAction(); userPage.enterCredentialsAndLogin(); userPage.ClickOnProceedButtonDromAddressPage(); userPage.AgreeToConditionAndProceed(); userPage.SelectPaymentType(); userPage.ConfirmOrder(); //Assert Assert.AreEqual(userPage.OrderConfirmationTextMessage(), "Your order on My Store is complete.", "The order was not OK"); userPage.logoutAction(); Assert.IsTrue(signInPage.IsSigninButtonDisplayed()); Assert.AreEqual(userPage.checkIfLoginWasOk(), "AUTHENTICATION", "Logout action was not ok"); }
public void AddAndDeleteItemsFromCartTest() { // 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.RemoveExtraQuantity(); homePage.navigateInNestedMenu(); products.AddToCardFirstDress(); products.AddToCardSecondDress(); products.AddToCardThridDress(); products.ProceedToCheckoutAction(); userPage.DeleteItemsFromCart(); userPage.ProceedTocheckoutFromSummaryPageAction(); userPage.ClickOnProceedButtonDromAddressPage(); userPage.AgreeToConditionAndProceed(); userPage.SelectPaymentType(); userPage.ConfirmOrder(); //Assert Assert.AreEqual(userPage.OrderConfirmationTextMessage(), "Your order on My Store is complete.", "The order was not OK"); userPage.logoutAction(); Assert.AreEqual(userPage.checkIfLoginWasOk(), "AUTHENTICATION", "Logout action was not ok"); }