Beispiel #1
0
        public void Can_view_offline_deposit_request_with_permission()
        {
            var permissions = new[]
            {
                _securityTestHelper.GetPermission(Permissions.View, Modules.PlayerManager),
                _securityTestHelper.GetPermission(Permissions.View, Modules.OfflineDepositRequests)
            };

            var          role     = _securityTestHelper.CreateRole(new[] { _defaultLicensee.Id }, permissions);
            const string password = "******";
            var          user     = _securityTestHelper.CreateAdmin(_defaultLicensee.Id, new[] { _brand }, password: password, roleId: role.Id);

            // create a player and make an offline deposit request
            _driver.Navigate().Refresh();
            _dashboardPage.BrandFilter.SelectAll();
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();

            _playerManagerPage.SelectPlayer(_playerUsername);
            var newOfflineDepositRequest           = _playerManagerPage.OpenOfflineDepositRequestForm();
            var submittedOfflineDepositRequestForm = newOfflineDepositRequest.Submit(amount: 850);
            var referenceCode = submittedOfflineDepositRequestForm.ReferenceCode;

            // log in as the user with permissions and view offline deposit request details
            _dashboardPage = _driver.LoginToAdminWebsiteAs(user.Username, password);
            var depositRequestsPage           = _dashboardPage.Menu.ClickOfflineDepositConfirmMenuItem();
            var viewOfflineDepositRequestForm = depositRequestsPage.OpenViewOfflineDepositConfirmForm(_playerUsername, referenceCode);

            Assert.AreEqual(submittedOfflineDepositRequestForm.Username, viewOfflineDepositRequestForm.Username);
        }
Beispiel #2
0
 public override void BeforeEach()
 {
     base.BeforeEach();
     _driver.Logout();
     _dashboardPage     = _driver.LoginToAdminWebsiteAsSuperAdmin();
     _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
 }
        public void Cannot_login_to_brand_website_as_deactivated_player()
        {
            var player = _playerTestHelper.CreatePlayerForMemberWebsite();

            //deactivate a player
            var playerInfoPage = _playerManagerPage.OpenPlayerInfoPage(player.Username);

            playerInfoPage.OpenAccountInformationSection();
            playerInfoPage.DeactivatePlayer();

            //Refresh the page as a temporary solution
            _driver.Navigate().Refresh();
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(player.Username);
            Assert.AreEqual("Inactive", _playerManagerPage.Status);

            //try to log in to the brand website
            var brandWebsiteLoginPage = new MemberWebsiteLoginPage(_driver);

            brandWebsiteLoginPage.NavigateToMemberWebsite();
            brandWebsiteLoginPage.TryToLogin(player.Username, player.Password);

            Assert.AreEqual("Non active", brandWebsiteLoginPage.GetErrorMsg());

            var expectedUrl = _settingsProvider.GetMemberWebsiteUrl() + "Home/PlayerProfile";
            var actualUrl   = _driver.Url;

            Assert.AreNotEqual(expectedUrl, actualUrl);
        }
        public void Can_deactivate_player()
        {
            // create a player
            var playerData    = TestDataGenerator.CreateValidPlayerDataForAdminWebsite(DefaultLicensee, DefaultBrand);
            var newPlayerForm = _playerManagerPage.OpenNewPlayerForm();
            var submittedForm = newPlayerForm.Register(playerData);

            Assert.AreEqual("The player has been successfully created", submittedForm.ConfirmationMessage);
            submittedForm.CloseTab("View Player");

            //deactivate a player
            var playerInfoPage = _playerManagerPage.OpenPlayerInfoPage(playerData.LoginName);

            playerInfoPage.OpenAccountInformationSection();
            playerInfoPage.DeactivatePlayer();
            playerInfoPage.CloseTab("Player Info");

            //check player in admin website
            _driver.Navigate().Refresh();
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(playerData.LoginName);
            Assert.AreEqual("Inactive", _playerManagerPage.Status);

            //check deactivate a player in member website (try to login)
            var _memberWebsiteLoginPage = new MemberWebsiteLoginPage(_driver);

            _memberWebsiteLoginPage.NavigateToMemberWebsite();
            _memberWebsiteLoginPage.TryToLogin(playerData.LoginName, playerData.Password);
            Assert.AreEqual("Non active", _memberWebsiteLoginPage.GetErrorMsg());
        }
 public void OpenResponsibleGamblingSectionInPlayerInfoPage(ResponsibleGamblingSection responsibleGamblingSection, PlayerInfoPage playerInfoPage, string playerUsername)
 {
     _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
     _playerManagerPage.SelectPlayer(playerUsername);
     playerInfoPage             = _playerManagerPage.OpenPlayerInfoPage();
     responsibleGamblingSection = playerInfoPage.OpenResponsibleGamblingSection();
 }
        public override void BeforeEach()
        {
            base.BeforeEach();

            _driver.Logout();
            _dashboardPage     = _driver.LoginToAdminWebsiteAsSuperAdmin();
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();

            _settingsProvider        = _container.Resolve <ICommonSettingsProvider>();
            _brandQueries            = _container.Resolve <BrandQueries>();
            _playerTestHelper        = _container.Resolve <PlayerTestHelper>();
            _paymentSettingsCommands = _container.Resolve <IPaymentSettingsCommands>();
        }
        public void Can_create_bank_account_and_bind_to_player_record()
        {
            var playerData            = TestDataGenerator.CreateValidPlayerDataForAdminWebsite(DefaultLicensee, DefaultBrand);
            var playerBankAccountData = new PlayerBankAccountData
            {
                BankName          = "Bank of Canada",
                Province          = TestDataGenerator.GetRandomString(),
                City              = TestDataGenerator.GetRandomString(),
                Branch            = TestDataGenerator.GetRandomString(),
                SwiftCode         = TestDataGenerator.GetRandomString(),
                Address           = TestDataGenerator.GetRandomString(),
                BankAccountName   = TestDataGenerator.GetRandomString(),
                BankAccountNumber = TestDataGenerator.GetRandomString(7, "0123456789")
            };

            // create a player
            var newPlayerForm = _playerManagerPage.OpenNewPlayerForm();
            var submittedForm = newPlayerForm.Register(playerData);

            Assert.AreEqual("The player has been successfully created", submittedForm.ConfirmationMessage);
            submittedForm.CloseTab("View Player");

            //create bank account
            var _playerInfoPage = _playerManagerPage.OpenPlayerInfoPage(playerData.LoginName);

            _playerInfoPage.OpenBankAccountsSection();
            var _newBankAccountForm       = _playerInfoPage.OpenNewBankAccountTab();
            var _submittedBankAccountForm = _newBankAccountForm.Submit(playerBankAccountData);

            Assert.AreEqual("The bank account has been successfully created", _submittedBankAccountForm.ConfirmationMessage);
            _playerManagerPage.CloseTab("View Bank Account");
            _playerManagerPage.CloseTab("Player Info");

            //verify bank account
            var playerBankAccountVerifyPage = _playerManagerPage.Menu.ClickPlayerBankAccountVerifyMenuItem();

            playerBankAccountVerifyPage.Verify(playerBankAccountData.BankAccountName);

            //open withdraw request form
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(playerData.LoginName);
            var withdrawRequestForm = _playerManagerPage.OpenOfflineWithdrawRequestForm(playerData.LoginName);

            Assert.AreEqual(playerBankAccountData.BankName, withdrawRequestForm.BankNameValue);
            Assert.AreEqual(playerBankAccountData.Province, withdrawRequestForm.ProvinceValue);
            Assert.AreEqual(playerBankAccountData.City, withdrawRequestForm.CityValue);
            Assert.AreEqual(playerBankAccountData.BankAccountName, withdrawRequestForm.BankAccountNameValue);
            Assert.AreEqual(playerBankAccountData.BankAccountNumber, withdrawRequestForm.BankAccountNumberValue);
        }
Beispiel #8
0
        public void Can_confirm_offline_deposit_request_with_permission()
        {
            var permissions = new[]
            {
                _securityTestHelper.GetPermission(Permissions.Confirm, Modules.OfflineDepositConfirmation),
                _securityTestHelper.GetPermission(Permissions.View, Modules.OfflineDepositRequests),
                _securityTestHelper.GetPermission(Permissions.View, Modules.PlayerManager)
            };

            var          role     = _securityTestHelper.CreateRole(new[] { _defaultLicensee.Id }, permissions);
            const string password = "******";
            var          user     = _securityTestHelper.CreateAdmin(_defaultLicensee.Id, new[] { _brand }, password: password, roleId: role.Id);

            const decimal depositAmount = 25M;

            _driver.Navigate().Refresh();
            _dashboardPage.BrandFilter.SelectAll();

            // create a player and make an offline deposit request
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(_playerUsername);
            var newOfflineDepositRequest           = _playerManagerPage.OpenOfflineDepositRequestForm();
            var submittedOfflineDepositRequestForm = newOfflineDepositRequest.Submit(depositAmount);
            var referenceCode = submittedOfflineDepositRequestForm.ReferenceCode;

            // confirm the deposit
            _dashboardPage = _driver.LoginToAdminWebsiteAs(user.Username, password);
            var offlineDepositRequestsPage = _dashboardPage.Menu.ClickOfflineDepositConfirmMenuItem();

            offlineDepositRequestsPage.SelectOfflineDepositRequest(_playerUsername, referenceCode);
            var depositConfirmPage      = offlineDepositRequestsPage.ClickConfirmButton();
            var validDepositConfirmData = TestDataGenerator.CreateValidDepositConfirmData(_playerFullName, depositAmount);
            var confirmedDepositRequest = depositConfirmPage.SubmitValidDepositConfirm(validDepositConfirmData);

            Assert.IsNotNull(confirmedDepositRequest.GetConfirmationMessage);
        }
        public override void BeforeEach()
        {
            base.BeforeEach();
            _driver.Logout();
            _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();
            _dashboardPage.BrandFilter.SelectAll();
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();

            _brandTestHelper   = _container.Resolve <BrandTestHelper>();
            _paymentTestHelper = _container.Resolve <PaymentTestHelper>();
            _playerQueries     = _container.Resolve <PlayerQueries>();
            _gamesTestHelper   = _container.Resolve <GamesTestHelper>();
            var avcTestHelper    = _container.Resolve <AutoVerificationConfigurationTestHelper>();
            var playerTestHelper = _container.Resolve <PlayerTestHelper>();
            var brandQueries     = _container.Resolve <BrandQueries>();
            var playerCommands   = _container.Resolve <PlayerCommands>();

            //create a brand for a default licensee
            _brand = brandQueries.GetBrand(DefaultBrandId);

            //create a not default VIP Level for Brand
            var vipLevel = _brandTestHelper.CreateNotDefaultVipLevel(DefaultBrandId);

            //create Auto Verification Configuration for custom Brand
            var gameRepository = _container.Resolve <IGameRepository>();

            var avcConfigurationBuilder = new AvcConfigurationBuilder(_brand.Id, new[] { vipLevel.Id }, "CAD");

            avcConfigurationBuilder
            .SetupWinnings(new List <WinningRuleDTO>
            {
                new WinningRuleDTO
                {
                    Id         = Guid.NewGuid(),
                    ProductId  = gameRepository.GameProviders.Single(g => g.Name == "Mock Sport Bets").Id,
                    Comparison = ComparisonEnum.Greater,
                    Amount     = 200,
                    Period     = PeriodEnum.FromSignUp
                }
            });

            var configuration        = avcConfigurationBuilder.Configuration;
            var createdConfiguration = avcTestHelper.CreateConfiguration(configuration);

            avcTestHelper.Activate(createdConfiguration.Id);

            // create a player with a bound bank account for a brand
            var player = playerTestHelper.CreatePlayer(true, _brand.Id);

            _playerUsername  = player.Username;
            _playerFirstname = player.FirstName;
            _playerLastname  = player.LastName;
            _playerFullname  = _playerFirstname + " " + _playerLastname;
            _paymentTestHelper.CreatePlayerBankAccount(player.Id, DefaultBrandId, true);

            //change the VIP Level for Player
            playerCommands.ChangeVipLevel(player.Id, vipLevel.Id, "changed vip level");

            //deposit some money
            _paymentTestHelper.MakeDeposit(_playerUsername, 400);
            Thread.Sleep(5000); //wait for Deposit created event processing
        }
        public void Can_Time_Out_account_and_cancel()
        {
            var      brandTestHelper   = _container.Resolve <BrandTestHelper>();
            var      paymentTestHelper = _container.Resolve <PaymentTestHelper>();
            var      playerTestHelper  = _container.Resolve <PlayerTestHelper>();
            var      defaultLicenseeId = brandTestHelper.GetDefaultLicensee();
            DateTime localDate         = DateTime.Now;

            //create a brand for a default licensee
            var brand = brandTestHelper.CreateBrand(defaultLicenseeId, isActive: true);

            paymentTestHelper.CreatePaymentSettings(brand, PaymentType.Deposit);

            // create a player with a bound bank account for a brand
            var player         = playerTestHelper.CreatePlayer(true, brand.Id);
            var playerUsername = player.Username;

            //login to admin website, select to display the custom brand
            _driver.Navigate().Refresh();
            _dashboardPage.BrandFilter.SelectAll();

            //self exclude account and cancel (duration 24 hours)
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(playerUsername);
            var playerInfoPage             = _playerManagerPage.OpenPlayerInfoPage();
            var responsibleGamblingSection = playerInfoPage.OpenResponsibleGamblingSection();

            var durationEndData24Hrs = responsibleGamblingSection.SetTimeOutData("24 hrs");
            var data24Hrs            = localDate.AddDays(1);

            Assert.IsTrue(durationEndData24Hrs.Contains(data24Hrs.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxTimeOutSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxTimeOutAndVerify(responsibleGamblingSection, playerInfoPage);

            //self exclude account and cancel (duration 1 week)
            OpenResponsibleGamblingSectionInPlayerInfoPage(responsibleGamblingSection, playerInfoPage, playerUsername);

            var durationEndData1Week = responsibleGamblingSection.SetTimeOutData("1 week");
            var data1Week            = localDate.AddDays(7);

            Assert.IsTrue(durationEndData1Week.Contains(data1Week.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxTimeOutSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxTimeOutAndVerify(responsibleGamblingSection, playerInfoPage);

            //self exclude account and cancel (duration 1 month)
            OpenResponsibleGamblingSectionInPlayerInfoPage(responsibleGamblingSection, playerInfoPage, playerUsername);

            var durationEndData1Month = responsibleGamblingSection.SetTimeOutData("1 month");
            var data1Month            = localDate.AddMonths(1);

            Assert.IsTrue(durationEndData1Month.Contains(data1Month.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxTimeOutSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxTimeOutAndVerify(responsibleGamblingSection, playerInfoPage);

            //self exclude account and cancel (duration 1 month)
            OpenResponsibleGamblingSectionInPlayerInfoPage(responsibleGamblingSection, playerInfoPage, playerUsername);

            var durationEndData6Weeks = responsibleGamblingSection.SetTimeOutData("6 weeks");
            var data6Weeks            = localDate.AddDays(42);

            Assert.IsTrue(durationEndData6Weeks.Contains(data6Weeks.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxTimeOutSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxTimeOutAndVerify(responsibleGamblingSection, playerInfoPage);
        }
        public void Can_Self_Exclude_account_and_cancel()
        {
            var      brandTestHelper   = _container.Resolve <BrandTestHelper>();
            var      paymentTestHelper = _container.Resolve <PaymentTestHelper>();
            var      playerTestHelper  = _container.Resolve <PlayerTestHelper>();
            var      defaultLicenseeId = brandTestHelper.GetDefaultLicensee();
            DateTime localDate         = DateTime.Now;

            //create a brand for a default licensee
            var brand = brandTestHelper.CreateBrand(defaultLicenseeId, isActive: true);

            paymentTestHelper.CreatePaymentSettings(brand, PaymentType.Deposit);

            // create a player with a bound bank account for a brand
            var player         = playerTestHelper.CreatePlayer(true, brand.Id);
            var playerUsername = player.Username;

            //login to admin website, select to display the custom brand
            _driver.Navigate().Refresh();
            _dashboardPage.BrandFilter.SelectAll();

            //self exclude account and cancel (duration 6 months)
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(playerUsername);
            var playerInfoPage             = _playerManagerPage.OpenPlayerInfoPage();
            var responsibleGamblingSection = playerInfoPage.OpenResponsibleGamblingSection();

            var durationEndData6Months = responsibleGamblingSection.SetSelfExcludeData("6 months");
            var data6Months            = localDate.AddMonths(6);

            Assert.IsTrue(durationEndData6Months.Contains(data6Months.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxSelfExcludeSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxSelfExcludeAndVerify(responsibleGamblingSection, playerInfoPage);

            //self exclude account and cancel (duration 1 year)
            OpenResponsibleGamblingSectionInPlayerInfoPage(responsibleGamblingSection, playerInfoPage, playerUsername);

            var durationEndData1Year = responsibleGamblingSection.SetSelfExcludeData("1 year");
            var data1Year            = localDate.AddYears(1);

            Assert.IsTrue(durationEndData1Year.Contains(data1Year.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxSelfExcludeSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxSelfExcludeAndVerify(responsibleGamblingSection, playerInfoPage);

            //self exclude account and cancel (duration 5 years)
            OpenResponsibleGamblingSectionInPlayerInfoPage(responsibleGamblingSection, playerInfoPage, playerUsername);

            var durationEndData5Years = responsibleGamblingSection.SetSelfExcludeData("5 years");
            var data5Years            = localDate.AddYears(5);

            Assert.IsTrue(durationEndData5Years.Contains(data5Years.ToString("d", CultureInfo.CreateSpecificCulture("ja-JP"))));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxSelfExcludeSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxSelfExcludeAndVerify(responsibleGamblingSection, playerInfoPage);

            //self exclude account and cancel (duration permanent)
            OpenResponsibleGamblingSectionInPlayerInfoPage(responsibleGamblingSection, playerInfoPage, playerUsername);

            var durationEndDataPermanent = responsibleGamblingSection.SetSelfExcludeData("permanent");

            Assert.IsTrue(durationEndDataPermanent.Contains("10000/01/01"));
            responsibleGamblingSection.CloseTab("Player Info");

            VerifyIsCheckBoxSelfExcludeSelected(responsibleGamblingSection, playerInfoPage, playerUsername);

            UnselectedCheckBoxSelfExcludeAndVerify(responsibleGamblingSection, playerInfoPage);
        }
        public void Can_change_payment_level_of_player_and_view_new_payment_level_applied()
        {
            var brandTestHelper   = _container.Resolve <BrandTestHelper>();
            var paymentTestHelper = _container.Resolve <PaymentTestHelper>();
            var playerTestHelper  = _container.Resolve <PlayerTestHelper>();
            var playerQueries     = _container.Resolve <PlayerQueries>();
            var defaultLicenseeId = brandTestHelper.GetDefaultLicensee();

            //create a brand for a default licensee
            var brand = brandTestHelper.CreateBrand(defaultLicenseeId, null, null, null, true);

            paymentTestHelper.CreatePaymentSettings(brand, PaymentType.Deposit);

            // create a player with a bound bank account for a brand
            var player = playerTestHelper.CreatePlayer(true, brand.Id);

            Thread.Sleep(5000);
            var playerUsername = player.Username;

            //login to admin website, select to display the custom brand
            _driver.Logout();
            _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();
            _dashboardPage.BrandFilter.SelectAll();

            //make offline deposit and check the relevant payment settings are applied for player
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(playerUsername);
            var offlineDepositRequestForm = _playerManagerPage.OpenOfflineDepositRequestForm();

            Thread.Sleep(1000);
            var defaultBankName = offlineDepositRequestForm.Bank.Text;

            Assert.AreNotEqual(defaultBankName, string.Empty);

            offlineDepositRequestForm.CloseTab("Offline Deposit Request");

            //create new payment level with new bankAccount
            var bankAccount  = paymentTestHelper.CreateBankAccount(brand.Id, player.CurrencyCode);
            var paymentLevel = paymentTestHelper.CreatePaymentLevel(brand.Id, player.CurrencyCode, bankAccountId: bankAccount.Id);

            //change the payment level of the player
            _playerManagerPage = _playerManagerPage.Menu.ClickPlayerManagerMenuItem();
            var playerInfoPage = _playerManagerPage.OpenPlayerInfoPage(playerUsername);

            playerInfoPage.OpenAccountInformationSection();
            var changePaymentLevelDialog = playerInfoPage.OpenChangePaymentLevelDialog();

            changePaymentLevelDialog.Submit(paymentLevel.Name, "change payment level");
            Thread.Sleep(1000);

            //assert account details
            var playerAccountInfo = playerInfoPage.GetAccountDetails();

            Assert.AreEqual(paymentLevel.Name, playerAccountInfo.PaymentLevel);
            playerInfoPage.CloseTab("Player Info");

            //open offline deposit form again to confirm the bankaccount is changed
            _playerManagerPage.SelectPlayer(playerUsername);
            offlineDepositRequestForm = _playerManagerPage.OpenOfflineDepositRequestForm();
            Thread.Sleep(1000);
            var newBankName = offlineDepositRequestForm.Bank.Text;

            Assert.AreEqual(newBankName, bankAccount.Bank.BankName + " / " + bankAccount.AccountName);
            Assert.AreNotEqual(defaultBankName, newBankName);

            var submittedOfflineDepositRequest = offlineDepositRequestForm.Submit(10);

            Assert.AreEqual("Offline deposit request has been created successfully", submittedOfflineDepositRequest.Confirmation);
        }
        //TODO: VladS  AFTREGO-4540, Igor, 08-April-2016
        public void Can_change_vip_level_of_player_and_view_new_payment_settings_are_applied()
        {
            var brandTestHelper   = _container.Resolve <BrandTestHelper>();
            var paymentTestHelper = _container.Resolve <PaymentTestHelper>();
            var playerTestHelper  = _container.Resolve <PlayerTestHelper>();
            var defaultLicenseeId = brandTestHelper.GetDefaultLicensee();

            //create a brand for a default licensee
            var brand = brandTestHelper.CreateBrand(defaultLicenseeId, null, null, null, true);

            paymentTestHelper.CreatePaymentSettings(brand, PaymentType.Deposit);

            // create a player with a bound bank account for a brand
            var player = playerTestHelper.CreatePlayer(true, brand.Id);

            Thread.Sleep(5000);
            var playerUsername = player.Username;

            paymentTestHelper.CreatePlayerBankAccount(player.Id, DefaultBrandId, true);
            var defaultVipLevel = player.VipLevel;

            // create second brand's vip level and payment settings based on it
            var secondVipLevel = brandTestHelper.CreateVipLevel(brand.Id, isDefault: false);
            var settings       = new PaymentSettingsValues
            {
                MinAmountPerTransaction = 5,
                MaxAmountPerTransaction = 9
            };
            var paymentSettingsForSecondVipLevel = paymentTestHelper.CreatePaymentSettings(brand, PaymentType.Deposit, secondVipLevel.Id.ToString(), settings);

            _paymentSettingsCommands.Disable(paymentSettingsForSecondVipLevel.Id, "remark");

            //login to admin website, select to display the custom brand
            _driver.Logout();
            _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();
            _dashboardPage.BrandFilter.SelectAll();

            //make offline deposit and check the relevant payment settings are applied for player
            _playerManagerPage = _dashboardPage.Menu.ClickPlayerManagerMenuItem();
            _playerManagerPage.SelectPlayer(playerUsername);
            var offlineDepositRequestForm = _playerManagerPage.OpenOfflineDepositRequestForm();

            const decimal depositAmount = 10;
            var           submittedOfflineDepositRequest = offlineDepositRequestForm.Submit(depositAmount);

            Assert.AreEqual("Offline deposit request has been created successfully", submittedOfflineDepositRequest.Confirmation);
            submittedOfflineDepositRequest.CloseTab("View Offline Deposit Request");

            //deactivate the default vip level and make the second vip level default
            var vipLevelManagerPage      = _playerManagerPage.Menu.ClickVipLevelManagerMenuItem();
            var deactivateVipLevelDialog = vipLevelManagerPage.OpenDeactivateDialog(defaultVipLevel.Name, true);

            vipLevelManagerPage = deactivateVipLevelDialog.Deactivate();

            //change the vip level of the player
            _playerManagerPage = vipLevelManagerPage.Menu.ClickPlayerManagerMenuItem();
            var playerInfoPage = _playerManagerPage.OpenPlayerInfoPage(playerUsername);

            playerInfoPage.OpenAccountInformationSection();
            //_driver.Manage().Window.Maximize();
            var changeVipLevelDialog = playerInfoPage.OpenChangeVipLevelDialog();

            changeVipLevelDialog.Submit(secondVipLevel.Name);
            playerInfoPage.CloseTab("Player Info");

            //enable payment settings for second vip level
            _paymentSettingsCommands.Enable(paymentSettingsForSecondVipLevel.Id, "remark");

            //try to make deposit again
            _playerManagerPage.SelectPlayer(playerUsername);
            var secondOfflineDepositRequestForm = _playerManagerPage.OpenOfflineDepositRequestForm();

            secondOfflineDepositRequestForm.TryToSubmit(depositAmount);

            //TODO: VladS Payment settings applied but message doesn't show up.
            //Assert.That(offlineDepositRequestForm.ErrorMessage, Is.StringContaining("Deposit failed. The entered amount exceeds the allowed value. Maximum value is 9.00."));
        }