Exemple #1
0
        public void Checkout_NavigateToCheckoutWithNoAddresses_URLIsAddresses()
        {
            AddressTests.RemoveAllAddresses(driver);
            CartTests.ClearCart(driver);
            CartTests.AddFirstGameWithPriceToCart(driver, 20);
            CartTests.SetFirstGameFormat(driver, false);
            IWebElement cart = driver.FindElement(By.LinkText("Cart"));

            cart.Click();
            IWebElement checkout = driver.FindElement(By.Id("Checkout"));

            checkout.Click();
            Assert.AreEqual(driver.Url, homeURL + AddressTests.addressesUrl);
        }
Exemple #2
0
        public static string SetupValidCartOneGame(CVGSTestContainer container, IWebDriver dri, double gamePrice, bool isDigitalGame = true)
        {
            container.LoginAsMember();
            AddressTests.RemoveAllAddresses(dri);
            AddressTests.AddDefaultAddresses(dri);
            CartTests.ClearCart(dri);
            string result = CartTests.AddFirstGameWithPriceToCart(dri, gamePrice);

            CartTests.SetFirstGameFormat(dri, isDigitalGame);
            IWebElement cart = dri.FindElement(By.LinkText("Cart"));

            cart.Click();
            IWebElement checkout = dri.FindElement(By.Id("Checkout"));

            checkout.Click();
            return(result);
        }