Protractor tests.
diff --git a/Pages/Teller.js b/Pages/Teller.js
index 727ea31..9d33e79 100644
--- a/Pages/Teller.js
+++ b/Pages/Teller.js
@@ -117,6 +117,7 @@
amountInput.click().clear().sendKeys(text);
},
verifyAmountInputFieldHasError: function(text) {
+ $(".text-md").click();
expect(amountInput.getAttribute("class")).toMatch("ng-invalid");
expect(amountInput.element(by.xpath("..")).element(by.xpath("..")).element(by.xpath("..")).$("md-error").getText()).toEqual(text);
},
@@ -143,6 +144,7 @@
},
clickEnabledConfirmTransactionButton: function(){
browser.executeScript("arguments[0].scrollIntoView();", primaryButton.get(1).getWebElement());
+ browser.sleep(1000);
browser.wait(EC.elementToBeClickable(primaryButton.get(1)), 4000);
primaryButton.filter(function(elem, index) {
return elem.$("span").getText().then(function(text) {
diff --git a/Specs/cheque_management.js b/Specs/cheque_management.js
index 1a0a514..d048670 100644
--- a/Specs/cheque_management.js
+++ b/Specs/cheque_management.js
@@ -499,12 +499,12 @@
Common.verifyMessagePopupIsDisplayed("Transaction successfully confirmed");
Accounting.goToAccountingViaSidePanel();
Accounting.goToChequeClearing();
- Cheques.verifyStateForChequeWithIdentifier("PENDING", "11~boa~" + customerAccount2 + ".9100.00001");
+ Cheques.verifyStateForChequeWithIdentifier("PENDING", "11~boa~" + customerAccount2 + ".9100.00005");
Common.clickBackButtonInTitleBar();
Accounting.goToJournalEntries();
Accounting.enterTextIntoSearchAccountInputField(chequesReceivableAccount);
Accounting.clickSearchButton();
- Accounting.verifyFourthJournalEntry("Order Cheque", "400.00");
+ Accounting.verifyFourthJournalEntry("Order Cheque", "Amount: 400.00");
});
it('input should be validated and CREATE TRANSACTION button is only enabled with valid input', function () {
Teller.goToTellerManagementViaSidePanel();
diff --git a/Specs/cheque_management_from_scratch.js b/Specs/cheque_management_from_scratch.js
index 7f98d9d..310936c 100644
--- a/Specs/cheque_management_from_scratch.js
+++ b/Specs/cheque_management_from_scratch.js
@@ -523,12 +523,12 @@
Common.verifyMessagePopupIsDisplayed("Transaction successfully confirmed");
Accounting.goToAccountingViaSidePanel();
Accounting.goToChequeClearing();
- Cheques.verifyStateForChequeWithIdentifier("PENDING", "11~boa~" + customerAccount2 + ".9100.00001");
+ Cheques.verifyStateForChequeWithIdentifier("PENDING", "11~boa~" + customerAccount2 + ".9100.00005");
Common.clickBackButtonInTitleBar();
Accounting.goToJournalEntries();
Accounting.enterTextIntoSearchAccountInputField(chequesReceivableAccount);
Accounting.clickSearchButton();
- Accounting.verifyFourthJournalEntry("Order Cheque", "400.00");
+ Accounting.verifyFourthJournalEntry("Order Cheque", "Amount: 400.00");
});
it('input should be validated and CREATE TRANSACTION button is only enabled with valid input', function () {
Teller.goToTellerManagementViaSidePanel();
diff --git a/Specs/teller_management.js b/Specs/teller_management.js
index 8f24432..dd6220e 100644
--- a/Specs/teller_management.js
+++ b/Specs/teller_management.js
@@ -216,7 +216,7 @@
//only action possible: Open account
Teller.clickOnOpenAccountForCustomer(customerAccount);
Teller.selectAccountToBeAffected(customerAccount + ".9100.00001(" + depositIdentifier +")");
- Teller.enterTextIntoAmountInputField("200.00");
+ Teller.enterTextIntoAmountInputField("2000.00");
Teller.clickEnabledCreateTransactionButton();
Teller.clickEnabledConfirmTransactionButton();
Common.verifyMessagePopupIsDisplayed("Transaction successfully confirmed");
@@ -228,7 +228,9 @@
Teller.verifyAmountInputFieldHasError("Value must be smaller than or equal to 1000");
Teller.verifyCreateTransactionButtonIsDisabled();
});
- it('employee not assigned to teller should not be able to unlock the teller', function () {Lo
+ it('employee not assigned to teller should not be able to unlock the teller', function () {
+ //workaround for bug on logging out from within teller transaction
+ Teller.goToTellerManagementViaSidePanel();
Login.signOut();
Login.logInWithTenantUserAndPassword("playground", employeeIdentifier, "abc123??");
Teller.goToTellerManagementViaSidePanel();
@@ -261,19 +263,30 @@
//teller balance empty since account now different; find way to check this
Login.signOut();
});
- it('employee assigned to teller should be able to unlock the teller', function () {
- Login.logInForFirstTimeWithTenantUserAndPassword("playground", employeeIdentifier2, "abc123!!", "abc123??");
+ it('teller should have updated as expected', function () {
+ Login.logInWithTenantUserAndPassword("playground", employeeIdentifier2, "abc123??");
Teller.goToTellerManagementViaSidePanel();
Teller.enterTextIntoTellerNumberInputField(tellerIdentifier);
//password has been updated
Teller.enterTextIntoPasswordInputField("123abc!!");
Teller.clickEnabledUnlockTellerButton();
- //cash withdrawal limit has been update
- });
- it('employee not assigned to teller should not be able to unlock the teller', function () {
-
+ //cash withdrawal limit has been updated
+ Teller.clickOnCashWithdrawalForCustomer(customerAccount);
+ Teller.selectAccountToBeAffected(customerAccount + ".9100.00001(" + depositIdentifier +")");
+ Teller.verifyCashdrawLimitHintIsDisplayed("Cashdraw limit is: 500.00");
+ Teller.enterTextIntoAmountInputField("500.01");
+ Teller.verifyAmountInputFieldHasError("Value must be smaller than or equal to 500");
+ Teller.verifyCreateTransactionButtonIsDisabled();
+ Teller.enterTextIntoAmountInputField("500.00");
+ Teller.clickEnabledCreateTransactionButton();
+ Teller.clickEnabledConfirmTransactionButton();
+ Common.verifyMessagePopupIsDisplayed("Transaction successfully confirmed");
+ //verify money has been taken out of account 7353
});
it('should not be able to assign the same employee to another teller', function () {
});
+ it('closing teller should unassign employee', function () {
+
+ });
});
\ No newline at end of file
diff --git a/conf.js b/conf.js
index b6f387f..f8cc8d8 100644
--- a/conf.js
+++ b/conf.js
@@ -9,7 +9,8 @@
'Specs/cheque_management.js'
],
directConnect: true,
- allScriptsTimeout: 25000,
+ allScriptsTimeout: 45000,
+ jasmineNodeOpts: {defaultTimeoutInterval: 500000},
capabilities: {
browserName: 'chrome',
chromeOptions: {