Skip to content

Commit

Permalink
fix(identities): update tests to use new ids
Browse files Browse the repository at this point in the history
This commit updates all end-to-end tests to use the new references based
on table IDs introduced in #15.
  • Loading branch information
Jonathan Niles authored and sfount committed Dec 23, 2016
1 parent c835955 commit a17a5b0
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ function SearchCashPaymentModalController(Debtors, Users, Cashboxes, Notify, Ins

// client
Debtors.read()
.then(function (list) {
vm.debtors = list;
})
.catch(Notify.handleError);
.then(function (list) {
vm.debtors = list;
})
.catch(Notify.handleError);

// cashboxes
Cashboxes.read()
.then(function (list) {
vm.cashboxes = list;
})
.catch(Notify.handleError);
.then(function (list) {
vm.cashboxes = list;
})
.catch(Notify.handleError);

// users
Users.read()
.then(function (list) {
vm.users = list;
})
.catch(Notify.handleError);
.then(function (list) {
vm.users = list;
})
.catch(Notify.handleError);

function submit() {
var queryParam = formatFilterParameters(vm.bundle);
Expand Down
4 changes: 2 additions & 2 deletions test/end-to-end/cash/cash.registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function CashPaymentsRegistryTests() {

/** Existing reference */
FU.buttons.search();
FU.input('$ctrl.bundle.reference', 'TPA1');
FU.input('$ctrl.bundle.reference', 'CP.TPA.1');
FU.modal.submit();
GU.expectRowCount('payment-registry', 1);

Expand Down Expand Up @@ -111,7 +111,7 @@ function CashPaymentsRegistryTests() {
});

it('successfully Cancel a Cash Payment', () => {
element(by.id(`TPA2`)).click();
element(by.id('CP.TPA.2')).click();
FU.input('ModalCtrl.creditNote.description', 'Cancel This Payment');
FU.modal.submit();
components.notification.hasSuccess();
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/patient/invoice/invoice.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function PatientInvoicePage() {
page.prepare = function prepare() {

// set a patient with id TPA1
findPatient.findById('TPA1');
findPatient.findById('PA.TPA.1');

// set the date to the start of this year
dateEditor.set(new Date('2016-01-02'));
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/patient/invoice/invoice.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ describe('Patient Invoice', function () {
browser.refresh();

// need to have a patient to recover data
page.patient('TPA1');
page.patient('PA.TPA.1');

// click recover cache button
page.recover();
Expand Down
7 changes: 4 additions & 3 deletions test/end-to-end/patient/invoice/registry.search.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

/* jshint expr:true */
/* global element, by, browser */
const chai = require('chai');
Expand All @@ -11,11 +13,10 @@ const FU = require('../../shared/FormUtils');
const InvoiceRegistryPage = require('./registry.page.js');

function InvoiceRegistrySearch() {
'use strict';

const params = {
monthBillNumber : 0,
referenceValue : 'TPA2',
referenceValue : 'IV.TPA.2',
serviceValue : 'Test Service',
userValue : 'Super User',
distributableInvoiceNumber : 4,
Expand Down Expand Up @@ -79,7 +80,7 @@ function InvoiceRegistrySearch() {

it('filters by reference should return a single result', () => {
FU.buttons.search();
FU.input('ModalCtrl.params.reference', 'TPA2');
FU.input('ModalCtrl.params.reference', 'IV.TPA.2');
FU.modal.submit();

expectNumberOfGridRows(1);
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/patient/invoice/registry.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Invoice Registry', () => {

it('Credit Note for reverse any transaction in the posting_journal', () => {

element(by.id('TPA2')).click();
element(by.id('IV.TPA.2')).click();
FU.input('ModalCtrl.creditNote.description', 'Credit Note Error');
FU.modal.submit();
components.notification.hasSuccess();
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/patient/record.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Patient Record', function () {

const patient = {
name : 'Test 2 Patient',
id : 'TPA1',
id : 'PA.TPA.1',
hospital_no : '110',
age : '26',
gender : 'M'
Expand Down
1 change: 0 additions & 1 deletion test/end-to-end/patient/registry.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ helpers.configure(chai);

const FU = require('../shared/FormUtils');


/*
* Patient Search Tests
*
Expand Down

0 comments on commit a17a5b0

Please sign in to comment.