Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fix tests for inline messages
Browse files Browse the repository at this point in the history
manaswinidas committed Mar 28, 2017
1 parent 4503f77 commit b1002f4
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/patients/edit/controller.js
Original file line number Diff line number Diff line change
@@ -647,7 +647,7 @@ export default AbstractEditController.extend(BloodTypes, DiagnosisActions, Retur
this._updateSequence(record).then(() => {
$('.message').show();
$('.message').text(this.get('i18n').t('patients.messages.savedPatient', record));
$(".message").delay(3000).fadeOut(100);
$('.message').delay(3000).fadeOut(100);
});
}

5 changes: 2 additions & 3 deletions tests/acceptance/patient-notes-test.js
Original file line number Diff line number Diff line change
@@ -21,11 +21,10 @@ test('patient notes crud testing', function(assert) {
fillIn('.test-first-name input', 'John');
fillIn('.test-last-name input', 'Doe');
click('.panel-footer button:contains(Add)');
waitToAppear('.modal-dialog');
waitToAppear('.message:contains(The patient record for John Doe has been saved)');
});
andThen(function() {
assert.equal(find('.modal-title').text(), 'Patient Saved', 'Patient record has been saved');
click('button:contains(Close)');
assert.equal(find('.message').text(), 'The patient record for John Doe has been saved.');
waitToAppear('.patient-summary');
});
andThen(function() {
7 changes: 3 additions & 4 deletions tests/acceptance/patients-test.js
Original file line number Diff line number Diff line change
@@ -87,12 +87,11 @@ test('Adding a new patient record', function(assert) {
fillIn('.test-first-name input', 'John');
fillIn('.test-last-name input', 'Doe');
click('.panel-footer button:contains(Add)');
waitToAppear('.modal-dialog');
waitToAppear('.message:contains(The patient record for John Doe has been saved)');
andThen(function() {
assert.equal(find('.modal-title').text(), 'Patient Saved', 'Patient record has been saved');
assert.equal(find('.modal-body').text().trim(), 'The patient record for John Doe has been saved.', 'Record has been saved');
assert.equal(find('.message').text().trim(), 'The patient record for John Doe has been saved.');
});
click('button:contains(Close)');

waitToAppear('.patient-summary');

andThen(function() {

0 comments on commit b1002f4

Please sign in to comment.