Skip to content

Commit

Permalink
fix selection list
Browse files Browse the repository at this point in the history
  • Loading branch information
mbayopanda committed May 29, 2019
1 parent a939788 commit b6681a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions test/end-to-end/patient/registry.merge.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ const components = require('../shared/components');
const MergePatientPage = require('./registry.merge.page');

describe('Merge Patients', () => {
beforeEach(() => helpers.navigate('#/patients'));
before(() => helpers.navigate('#/patients'));

const Page = new MergePatientPage();

it('forbid selection of more than two patients', async () => {
await Page.gridSelectRows(0, 1, 2);
await Page.gridSelectRows(2, 3, 4);
await Page.openMergeTool();
await components.notification.hasWarn();

// unselect all patients
await Page.gridSelectRows(2, 3, 4);
});

it('successfully merge two selected patients into one', async () => {
const reference = 'PA.TPA.2';

await Page.gridSelectRows(1, 2);
await Page.gridSelectRows(3, 4);
await Page.openMergeTool();
await Page.selectPatientToKeep(reference);
await Page.merge();
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/patient/registry.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function PatientRegistrySearch() {
}

it('grid should have 4 visible rows', async () => {
const DEFAULT_PATIENTS_FOR_TODAY = 5;
const DEFAULT_PATIENTS_FOR_TODAY = 4;
await modal.switchToDefaultFilterTab();
await modal.setPeriod('today');
await modal.submit();
Expand Down

0 comments on commit b6681a6

Please sign in to comment.