Protractor tests. Teller management.
diff --git a/Pages/Accounting b/Pages/Accounting
index a70ca11..3f287c5 100644
--- a/Pages/Accounting
+++ b/Pages/Accounting
@@ -199,21 +199,22 @@
         expect($$("table tbody tr").get(row - 1).$$(".td-data-table-cell").get(2).getText()).toEqual(amount);
     },
     verifyClerkForJournalEntryIs: function (clerk){
-        browser.sleep(3000);
-        expect($$("md-card .mat-list-text").filter(function(elem, index) {
-            return elem.$("h3").getText().then(function(text) {
+        expect($$("md-card .mat-list-text h3").filter(function(elem, index) {
+            return elem.getText().then(function(text) {
                 return text === "Clerk";
             });
-        }).$$("p").getText().then(function(text){
+        }).first().element(by.xpath("..")).$("p").getText().then(function(text){
             return text == clerk;
         })).toBe(true);
     },
     verifyMessageForJournalEntryIs: function (message){
-        expect($$("md-card .mat-list-text").filter(function(elem, index) {
-            return elem.$("h3").getText().then(function(text) {
+        expect($$("md-card .mat-list-text h3").filter(function(elem, index) {
+            return elem.getText().then(function(text) {
+                console.log(text);
                 return text === "Message";
             });
-        }).$$("p").getText().then(function(text){
+        }).first().element(by.xpath("..")).$("p").getText().then(function(text){
+            console.log(text);
             return text == message;
         })).toBe(true);
     },
diff --git a/Pages/Loans.js b/Pages/Loans.js
index e31c646..0a18064 100644
--- a/Pages/Loans.js
+++ b/Pages/Loans.js
@@ -3,7 +3,6 @@
 //Actions specific to the Loan Products section
 
 var EC = protractor.ExpectedConditions;
-var titleRow = $("fims-layout-card-over .mat-toolbar-row span");
 var createLoan = $("a[href='/loans/create']");
 var shortNameInput = $("fims-id-input[controlname='identifier'] input");
 var nameInput = $(".mat-input-infix input[formcontrolname='name']");
@@ -52,10 +51,6 @@
     goToLoanProductsViaSidePanel: function() {
         $("a[href='/loans']").click();
     },
-    verifyCardHasTitle: function() {
-        form_title = titleRow.getText();
-        expect(form_title).toEqual("Manage loan products");
-    },
     clickButtonCreateLoanProduct: function(){
         browser.wait(EC.visibilityOf(createLoan), 5000);
         createLoan.click();
diff --git a/Specs/teller_management.js b/Specs/teller_management.js
index 8ed410e..ac9e068 100644
--- a/Specs/teller_management.js
+++ b/Specs/teller_management.js
@@ -69,7 +69,7 @@
     it('should create a new branch office and a teller for the branch office', function () {
         Offices.goToManageOfficesViaSidePanel();
         Offices.clickButtonCreateNewOffice();
-        Offices.verifyCardHasTitleCreateOffice();
+        Common.verifyCardHasTitle("Create new office");
         Offices.enterTextIntoOfficeIdentifierInputField(officeIdentifier);
         Offices.enterTextIntoOfficeNameInputField("Branch " + officeIdentifier);
         Offices.clickEnabledContinueButtonForOfficeDetails();
@@ -121,32 +121,35 @@
         Accounting.enterTextIntoSearchAccountInputField(vaultAccount);
         Accounting.clickSearchButton();
         Accounting.verifyFirstJournalEntry("Debit Adjustments", "Amount: 2,500.00");
-        browser.pause();
         Accounting.verifyClerkForJournalEntryIs(employeeIdentifier);
         Accounting.verifyMessageForJournalEntryIs("Teller adjustment.");
         Accounting.verifyAccountHasBeenDebitedWithAmountInRow(tellerAccount, "2,500.00", 1);
         Accounting.verifyAccountHasBeenCreditedWithAmountInRow(vaultAccount, "2,500.00", 2);
-
-        // Common.clickBackButtonInTitleBar();
-        // Common.clickLinkShowForRowWithId("7000");
-        // Common.clickLinkShowForRowWithId("7200");
-        // Common.clickLinkShowForRowWithId(chequesReceivableAccount);
-        // Accounting.viewAccountEntriesForAccount(chequesReceivableAccount);
-        // Accounting.verifyTransactionTypeForRow("CREDIT", 3);
-        // Accounting.verifyTransactionMessageForRow("CQRV", 3);
-        // Accounting.verifyTransactionAmountForRow("300", 3);
-        // Accounting.verifyTransactionBalanceForRow("5000", 3);
-        // Common.clickBackButtonInTitleBar();
-        // Common.clickBackButtonInTitleBar();
-        // Common.clickBackButtonInTitleBar();
-        // Common.clickBackButtonInTitleBar();
-        // Common.clickLinkShowForRowWithId("9000");
-        // Common.clickLinkShowForRowWithId("9100");
-        // Common.clickLinkShowForRowWithId(customerAccount + ".9100.00001");
-        // Accounting.viewAccountEntriesForAccount(customerAccount + ".9100.00001");
-        // Accounting.verifyTransactionTypeForRow("DEBIT", 4);
-        // Accounting.verifyTransactionMessageForRow("CQRV", 4);
-        // Accounting.verifyTransactionAmountForRow("300", 4);
-        // Accounting.verifyTransactionBalanceForRow("5500", 4);
+        Common.clickBackButtonInTitleBar();
+        Common.clickLinkShowForRowWithId("7000");
+        Common.clickLinkShowForRowWithId("7300");
+        Common.clickLinkShowForRowWithId(vaultAccount);
+        Accounting.viewAccountEntriesForAccount(vaultAccount);
+        Accounting.verifyTransactionTypeForRow("CREDIT", 1);
+        Accounting.verifyTransactionMessageForRow("Teller adjustment.", 1);
+        Accounting.verifyTransactionAmountForRow("2500", 1);
+        Accounting.verifyTransactionBalanceForRow("-2500", 1);
+        Common.clickBackButtonInTitleBar();
+        Common.clickBackButtonInTitleBar();
+        Common.clickLinkShowForRowWithId(tellerAccount);
+        Accounting.viewAccountEntriesForAccount(tellerAccount);
+        Accounting.verifyTransactionTypeForRow("DEBIT", 1);
+        Accounting.verifyTransactionMessageForRow("Teller adjustment.", 1);
+        Accounting.verifyTransactionAmountForRow("2500", 1);
+        Accounting.verifyTransactionBalanceForRow("2500", 1);
+        browser.pause();
+    });
+    it('should be able to update teller', function () {
+        Offices.goToManageOfficesViaSidePanel();
+        Common.clickLinkShowForRowWithId(officeIdentifier);
+        Offices.goToManageTellersForOfficeByIdentifier(officeIdentifier);
+    });
+    it('should not be able to assign the same employee to another teller', function () {
+       
     });
 });
\ No newline at end of file
diff --git a/conf.js b/conf.js
index 9b74b82..4539b60 100644
--- a/conf.js
+++ b/conf.js
@@ -6,7 +6,7 @@
 
   framework: 'jasmine',
   specs: [
-      'Specs/cheque_management_from_scratch.js'
+      'Specs/teller_management.js'
   ],
     directConnect: true,
     allScriptsTimeout: 25000,