diff --git a/test/examples/discover_customization_examples/customizations.ts b/test/examples/discover_customization_examples/customizations.ts index 33aeae98d7154..6d0d223a06cfe 100644 --- a/test/examples/discover_customization_examples/customizations.ts +++ b/test/examples/discover_customization_examples/customizations.ts @@ -20,6 +20,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); const browser = getService('browser'); const dataGrid = getService('dataGrid'); + const retry = getService('retry'); const defaultSettings = { defaultIndex: 'logstash-*' }; describe('Customizations', () => { @@ -61,13 +62,15 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await testSubjects.click('logsViewSelectorButton'); await testSubjects.click('logsViewSelectorOption-ASavedSearch'); await PageObjects.header.waitUntilLoadingHasFinished(); - const { title, description } = await PageObjects.common.getSharedItemTitleAndDescription(); - const expected = { - title: 'A Saved Search', - description: 'A Saved Search Description', - }; - expect(title).to.eql(expected.title); - expect(description).to.eql(expected.description); + await retry.try(async () => { + const { title, description } = await PageObjects.common.getSharedItemTitleAndDescription(); + const expected = { + title: 'A Saved Search', + description: 'A Saved Search Description', + }; + expect(title).to.eql(expected.title); + expect(description).to.eql(expected.description); + }); }); it('Search bar Prepend Filters exists and should apply filter properly', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts b/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts index e538ead1ce64b..08e59867c8aac 100644 --- a/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts +++ b/x-pack/test_serverless/functional/test_suites/common/examples/discover_customization_examples/customizations.ts @@ -18,6 +18,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); const browser = getService('browser'); const dataGrid = getService('dataGrid'); + const retry = getService('retry'); const defaultSettings = { defaultIndex: 'logstash-*' }; describe('Customizations', () => { @@ -60,13 +61,15 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { await testSubjects.click('logsViewSelectorButton'); await testSubjects.click('logsViewSelectorOption-ASavedSearch'); await PageObjects.header.waitUntilLoadingHasFinished(); - const { title, description } = await PageObjects.common.getSharedItemTitleAndDescription(); - const expected = { - title: 'A Saved Search', - description: 'A Saved Search Description', - }; - expect(title).to.eql(expected.title); - expect(description).to.eql(expected.description); + await retry.try(async () => { + const { title, description } = await PageObjects.common.getSharedItemTitleAndDescription(); + const expected = { + title: 'A Saved Search', + description: 'A Saved Search Description', + }; + expect(title).to.eql(expected.title); + expect(description).to.eql(expected.description); + }); }); it('Search bar Prepend Filters exists and should apply filter properly', async () => {