Skip to content

Commit

Permalink
rewrite savedSearchRowCount expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed Jan 27, 2021
1 parent 45ee526 commit 05c869c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/functional/apps/home/_sample_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
log.debug('Checking area, bar and heatmap charts rendered');
await dashboardExpect.seriesElementCount(15);
log.debug('Checking saved searches rendered');
await dashboardExpect.savedSearchRowCount(50);
await dashboardExpect.savedSearchRowCount(10);
log.debug('Checking input controls rendered');
await dashboardExpect.inputControlItemCount(3);
log.debug('Checking tag cloud rendered');
Expand Down
3 changes: 1 addition & 2 deletions test/functional/services/dashboard/expectations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,13 @@ export function DashboardExpectProvider({ getService, getPageObjects }: FtrProvi
}

async savedSearchRowCount(expectedCount: number) {
// issue lies here
log.debug(`DashboardExpect.savedSearchRowCount(${expectedCount})`);
await retry.try(async () => {
const savedSearchRows = await testSubjects.findAll(
'docTableExpandToggleColumn',
findTimeout
);
expect(savedSearchRows.length).to.be(expectedCount);
expect(savedSearchRows.length).to.greaterThan(expectedCount);
});
}

Expand Down

0 comments on commit 05c869c

Please sign in to comment.