예제 #1
0
        public void MakingPurchaseTest()
        {
            var landingPage = new LandingPagePageObject(webdriver);

            landingPage
            .DismissWelcomePopup();

            var headerFooter = new HeaderFooterPageObject(webdriver);

            headerFooter
            .SignIn();

            var loginPopup = new LoginPopupPageObject(webdriver);

            loginPopup
            .Login(TestSettings.validLogin, TestSettings.validPassword);


            var mainPage = new MainPagePageObject(webdriver);

            mainPage
            .BuyBananaJuice();
            mainPage
            .DismissCookies();
            mainPage
            .NavigateToNextPage();
            mainPage
            .ByMug();
            var shoppingCart = mainPage
                               .OpenShoppingCart();

            shoppingCart
            .Chekout();
            shoppingCart
            .AddressSelection();
            shoppingCart
            .ContinueToDelivery();
            shoppingCart
            .FastDeliverySelection();
            shoppingCart
            .ContinueToPaimentOptions();
            shoppingCart
            .CardSelection();
            shoppingCart
            .ContinueToReview();
            shoppingCart
            .PayOrder();

            Assert.IsTrue(shoppingCart.CheckTextAfterPurchase("Thank you for your purchase!"));

            Assert.IsTrue(shoppingCart.CkeckBusketIsEmpty("0"));
        }
예제 #2
0
        public void InvalidLoginTest()
        {
            var landingPage = new LandingPagePageObject(webdriver);

            landingPage
            .DismissWelcomePopup();

            var headerFooter = new HeaderFooterPageObject(webdriver);

            headerFooter
            .SignIn();

            var loginPopup = new LoginPopupPageObject(webdriver);

            loginPopup
            .Login(TestSettings.validLogin, TestSettings.invalidPassword);

            Assert.IsTrue(loginPopup.CheckMessageAfterInvalidLogin("Invalid email or password."));
        }