示例#1
0
        public void Edit_Raffle_Ticket_And_Add_More(bool toLogIn)
        {
            if (toLogIn)
            {
                _commonActions.Log_In_Front_PageOne(_driverCover.LoginFour, _driverCover.Password);
            }

            _commonActions.AddRaffleTicketToCart_Front(_driverCover.BaseUrl + "en/raffles/test/");

            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/carts");

            CartObj cart = new CartMobileObj(_driver);
            cart.EditRaffleTicketMobile("Cart Raffle");

            RafflesPageObj raffle = new RafflesPageObj(_driver);

            //add 3 shares to the second ticket
            raffle.AddShares(3, 1);
            raffle.ClickBuyNowButton();

            _cartVerifications.CheckNumberOfTicketsInCart_Front(4);

            _cartActions.DeleteAllTicketFromCart_Front();
        }
示例#2
0
        public void Login_Express_Checkout_In_Cart()
        {
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/raffles/loteria-de-navidad/" + "");

            RafflesPageObj rafflePage = new RafflesPageObj(_driver);

            //CartObj cart = rafflePage.ClickBuyNowButton();
            //cart.ClickProceedToCheckoutButton();

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

            _usersVerifications.CheckIfSignedIn_Mobile();
        }
示例#3
0
        /// <summary>
        /// Performs once before all other tests. Buys a raffle ticket
        /// </summary>
        private void Buy_Raffle_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/raffles/loteria-de-navidad/");

            RafflesPageObj rafflePage = new RafflesPageObj(_driver);
            _totalPrice = rafflePage.TotalPrice;

            rafflePage.ClickBuyNowButton();//
            MerchantsObj merchants = new MerchantsObj(_driver);

            if (merchant != WayToPay.InternalBalance)
            {
                merchants.Pay(merchant);
            }
            else
            {
                CheckoutObj checkout = new CheckoutObj(_driver);
                checkout.ClickCompleteYourOrderButton();
            }
        }
示例#4
0
        public void One_Plus_One_For_Second_Order_When_First_Pending()
        {
            //Sign up
            _commonActions.Sign_Up_Mobile();
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/raffles/loteria-de-navidad/");

            RafflesPageObj rafflePage = new RafflesPageObj(_driver);
            // double totalPrice = rafflePage.TotalPrice;

            rafflePage.ClickBuyNowButton();//
            MerchantsObj merchants = new MerchantsObj(_driver);
            merchants.Pay(WayToPay.Offline, false); //will be pending order

            _commonActions.BuyRegularOneDrawTicket_Front(_merchant); //will be successful order

            _verifications.CheckBalanceOnDepositPage_Web(0); //Check if there is no 1+1 promotion for the second payment if the first one is pending
        }
示例#5
0
        public void One_Plus_One_For_Second_Order_When_First_Failed()
        {
            //Sign up
            _commonActions.Sign_Up_Mobile();
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/raffles/loteria-de-navidad/");

            RafflesPageObj rafflePage = new RafflesPageObj(_driver);
            // double totalPrice = rafflePage.TotalPrice;

            rafflePage.ClickBuyNowButton();//
            MerchantsObj merchants = new MerchantsObj(_driver);
            merchants.Pay(WayToPay.Offline, false); //will be pending order

            double price = _commonActions.BuyRegularOneDrawTicket_Front(_merchant); //will be successful order

            _commonActions.SignIn_in_admin_panel();
            _commonActions.Authorize_the_first_payment();
            _commonActions.Fail_offline_payment(); //fail the first payment

            if (price >= 30)
            {
                _verifications.CheckBalanceOnDepositPage_Web(30);  //Check if for the second payment a user got 1+1
            }
            else
            {
                _verifications.CheckBalanceOnDepositPage_Web(price);  //Check if for the second payment a user got 1+1
            }
        }
示例#6
0
        public void One_Plus_One_After_Failed_Order()
        {
            //Sign up
            _commonActions.Sign_Up_Mobile();
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/raffles/loteria-de-navidad/");

            RafflesPageObj rafflePage = new RafflesPageObj(_driver);
            double totalPrice = rafflePage.TotalPrice;

            rafflePage.ClickBuyNowButton();//
            MerchantsObj merchants = new MerchantsObj(_driver);
            merchants.Pay(WayToPay.Offline, true, true);

            double price = _commonActions.BuyRegularOneDrawTicket_Front(_merchant);

            if (price + totalPrice >= 30)
            {
                _verifications.CheckBalanceOnDepositPage_Web(30);
            }
            else
            {
                _verifications.CheckBalanceOnDepositPage_Web(price + totalPrice);
            }
        }
示例#7
0
        /// <summary>
        /// Adds a raffle ticket to the cart on front
        /// </summary>
        public void AddRaffleTicketToCart_Front(string address)
        {
            _driverCover.NavigateToUrl(address);
            RafflesPageObj raffle = new RafflesPageObj(_driver);

            raffle.ClickBuyNowButton();
        }
示例#8
0
        /// <summary>
        /// Buys a raffle ticket 
        /// </summary>
        /// <returns>Total price to pay</returns>
        public double BuyRaffleTicket_Front(WayToPay merchant)
        {
            _driverCover.NavigateToUrl(_driverCover.BaseUrl + "en/raffles/loteria-de-navidad/");

            RafflesPageObj rafflePage = new RafflesPageObj(_driver);
            double totalPrice = rafflePage.TotalPrice;

            rafflePage.ClickBuyNowButton();//
            MerchantsObj merchants = new MerchantsObj(_driver);
            merchants.Pay(merchant);

            return totalPrice;
        }