Esempio n. 1
0
        public void Order_ChangeOrderPendingToProcessed_OrderChangedToProcessed()
        {
            LoginAsMember();
            string gameName = CheckoutTests.SetupValidCartOneGame(this, driver, 20, false);

            CheckoutTests.FillCheckoutForm(driver);
            LoginAsEmployee();
            IWebElement orderLink = driver.FindElement(By.LinkText("Orders"));

            orderLink.Click();
            IWebElement details = driver.FindElement(By.LinkText("Details"));

            details.Click();
            IWebElement gameTitle = driver.FindElement(By.Id("GameTitle"));

            Assert.AreEqual(gameTitle.Text, gameName);
            IWebElement markAsProcessed = driver.FindElement(By.Id("mark"));

            markAsProcessed.Click();
            IWebElement message = driver.FindElement(By.Id("statusMessage"));

            Assert.AreEqual(message.Text, "Order marked as Processed!");
            IWebElement back = driver.FindElement(By.LinkText("Back to Orders List"));

            back.Click();
            IWebElement status = driver.FindElement(By.Id("orderStatus"));

            Assert.AreEqual(status.Text, "Processed");
        }
Esempio n. 2
0
        public void Order_PurchaseOneFreeDigital_OrderExistsAsProccessed()
        {
            LoginAsMember();
            string gameName = CheckoutTests.SetupValidCartOneGame(this, driver, 0, true);

            LoginAsEmployee();
            IWebElement orderLink = driver.FindElement(By.LinkText("Orders"));

            orderLink.Click();
            Assert.AreEqual(driver.Url, homeURL + orderURL);
            IWebElement status = driver.FindElement(By.Id("orderStatus"));

            Assert.AreEqual(status.Text, "Processed");

            IWebElement details = driver.FindElement(By.LinkText("Details"));

            details.Click();
            IWebElement gameTitle = driver.FindElement(By.Id("GameTitle"));

            Assert.AreEqual(gameTitle.Text, gameName);
        }
Esempio n. 3
0
        public void Order_PurchaseOnePricedPhysical_OrderExistsAsPending()
        {
            LoginAsMember();
            string gameName = CheckoutTests.SetupValidCartOneGame(this, driver, 20, false);

            CheckoutTests.FillCheckoutForm(driver);
            LoginAsEmployee();
            IWebElement orderLink = driver.FindElement(By.LinkText("Orders"));

            orderLink.Click();
            Assert.AreEqual(driver.Url, homeURL + orderURL);
            IWebElement status = driver.FindElement(By.Id("orderStatus"));

            Assert.AreEqual(status.Text, "Pending");

            IWebElement details = driver.FindElement(By.LinkText("Details"));

            details.Click();
            IWebElement gameTitle = driver.FindElement(By.Id("GameTitle"));

            Assert.AreEqual(gameTitle.Text, gameName);
        }