Protractor tests. Loan product/account tests.
diff --git a/Pages/Accounting b/Pages/Accounting
index d42f740..450ff0d 100644
--- a/Pages/Accounting
+++ b/Pages/Accounting
@@ -173,7 +173,7 @@
//Journal entries
enterTextIntoSearchAccountInputField: function(account) {
browser.wait(EC.visibilityOf(accountSearchInputField), 5000);
- accountSearchInputField.click().sendKeys(account);
+ accountSearchInputField.clear().click().sendKeys(account);
},
clickSearchButton: function(){
$$("button").filter(function(elem, index) {
@@ -213,6 +213,7 @@
browser.sleep(500);
},
verifyThirdJournalEntry: function(transactionType, transactionAmount){
+ browser.sleep(500);
expect($$("fims-layout-card-over .mat-list-item .mat-list-text p").get(4).getText().then(function(text){
return text === transactionType;
})).toBe(true);
diff --git a/Pages/CustomerLoans.js b/Pages/CustomerLoans.js
index db03ecc..37afa78 100644
--- a/Pages/CustomerLoans.js
+++ b/Pages/CustomerLoans.js
@@ -132,7 +132,6 @@
browser.executeScript("arguments[0].scrollIntoView();", depositAccountSelect.getWebElement());
browser.wait(EC.elementToBeClickable(depositAccountSelect), 3000);
depositAccountSelect.click();
- expect($(".mat-option").isPresent()).toBe(true);
expect(element(by.cssContainingText('.mat-option', accountIdentifier)).isPresent()).toBe(false);
},
enterTextIntoTermInputField: function (text) {
@@ -633,16 +632,16 @@
expect($("a[title='Edit document']").isPresent()).toBe(false);
},
verifyDocumentCanBeDeleted: function(){
- expect($("a[title='Delete document']").isPresent()).toBe(true);
+ expect($("button[title='Delete document']").isPresent()).toBe(true);
},
verifyDocumentCannotBeDeleted: function(){
- expect($("a[title='Delete document']").isPresent()).toBe(false);
+ expect($("button[title='Delete document']").isPresent()).toBe(false);
},
clickButtonEditDocument: function(){
$("a[title='Edit document']").click();
},
clickButtonDeleteDocument: function(){
- $("a[title='Delete document']").click();
+ $("button[title='Delete document']").click();
},
clickButtonLock: function(){
buttons.filter(function(elem, index) {
diff --git a/Pages/Customers.js b/Pages/Customers.js
index 5451cf6..efc76c8 100644
--- a/Pages/Customers.js
+++ b/Pages/Customers.js
@@ -324,6 +324,7 @@
return text === action;
});
}).click();
+ browser.sleep(300);
},
goToStepCustomFields: function(){
browser.sleep(100);
diff --git a/Pages/Loans.js b/Pages/Loans.js
index 61d7a26..30fb810 100644
--- a/Pages/Loans.js
+++ b/Pages/Loans.js
@@ -359,5 +359,7 @@
verifyEditLoanProductButtonIsNotDisplayed: function(){
browser.sleep(500);
expect($("a[title='Edit product']").isPresent()).toBe(false);
- }
+ },
+ //ranges
+
};
\ No newline at end of file
diff --git a/Specs/loans1_creation&assignment.js b/Specs/loans1_creation&assignment.js
index 52a437e..b5a1be4 100644
--- a/Specs/loans1_creation&assignment.js
+++ b/Specs/loans1_creation&assignment.js
@@ -639,9 +639,9 @@
//second loan repayment
Teller.clickOnRepayLoanForCustomer(customerAccount);
Teller.selectLoanAccountToBeAffected(customerAccount + ".clp.00001(" + loanShortName2 + ")");
- Teller.enterTextIntoAmountInputField("5");
+ Teller.enterTextIntoAmountInputField("10");
Teller.clickEnabledCreateTransactionButton();
- Teller.verifyTransactionAmount("5");
+ Teller.verifyTransactionAmount("10");
Teller.verifyTransactionCharge("repay-principal", "9.5");
Teller.verifyTransactionCharge("repay-fees", "0.5");
Teller.clickEnabledConfirmTransactionButton();
@@ -656,10 +656,26 @@
Teller.verifyTransactionCharge("repay-principal", "490.5");
Teller.clickEnabledConfirmTransactionButton();
Common.verifyMessagePopupIsDisplayed("Transaction successfully confirmed");
- //journal entry; 10 towards the fees
- //journal entry; 0.5 towards fees and rest towards principal
- //journal entry
- //ToDO: loan should no longer be offered for selection once repaid
+ //ToDo: loan should no longer be offered for selection once repaid
+ Accounting.goToAccountingViaSidePanel();
+ Accounting.goToJournalEntries();
+ Accounting.enterTextIntoSearchAccountInputField(customerAccount + ".clf.00002");
+ Accounting.clickSearchButton();
+ Accounting.verifySecondJournalEntry("Principal Payment", "Amount: 10.00");
+ Accounting.clickSecondJournalEntry();
+ Accounting.verifyAccountHasBeenDebitedWithAmountInRow(tellerAccount, "10.00", 1);
+ Accounting.verifyAccountHasBeenCreditedWithAmountInRow(customerAccount + ".clf.00002", "10.00", 2);
+ Accounting.verifyThirdJournalEntry("Principal Payment", "Amount: 10.00");
+ Accounting.clickThirdJournalEntry();
+ Accounting.verifyAccountHasBeenDebitedWithAmountInRow(tellerAccount, "10.00", 1);
+ Accounting.verifyAccountHasBeenCreditedWithAmount(customerAccount + ".clf.00002", "0.50");
+ Accounting.verifyAccountHasBeenCreditedWithAmount(customerAccount + ".clp.00001", "9.50");
+ Accounting.enterTextIntoSearchAccountInputField(customerAccount + ".clp.00001");
+ Accounting.clickSearchButton();
+ Accounting.verifyThirdJournalEntry("Principal Payment", "Amount: 490.50");
+ Accounting.clickThirdJournalEntry();
+ Accounting.verifyAccountHasBeenDebitedWithAmountInRow(tellerAccount, "490.50", 1);
+ Accounting.verifyAccountHasBeenCreditedWithAmountInRow(customerAccount + ".clp.00001", "490.50", 2);
//close loan and verify action "Repay loan" is no longer offered
Customers.goToManageCustomersViaSidePanel();
Common.clickSearchButtonToMakeSearchInputFieldAppear();
@@ -669,8 +685,8 @@
Customers.clickManageLoanAccountsForMember(customerAccount);
Common.clickLinkShowForFirstRowInTable();
CustomerLoans.goToTasksForCustomerLoan(customerAccount, loanShortName2, loanAccountShortName);
- Customers.clickButtonForTask("CLOSE");
- Customers.clickButtonForTask("CLOSE");
+ CustomerLoans.clickButtonForTask("CLOSE");
+ CustomerLoans.clickButtonForTask("CLOSE");
Common.verifyMessagePopupIsDisplayed("Case is going to be updated");
CustomerLoans.verifyLoanStatusIs("CLOSED");
Common.clickBackButtonInTitleBar();
@@ -680,6 +696,7 @@
Teller.verifyActionRepayLoanNotOfferedForCustomer(customerAccount);
}),
it('update/deletion of unassigned/assigned product', function () {
+ browser.pause();
//assigned product cannot be deleted anymore
//what about disabled/edited?
//disable assigned product & check customer loan account: ATEN-475