From 4289e4c3a0039d7ae3eb04611c8d488e91698699 Mon Sep 17 00:00:00 2001 From: dej611 Date: Mon, 16 Dec 2024 13:42:22 +0100 Subject: [PATCH] :wrench: Add a retry --- x-pack/test/functional/apps/discover/visualize_field.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/discover/visualize_field.ts b/x-pack/test/functional/apps/discover/visualize_field.ts index 7a9a5e3b1a8c3..43a23ade0cf80 100644 --- a/x-pack/test/functional/apps/discover/visualize_field.ts +++ b/x-pack/test/functional/apps/discover/visualize_field.ts @@ -159,8 +159,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { expect(await testSubjects.exists('xyVisChart')).to.be(true); await discover.chooseLensSuggestion('pie'); - await header.waitUntilLoadingHasFinished(); - expect(await testSubjects.exists('partitionVisChart')).to.be(true); + retry.waitFor('partition chart suggestion to appear', async () => { + await header.waitUntilLoadingHasFinished(); + return testSubjects.exists('partitionVisChart'); + }); }); it('should allow changing dimensions', async () => {