예제 #1
0
        public void Login_Express_Checkout_Game_Page()
        {
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/play/eurojackpot/");

            //Pay for tickets
            RegularGamePageObj regularGame = new RegularGamePageObj(_driver);

            //Go to single tab
            regularGame.ClickStandartGameButton();
            regularGame.ClickBuyTicketsButton();

            ExpressCheckoutObj checkout = new ExpressCheckoutObj(_driver);
            Thread.Sleep(TimeSpan.FromSeconds(1));
            checkout.SignIn(_driverCover.Login, _driverCover.Password);

            _usersVerifications.CheckIfSignedIn_Mobile();
        }
예제 #2
0
        public void Change_Number_Of_Draws_In_The_Cart_For_Regular_Ticket(bool toSignIn)
        {
            if (toSignIn)
            {
                _commonActions.Log_In_Front_PageOne(_driverCover.Login, _driverCover.Password);
            }

            _commonActions.AddRegularTicketToCart_Front("en/play/el-gordo-de-la-primitiva/");
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/carts");

            CartObj cart = new CartMobileObj(_driver);
            cart.ChangeNumberOfDraws(1, 10);

            cart.EditTicket("El Gordo");

            RegularGamePageObj regulaerGame = new RegularGamePageObj(_driver);

            Assert.AreEqual(10, regulaerGame.NumberOfDraws, "Sorry but number of draw on the play page is not as it was selected in the cart. ");

            if (toSignIn)
            {
                _cartActions.DeleteAllTicketFromCart_Front();
            }
        }
        /// <summary>
        /// Performs once before all other tests. Buys a regular single ticket 
        /// </summary>
        //  [TestFixtureSetUp]
        public void Buy_Regular_Multi_Draw_Ticket(WayToPay merchant)
        {
            // Log in
            if (merchant != WayToPay.InternalBalance)
            {
                _commonActions.Log_In_Front_PageOne(_driverCover.Login, _driverCover.Password);
            }
            else
            {
                //If pay with internal balance we need to log in with different user
                _commonActions.Log_In_Front_PageOne(_driverCover.LoginTwo, _driverCover.Password);
            }

            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/play/eurojackpot/");

            //Pay for tickets
            RegularGamePageObj regularGame = new RegularGamePageObj(_driver);

            //Go to single tab
            regularGame.ClickStandartGameButton();

            _totalPrice = regularGame.TotalPrice;
            _drawsToPlay = regularGame.NumberOfDraws;

            MerchantsObj merchants = regularGame.ClickBuyTicketsButton();

            if (merchant != WayToPay.InternalBalance)
            {
                merchants.Pay(merchant);
            }
            else
            {
                CheckoutObj checkout = new CheckoutObj(_driver);
                checkout.ClickCompleteYourOrderButton();
            }
        }
        /// <summary>
        /// Performs once before all other tests. Buys a regular single ticket 
        /// </summary>
        // [TestFixtureSetUp]
        public void Buy_Regular_One_Draw_Ticket(WayToPay merchant)
        {
            // Log in
            if (merchant != WayToPay.InternalBalance)
            {
                _commonActions.Log_In_Front_PageOne(_driverCover.Login, _driverCover.Password);
            }
            else
            {
                //If pay with internal balance we need to log in with different user
                _commonActions.Log_In_Front_PageOne(_driverCover.LoginTwo, _driverCover.Password);
            }

            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/play/el-gordo-de-la-primitiva/");

            //Pay for tickets
            RegularGamePageObj regularGame = new RegularGamePageObj(_driver);

            //go to single tab
            regularGame.ClickStandartGameButton();

            //Select single draw
            regularGame.SelectOneTimeEntryGame();

            _totalPrice = regularGame.TotalPrice;

            MerchantsObj merchants = regularGame.ClickBuyTicketsButton();

            if (merchant != WayToPay.InternalBalance)
            {
                merchants.Pay(merchant);
            }
            else
            {
                CheckoutObj checkout = new CheckoutObj(_driver);
                checkout.ClickCompleteYourOrderButton();
            }
        }
예제 #5
0
 /// <summary>
 /// On front-end play page switch to regular game tab. You have to be on this page to makethis action safely
 /// </summary>
 /// <returns></returns>
 public RegularGamePageObj SelectRegularGameTab_Front()
 {
     RegularGamePageObj game = new RegularGamePageObj(_driver);
     game.ClickStandartGameButton();
     return game;
 }
예제 #6
0
        /// <summary>
        /// Buys a regular one-draw ticket
        /// </summary>
        /// <returns>Total price to pay</returns>
        public double BuyRegularOneDrawTicket_Front(WayToPay merchant, bool processOrder = true)
        {
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/play/powerball/");

            //Pay for tickets
            RegularGamePageObj regularGame = new RegularGamePageObj(_driver);

            //go to single tab
            regularGame.ClickStandartGameButton();

            //Select single draw
            regularGame.SelectOneTimeEntryGame();

            double totalPrice = regularGame.TotalPrice;

            MerchantsObj merchants = regularGame.ClickBuyTicketsButton();

            if (processOrder)
            {
                merchants.Pay(merchant);
            }
            else
            {
                merchants.Pay(merchant, false);
            }

            return totalPrice;
        }
예제 #7
0
        /// <summary>
        /// Adds a regular ticket to the cart
        /// </summary>
        /// <param name="address"></param>
        public void AddRegularTicketToCart_Front(string address)
        {
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + address);
            RegularGamePageObj game = new RegularGamePageObj(_driver);
            game.ClickStandartGameButton();

            game.ClickBuyTicketsButton();
        }