Skip to content

Commit

Permalink
fix(records): fix bug in patient records
Browse files Browse the repository at this point in the history
This commit fixes a bug in the patient records page that was introduced
into master earlier.
  • Loading branch information
jniles committed May 25, 2016
1 parent 3b57368 commit a9f117c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions client/test/e2e/patient/record.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@ describe('Patient Record', function () {

const root = '#/patients/';
const id = '274c51ae-efcc-4238-98c6-f402bfb39866';

const patient = {
name : 'Test Patient 2',
id : 'TPA 1',
id : 'TPA TPA1',
hospital_no : '110',
age : '25',
gender : 'M'
};

const path = root.concat(id);

before(() => helpers.navigate(path));

it('downloads and correctly displays patient information', function () {
expect(element(by.id('name')).getText()).to.eventually.equal(patient.name);
expect(element(by.id('patientID')).getText()).to.eventually.equal(patient.id);
expect(element(by.id('hospitalNo')).getText()).to.eventually.equal(patient.hospital_no);
expect(element(by.id('age')).getText()).to.eventually.equal(patient.age);
expect(element(by.id('gender')).getText()).to.eventually.equal(patient.gender);
});

it('informs the user that there is no patient for invalid request', function () {
helpers.navigate(root.concat('invalidid'));
components.notification.hasError();
components.notification.hasError();
expect(element(by.id('nopatient')).isPresent()).to.eventually.equal(true);
})
});

});

0 comments on commit a9f117c

Please sign in to comment.