Created
June 27, 2019 06:59
-
-
Save egorvas/aaa4258b84e138fdd66b4952b2eba88c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var LoginPage = require('../objects/pages/login.page'); | |
| var Dashboard = require('../objects/pages/dashboard.page'); | |
| var WithdrawPage = require('../objects/pages/withdraw.page'); | |
| var SelectBankAccountPage = require('../objects/pages/selectBankAccount.page'); | |
| var AddBankAccountDialog = require('../objects/dialogs/addBankAccount.dialog'); | |
| var WithdrawByBankDialog = require('../objects/dialogs/withdrawByBank.dialog'); | |
| var WithdrawByCashDeliveryDialog = require('../objects/dialogs/withdrawByCashDelivery.dialog'); | |
| var WithdrawByCashPickUpDialog = require('../objects/dialogs/withdrawByCashPickup.dialog'); | |
| var AssertCommands = require('../commands/assert.commands'); | |
| var BrowserCommands = require('../commands/browser.commands'); | |
| var ServerCommands = require('../commands/server.commands'); | |
| import {createTestUser, prepareMeteor, addresses, urlMeteor, setConfigOption, CurrencyCurrent} from "../commands/common"; | |
| let user = { | |
| username: 'amilabsunittest+2@gmail.com', | |
| password: '12345678', | |
| passport: '12345678', | |
| role: 'customer', | |
| address: addresses.balance100, | |
| phone: '+79091012031', | |
| firstName: 'Testfirst', | |
| lastName: 'Testlast', | |
| kyc: 2, | |
| verifyUserPhone: true | |
| }; | |
| const dataForKycMock = { | |
| birthday: "1999-02-02 00:00:00.000Z", | |
| gender: "Female", | |
| country: "MM", | |
| city: "123456", | |
| postcode: "123456", | |
| occupation: "Dev", | |
| employer: "Everex", | |
| }; | |
| const currency ="THB"; | |
| const bankAccount = '1234-5678-90123'; | |
| describe.only('Testing different types of limits for different withdraw types', function(){ | |
| function resetLimits(){ | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.minTransfer", 0); | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxTransfer", 10000000); | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxMonthlyTransfer", 10000000); | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxWeeklyTransfer", 10000000); | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxDailyTransfer", 10000000); | |
| } | |
| before(function(){ | |
| prepareMeteor(true); | |
| resetLimits(); | |
| createTestUser(user); | |
| ServerCommands.generateMockKycDataForUser(user, dataForKycMock); | |
| BrowserCommands.openUrl(urlMeteor); | |
| }); | |
| it('Login as first user', function(){ | |
| AssertCommands.assertElementDisplayed(LoginPage.loginEmailInput); | |
| BrowserCommands.setValue(LoginPage.loginEmailInput,user.username); | |
| BrowserCommands.setValue(LoginPage.loginPasswordInput,user.password); | |
| BrowserCommands.click(LoginPage.loginButton); | |
| AssertCommands.assertElementText(Dashboard.username, user.username); | |
| browser.refresh(); | |
| }); | |
| it('Set currency '+currency, function() { | |
| BrowserCommands.click(Dashboard.currencyPicker); | |
| BrowserCommands.click(Dashboard.currencyInput); | |
| BrowserCommands.setValue(Dashboard.currencyInput, currency + ' '); | |
| browser.pause(300); | |
| BrowserCommands.enter(); | |
| }); | |
| it('Open add bank account dialog', function(){ | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.addBankAccountButton); | |
| }); | |
| it('Add valid bank account number', function() { | |
| BrowserCommands.setValue(AddBankAccountDialog.accountNumberInput, bankAccount); | |
| BrowserCommands.setValue(AddBankAccountDialog.reEnterAccountNumberInput, bankAccount); | |
| BrowserCommands.click(AddBankAccountDialog.addBankAccountButton); | |
| browser.pause(3000); | |
| BrowserCommands.clickCloseButton(AddBankAccountDialog.closeButton); | |
| }); | |
| it('Add international bank account', function() { | |
| BrowserCommands.click(SelectBankAccountPage.changeCountryButton); | |
| BrowserCommands.click(WithdrawPage.myanmarButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.addBankAccountButton); | |
| }); | |
| it('Add valid international bank account number', function() { | |
| BrowserCommands.setValue(AddBankAccountDialog.accountNumberInput, bankAccount); | |
| BrowserCommands.setValue(AddBankAccountDialog.reEnterAccountNumberInput, bankAccount); | |
| browser.pause(2000); | |
| BrowserCommands.click(AddBankAccountDialog.addBankAccountButton); | |
| }); | |
| it('Check default limits messages not displayed', function() { | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, quantity); | |
| AssertCommands.assertElementNotDisplayed(WithdrawByBankDialog.amountInputError); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, quantity); | |
| AssertCommands.assertElementNotDisplayed(WithdrawByCashDeliveryDialog.amountInputError); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, quantity); | |
| AssertCommands.assertElementNotDisplayed(WithdrawByCashPickUpDialog.amountInputError); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check minTransfer limit', function() { | |
| resetLimits(); | |
| let minTransferLimit = 10; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.minTransfer", minTransferLimit); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 9); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Minimal", "withdraw", minTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 9); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Minimal", "withdraw", minTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 5); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Minimal", "withdraw", minTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check maxTransfer limit', function() { | |
| resetLimits(); | |
| let maxTransferLimit = 10; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxTransfer", maxTransferLimit); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check per currency maxTransfer limit', function() { | |
| resetLimits(); | |
| let maxTransferLimit = 10; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxTransfer", {currency:"THB",value:maxTransferLimit}); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check maxDailyTransfer limit', function() { | |
| resetLimits(); | |
| let maxTransferLimit = 10; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxDailyTransfer", maxTransferLimit); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Maximal", "daily", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 11); | |
| browser.pause(30000); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Maximal", "daily", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError,"Maximal", "daily", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check maxWeeklyTransfer limit', function() { | |
| resetLimits(); | |
| let maxTransferLimit = 10; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxWeeklyTransfer", maxTransferLimit); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Maximal", "weekly", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Maximal", "weekly", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Maximal", "weekly", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check maxMonthlyTransfer limit', function() { | |
| resetLimits(); | |
| let maxTransferLimit = 10; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxMonthlyTransfer", maxTransferLimit); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Maximal", "monthly", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Maximal", "monthly", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 11); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Maximal", "monthly", "withdraw", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check per currency minTransfer limit in foreign currency', function() { | |
| resetLimits(); | |
| let minTransferLimit = 10; | |
| let currency = "USD"; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.minTransfer", {currency:currency,value:minTransferLimit}); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 349); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Minimal", "withdraw", minTransferLimit + " " + currency, | |
| "(~"+Math.ceil(minTransferLimit/CurrencyCurrent["idTHBDEMO/USD"].rate) + " in THBDEMO", minTransferLimit); | |
| browser.pause(10000); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 349); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Minimal", "withdraw", minTransferLimit + " " + currency, | |
| "(~"+Math.ceil(minTransferLimit/CurrencyCurrent["idTHBDEMO/USD"].rate) + " in THBDEMO", minTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 349); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Minimal", "withdraw", minTransferLimit + " " + currency, | |
| "(~"+Math.ceil(minTransferLimit/CurrencyCurrent["idTHBDEMO/USD"].rate) + " in THBDEMO", minTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| it('Check per currency maxTransfer limit in foreign currency', function() { | |
| resetLimits(); | |
| let maxTransferLimit = 10; | |
| let currency = "USD"; | |
| setConfigOption("redeem.assets.idTHBDEMO.limits.maxTransfer", {currency:currency,value:maxTransferLimit}); | |
| browser.refresh(); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.bankTransferButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| BrowserCommands.click(SelectBankAccountPage.bankAccountsTransferButtons[0]); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByBankDialog.amountInput, 350); | |
| AssertCommands.assertElementHasText(WithdrawByBankDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit + " " + currency, | |
| "(~"+Math.floor(maxTransferLimit/CurrencyCurrent["idTHBDEMO/USD"].rate) + " in THBDEMO", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByBankDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashOnDeliveryButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashDeliveryDialog.amountInput, 350); | |
| AssertCommands.assertElementHasText(WithdrawByCashDeliveryDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit + " " + currency, | |
| "(~"+Math.floor(maxTransferLimit/CurrencyCurrent["idTHBDEMO/USD"].rate) + " in THBDEMO", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashDeliveryDialog.closeButton); | |
| BrowserCommands.click(Dashboard.toolsButton); | |
| BrowserCommands.click(Dashboard.withdrawButton); | |
| BrowserCommands.click(WithdrawPage.cashPickupButton); | |
| BrowserCommands.click(WithdrawPage.nextButton); | |
| browser.pause(1000); | |
| BrowserCommands.setValue(WithdrawByCashPickUpDialog.amountInput, 350); | |
| AssertCommands.assertElementHasText(WithdrawByCashPickUpDialog.amountInputError, "Maximal", "withdraw", maxTransferLimit + " " + currency, | |
| "(~"+Math.floor(maxTransferLimit/CurrencyCurrent["idTHBDEMO/USD"].rate) + " in THBDEMO", maxTransferLimit); | |
| BrowserCommands.clickCloseButton(WithdrawByCashPickUpDialog.closeButton); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment