Esempio n. 1
0
        public void OrderSummerDressesTest()
        {
            // Arrange
            NavigateToURL();
            HomePage     homePage          = new HomePage(Driver);
            SignInPage   signInPage        = new SignInPage(Driver);
            UserPage     userPage          = new UserPage(Driver);
            ProductsPage summerDressesPage = new ProductsPage(Driver);



            //Act
            homePage.navigateInNestedMenu();
            summerDressesPage.AddToCardFirstDress();
            summerDressesPage.AddToCardSecondDress();
            summerDressesPage.AddToCardThridDress();
            summerDressesPage.ProceedToCheckoutAction();
            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.AreEqual(userPage.checkIfLoginWasOk(), "AUTHENTICATION", "Logout action was not ok");
        }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        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");
        }