Skip to content

Commit

Permalink
fix(invoices): fix broken filter test
Browse files Browse the repository at this point in the history
This commit fixes a broken filter test that was not actually clicking an
element.  It also optimizes the patient search tests slightly.
  • Loading branch information
Jonathan Niles committed Jul 7, 2016
1 parent 76d7232 commit 25393c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/test/e2e/patient/invoice/registry.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ function InvoiceRegistrySearch() {

it('filters by radio buttons', () => {
FU.buttons.search();
element(by.id('no'));
element(by.id('no')).click();
FU.buttons.submit();

expectNumberOfGridRows(4);
expectNumberOfGridRows(0);
expectNumberOfFilters(1);

// make sure to clear the filters for the next test
Expand Down
8 changes: 4 additions & 4 deletions client/test/e2e/patient/registry.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ function PatientRegistrySearch() {
};

const defaultVisibleRowNumber = 3;
const grid = element(by.id('patient-registry'));
const rows = grid.element(by.css('.ui-grid-render-container-body'))
.all(by.repeater('(rowRenderIndex, row) in rowContainer.renderedRows track by $index'));

function expectNumberOfGridRows(number) {
const grid = element(by.id('patient-registry'));
const rows = grid.element(by.css('.ui-grid-render-container-body'))
.all(by.repeater('(rowRenderIndex, row) in rowContainer.renderedRows track by $index'));

function expectNumberOfGridRows(number) {
expect(rows.count(),
`Expected Patient Registry ui-grid's row count to be ${number}.`
).to.eventually.equal(number);
Expand Down

0 comments on commit 25393c5

Please sign in to comment.