Exemple #1
0
        public void BottomCoBrandContentNotVisibleForAnonymousUsers()
        {
            IndexHomePage indexHomePage        = new IndexHomePage(Driver, Url);
            string        CoBrandBottomContent = indexHomePage.GetCoBrandSectionText(IndexHomePageSectionsEnum.Bottom);

            Assert.IsTrue(string.IsNullOrEmpty(CoBrandBottomContent), "Anonymous user should not be able to see CoBrand content -> bottom zone");
        }
Exemple #2
0
        //[TestMethod]
        public void CheckCartOnlinePriceTag()
        {
            string        expectedTagName    = "Online price";
            IndexHomePage indexHomePage      = new IndexHomePage(Driver, Url);
            var           manufacturers      = indexHomePage.TopHeader.GetManufacturerMenuOptionsText();
            string        secondManufacturer = manufacturers.ElementAt(1);

            indexHomePage.TopHeader.SetManufacturerDropdown(secondManufacturer);
            ProductListPage productListPage = indexHomePage.TopHeader.ClickOnSubmit();
            var             firstItem       = productListPage.GetResultItems().FirstOrDefault();

            firstItem.ClickOnAddToCart();
            //productListPage.IsAppBusy();
            //Go back to index page
            indexHomePage = productListPage.TopHeader.ClickOnLogo();
            CartPage cartPage = indexHomePage.UtilityMenu.ClickOnCart();

            cartPage.WaitUntilItemsAreDisplayed();
            var cartItems = cartPage.GetProductItems();

            foreach (var item in cartItems)
            {
                //check each item for tag value
                Assert.AreEqual(expectedTagName, item.GetItemDetail(ProductItemDetailsEnum.PriceTag));
            }
        }
Exemple #3
0
        //[TestMethod]
        public void CheckPriceTagOnCheckoutPage()
        {
            string        expectedPriceTag  = "Online price";
            IndexHomePage indexPage         = new IndexHomePage(Driver, Url);
            string        firstManufacturer = indexPage.TopHeader.GetManufacturerMenuOptionsText().ElementAtOrDefault(1);

            indexPage.TopHeader.SetManufacturerDropdown(firstManufacturer);
            ProductListPage productsListPage = indexPage.TopHeader.ClickOnSubmit();
            var             firstProductItem = productsListPage.GetResultItems().FirstOrDefault();

            firstProductItem.ClickOnAddToCart();
            productsListPage.WaitForAppBusy();
            indexPage = productsListPage.TopHeader.ClickOnLogo();
            CartPage cartPage = indexPage.UtilityMenu.ClickOnCart();

            cartPage.WaitUntilItemsAreDisplayed();
            SignInRegisterPage signInPage   = cartPage.ClickOnProceedToCheckoutButtonAnonymous();
            CheckoutPage       checkoutPage = signInPage.ClickOnCheckoutAsGuest();

            checkoutPage.WaitUntilItemsAreDisplayed();
            var productItems = checkoutPage.GetProductItems();

            foreach (var product in productItems)
            {
                System.Console.WriteLine(product.GetItemDetail(ProductItemDetailsEnum.PriceTag));
                Assert.AreEqual(expectedPriceTag, product.GetItemDetail(ProductItemDetailsEnum.PriceTag));
            }
        }
Exemple #4
0
        public void BottomCoBrandContentNotVisibleForAnonymousUsers(string browser)
        {
            Driver = GetDriverInstance(browser);
            IndexHomePage indexHomePage        = new IndexHomePage(Driver, Url);
            string        CoBrandBottomContent = indexHomePage.GetCoBrandSectionText(IndexHomePageSectionsEnum.Bottom);

            Assert.IsTrue(string.IsNullOrWhiteSpace(CoBrandBottomContent), "Anonymous user should not be able to see CoBrand content -> bottom zone");
        }
Exemple #5
0
        public void CheckFmpPhoneNumber(string browser)
        {
            string expectedPhoneNumber = "1.800.257.7737";

            Driver = GetDriverInstance(browser);
            IndexHomePage indexHomePage     = new IndexHomePage(Driver, Url);
            string        actualPhoneNumber = indexHomePage.UtilityMenu.GetPhoneNumber();

            Assert.AreEqual(expectedPhoneNumber, actualPhoneNumber);
        }
Exemple #6
0
        //[TestMethod]
        public void MiniCartOnlinePriceTagIsCorrect()
        {
            string        actualPricingTag   = string.Empty;
            string        expectedPricingTag = "Online price";
            IndexHomePage indexPage          = new IndexHomePage(Driver, Url);

            indexPage.UtilityMenu.ShowMiniCart();
            actualPricingTag = indexPage.UtilityMenu.MiniCart.GetSection(MiniCartSections.PricingTag);

            Assert.AreEqual(expectedPricingTag, actualPricingTag, "Actual tag '{0}' is not as expected", actualPricingTag);
        }
Exemple #7
0
        //[TestMethod]
        public void CheckProductListOnlinePriceTag()
        {
            string        expectedPriceTag = "Online price";
            IndexHomePage indexHomePage    = new IndexHomePage(Driver, Url);
            var           manufacturers    = indexHomePage.TopHeader.GetManufacturerMenuOptionsText();
            string        manufacturer     = manufacturers.ElementAt(1);

            indexHomePage.TopHeader.SetManufacturer(manufacturer);
            ProductListPage productListPage = indexHomePage.TopHeader.ClickOnSubmit();
            var             productItems    = productListPage.GetResultItems();

            var incorrectPriceTag = productItems.FirstOrDefault(p => p.GetItemDetail(ProductItemDetailsEnum.PriceTag) != expectedPriceTag);

            Assert.IsNull(incorrectPriceTag, $"Theres an invalid Price tag on {manufacturer}");
        }
Exemple #8
0
        //[TestMethod]
        public void CheckProductDetailOnlinePriceTag()
        {
            string        expectedPriceTag = "Online price";
            IndexHomePage indexPage        = new IndexHomePage(Driver, Url);
            var           manufacturers    = indexPage.TopHeader.GetManufacturerMenuOptionsText();
            //Get the second manufacturer
            string manufacturer = manufacturers.ElementAtOrDefault(1);

            indexPage.TopHeader.SetManufacturer(manufacturer);
            ProductListPage   productListPage   = indexPage.TopHeader.ClickOnSubmit();
            var               productItem       = productListPage.GetResultItems().FirstOrDefault();
            ProductDetailPage productDetailPage = productItem.Click();
            string            actualPriceTag    = productDetailPage.GetProductSection(ProductDetailSections.PriceTag);

            Assert.AreEqual(expectedPriceTag, actualPriceTag);
        }