Skip to content

Commit

Permalink
add retry to avoid flakyness.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Jul 19, 2021
1 parent 06b5b8f commit 5922e84
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {

it('can navigate to APM app', async () => {
await PageObjects.common.navigateToApp('apm');
await testSubjects.existOrFail('apmMainContainer', {
timeout: 10000,
});

const apmMainContainerText = await testSubjects.getVisibleTextAll('apmMainContainer');
const apmMainContainerTextItems = apmMainContainerText[0].split('\n');
expect(apmMainContainerTextItems).to.contain('No services found');
await retry.try(async () => {
await testSubjects.existOrFail('apmMainContainer', {
timeout: 10000,
});

const apmMainContainerText = await testSubjects.getVisibleTextAll('apmMainContainer');
const apmMainContainerTextItems = apmMainContainerText[0].split('\n');
expect(apmMainContainerTextItems).to.contain('No services found');
});
});

it('sets the timePicker to return data', async () => {
Expand Down

0 comments on commit 5922e84

Please sign in to comment.