Skip to content

Commit dec594b

Browse files
authored
retry test (#125284)
1 parent 643e439 commit dec594b

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

x-pack/test/functional/page_objects/lens_page.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,13 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
574574
const lastIndex = (
575575
await find.allByCssSelector('[data-test-subj^="indexPattern-dimension-field"]')
576576
).length;
577-
await testSubjects.click('indexPattern-terms-add-field');
578-
// count the number of defined terms
579-
const target = await testSubjects.find(`indexPattern-dimension-field-${lastIndex}`);
580-
await comboBox.openOptionsList(target);
581-
await comboBox.setElement(target, field);
577+
await retry.try(async () => {
578+
await testSubjects.click('indexPattern-terms-add-field');
579+
// count the number of defined terms
580+
const target = await testSubjects.find(`indexPattern-dimension-field-${lastIndex}`, 1000);
581+
await comboBox.openOptionsList(target);
582+
await comboBox.setElement(target, field);
583+
});
582584
},
583585

584586
async checkTermsAreNotAvailableToAgg(fields: string[]) {

0 commit comments

Comments
 (0)