コード例 #1
0
ファイル: CommonActions.cs プロジェクト: koreyba/lottosend
 /// <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
        /// <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();
            }
        }
コード例 #3
0
ファイル: CartTests.cs プロジェクト: koreyba/lottosend
        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();
        }
コード例 #4
0
        /// <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();
            }
        }