コード例 #1
0
        public void Can_submit_online_deposit_and_return_to_brand_via_member_site(string amount)
        {
            CashierPage       _cashierPage       = _playerProfilePage.Menu.OpenCashierPage();
            DepositOnlinePage _depositOnlinePage = _cashierPage.OpenOnlineDepositPage();

            _depositOnlinePage.EnterDepositAmount(amount);
            _depositOnlinePage.SubmitOnlineDeposit();
            var _fakePaymentServerPage = new FakePaymentServerPage(_driver);

            //Verify the deposit amount is correct
            Assert.AreEqual(amount, _fakePaymentServerPage.GetAmountValue());
            _fakePaymentServerPage.NotifyAndRedirect();

            Assert.IsTrue(_depositOnlinePage.GetDepositConfirmedValue().Contains(amount));

            Assert.AreEqual(amount, _depositOnlinePage.GetBalanceAmount());
        }
コード例 #2
0
        public void Can_create_online_deposit_during_registration_by_selecting_the_suggested_amount(string stringAmount)
        {
            var decimalAmount = decimal.Parse(stringAmount);

            // register a player on a brand website
            _brandWebsiteLoginPage.NavigateToMemberWebsite();
            var brandWebsiteRegisterPage = _brandWebsiteLoginPage.GoToRegisterPage();
            var registerPageStep2        = brandWebsiteRegisterPage.Register(_playerData);

            //verify the player was registered
            Assert.AreEqual("NEXT STEP: DEPOSIT BELOW", registerPageStep2.GetSuccessMessage());

            //verify the user was redirected to the registration step2
            Assert.True(_driver.IfUrlContainsSubstr("RegisterStep2"));

            //select the suggested deposit amount by clicking the button
            var quickSelectAmount = decimalAmount.Format("RMB", false, DecimalDisplay.ShowNonZeroOnly);

            registerPageStep2.SelectDepositAmount(quickSelectAmount);

            //submit deposit request
            registerPageStep2.SubmitOnlineDeposit();

            var fakePaymentServerPage = new FakePaymentServerPage(_driver);

            //Verify the deposit amount is correct
            var fakePaymentServerPageAmount = fakePaymentServerPage.GetAmountValue();

            Assert.AreEqual(stringAmount, fakePaymentServerPageAmount);

            //Notify and Redirect
            fakePaymentServerPage.NotifyAndRedirect();

            var registerPageStep4 = new RegisterPageStep4(_driver);

            //verify the deposit  was submited correct
            Assert.AreEqual("CONGRATULATION ON YOUR DEPOSIT!", registerPageStep4.GetSuccessMessage());

            var step4BalanceAmount = registerPageStep4.GetBalanceAmount();
            var amountFormatted    = decimalAmount.Format("RMB", false, DecimalDisplay.AlwaysShow);

            Assert.AreEqual(amountFormatted, step4BalanceAmount);
        }
コード例 #3
0
        public void Can_create_online_from_cashier_page_by_entering_the_suggested_amount(string amount)
        {
            var _onlineDepositPage = _cashierPage.OpenOnlineDepositPage();

            //select the suggested deposit amount by clicking the button
            _onlineDepositPage.SelectDepositAmount(amount);

            //submit deposit request
            _onlineDepositPage.SubmitOnlineDeposit();

            var _fakePaymentServerPage = new FakePaymentServerPage(_driver);

            //Verify the deposit amount is correct
            Assert.AreEqual(amount.Replace(",", String.Empty), _fakePaymentServerPage.GetAmountValue());

            //Notify and Redirect
            _fakePaymentServerPage.NotifyAndRedirect();

            Assert.IsTrue(_onlineDepositPage.GetDepositConfirmedValue().Contains(amount.Replace(",", String.Empty)));

            Assert.AreEqual(amount, _onlineDepositPage.GetBalanceAmount());
        }
コード例 #4
0
        public void Can_create_online_from_cashier_page_by_entering_the_amount(string amount)
        {
            var _onlineDepositPage = _cashierPage.OpenOnlineDepositPage();

            //enter deposit amount manually
            _onlineDepositPage.EnterDepositAmount(amount);

            //submit deposit request
            _onlineDepositPage.SubmitOnlineDeposit();

            var _fakePaymentServerPage = new FakePaymentServerPage(_driver);

            //Verify the deposit amount is correct
            Assert.AreEqual(amount, _fakePaymentServerPage.GetAmountValue());

            //Notify and Redirect
            _fakePaymentServerPage.NotifyAndRedirect();

            Assert.IsTrue(_onlineDepositPage.GetDepositConfirmedValue().Contains(amount));
            // fix amount formatting for assert
            Assert.AreEqual(amount, _onlineDepositPage.GetBalanceAmount().Replace(",", String.Empty));
        }
コード例 #5
0
        public void Can_create_online_deposit_during_registration_by_entering_the_amount(string longAmount, string shortAmount)
        {
            // register a player on a brand website
            _brandWebsiteLoginPage.NavigateToMemberWebsite();
            var brandWebsiteRegisterPage = _brandWebsiteLoginPage.GoToRegisterPage();
            var registerPageStep2        = brandWebsiteRegisterPage.Register(_playerData);

            //verify the player was registered
            Assert.AreEqual("NEXT STEP: DEPOSIT BELOW", registerPageStep2.GetSuccessMessage());

            //verify the user was redirected to the registration step2
            Assert.True(_driver.IfUrlContainsSubstr("RegisterStep2"));

            //enter deposit amount manually
            registerPageStep2.EnterDepositAmount(longAmount);

            //submit deposit request
            registerPageStep2.SubmitOnlineDeposit();

            var fakePaymentServerPage = new FakePaymentServerPage(_driver);

            //Verify the deposit amount is correct
            var fakePaymentServerPageAmount = fakePaymentServerPage.GetAmountValue();

            Assert.AreEqual(shortAmount, fakePaymentServerPageAmount);

            //Notify and Redirect
            fakePaymentServerPage.NotifyAndRedirect();

            var registerPageStep4 = new RegisterPageStep4(_driver);

            //verify the deposit  was submited correct
            Assert.AreEqual("CONGRATULATION ON YOUR DEPOSIT!", registerPageStep4.GetSuccessMessage());

            var step4BalanceAmount = registerPageStep4.GetBalanceAmount();

            Assert.AreEqual(longAmount, step4BalanceAmount);
        }