Skip to content

Commit

Permalink
Add try loops around testing first Discover doc
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeDr committed Dec 9, 2016
1 parent 7e85c64 commit 8dfab84
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/functional/apps/management/_scripted_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ bdd.describe('creating and using Lucence expression scripted fields', function d
});
await PageObjects.header.isGlobalLoadingIndicatorHidden();
await PageObjects.visualize.waitForVisualization();
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.be('September 18th 2015, 16:08:20.320 30');
await PageObjects.common.try(async function() {
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.be('September 18th 2015, 16:08:20.320 30');
});
});

bdd.it('should filter by scripted field value in Discover', async function () {
Expand Down Expand Up @@ -121,8 +123,10 @@ bdd.describe('creating and using Painless numeric scripted fields', function des
});
await PageObjects.header.isGlobalLoadingIndicatorHidden();
await PageObjects.visualize.waitForVisualization();
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.be('September 18th 2015, 16:08:20.320 30');
await PageObjects.common.try(async function() {
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.be('September 18th 2015, 16:08:20.320 30');
});
});

bdd.it('should filter by scripted field value in Discover', async function () {
Expand Down Expand Up @@ -188,8 +192,10 @@ bdd.describe('creating and using Painless string scripted fields', function desc
});
await PageObjects.header.isGlobalLoadingIndicatorHidden();
await PageObjects.visualize.waitForVisualization();
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.be('September 18th 2015, 16:08:20.320 good');
await PageObjects.common.try(async function() {
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.be('September 18th 2015, 16:08:20.320 good');
});
});

bdd.it('should filter by expression scripted field value in Discover', async function () {
Expand Down

0 comments on commit 8dfab84

Please sign in to comment.