예제 #1
0
 /// <summary>
 /// Adds a group ticket to the cart
 /// </summary>
 /// <param name="adress"></param>
 public void AddGroupTicketToCart_Front(string adress)
 {
     //Add ticket to the cart
     _driverCover.NavigateToUrl(_driverCover.BaseUrl + adress);
     GroupGamePageObj groupGame = new GroupGamePageObj(_driver);
     groupGame.ClickBuyTicketsButton();
 }
예제 #2
0
        public void Change_Number_Of_Draws_In_The_Cart_For_Group_Ticket(bool toSignIn, int drawsAmount)
        {
            if (toSignIn)
            {
                _commonActions.Log_In_Front_PageOne(_driverCover.Login, _driverCover.Password);
            }

            _commonActions.AddGroupTicketToCart_Front("en/play/superenalotto/");
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/carts");

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

            cart.EditTicket("superenalotto");

            GroupGamePageObj groupGame = new GroupGamePageObj(_driver);

            Assert.AreEqual(drawsAmount, groupGame.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 group multi-draw ticket 
        /// </summary>
        // [TestFixtureSetUp]
        public void Buy_Group_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
            GroupGamePageObj groupGame = new GroupGamePageObj(_driver);

            _totalPrice = groupGame.TotalPrice;
            _drawsToPlay = groupGame.NumberOfDraws;

            MerchantsObj merchants = groupGame.ClickBuyTicketsButton();

            if (merchant != WayToPay.InternalBalance)
            {
                merchants.Pay(merchant);
            }
            else
            {
                CheckoutObj checkout = new CheckoutObj(_driver);
                checkout.ClickCompleteYourOrderButton();
            }
        }
예제 #4
0
        public void Edit_Group_Ticket_And_Add_More(bool toLogIn)
        {
            if (toLogIn)
            {
                _commonActions.Log_In_Front_PageOne(_driverCover.LoginFour, _driverCover.Password);
            }

            _commonActions.AddGroupTicketToCart_Front("en/play/powerball/");

            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "carts");
            CartObj cart = new CartMobileObj(_driver);
            cart.EditTicket("Powerball");

            GroupGamePageObj groupPage = new GroupGamePageObj(_driver);

            //add 3 shares to the second ticket
            groupPage.AddShares(2);
            groupPage.ClickBuyTicketsButton();

            _cartVerifications.CheckNumberOfTicketsInCart_Front(3);

            _cartActions.DeleteAllTicketFromCart_Front();
        }
        /// <summary>
        /// Performs once before all other tests. Buys a group single ticket 
        /// </summary>
        //[TestFixtureSetUp]
        public void Buy_Group_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
            GroupGamePageObj groupGame = new GroupGamePageObj(_driver);

            //Select single draw
            groupGame.SelectOneTimeEntryGame();

            _totalPrice = groupGame.TotalPrice;

            MerchantsObj merchants = groupGame.ClickBuyTicketsButton();

            if (merchant != WayToPay.InternalBalance)
            {
                merchants.Pay(merchant);
            }
            else
            {
                CheckoutObj checkout = new CheckoutObj(_driver);
                checkout.ClickCompleteYourOrderButton();
            }
        }