From 46ca338ce17992eb1ef71dfe8a464f97006308af Mon Sep 17 00:00:00 2001 From: Walter Rafelsberger Date: Thu, 22 Sep 2022 10:26:33 +0200 Subject: [PATCH] [ML] Transforms: Fix flaky wizard functional tests. (#141209) This replaces clickWhenNotDisabledWithoutRetry with clickWhenNotDisabled to stabilize tests. (cherry picked from commit d078d81eb90eb93ddc3023c912f25cf36e90de5d) --- .../functional/apps/transform/creation_index_pattern.ts | 3 +-- .../functional/services/transform/source_selection.ts | 2 +- x-pack/test/functional/services/transform/wizard.ts | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/x-pack/test/functional/apps/transform/creation_index_pattern.ts b/x-pack/test/functional/apps/transform/creation_index_pattern.ts index f23ebdde93d9b..4dee8e3af8262 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation_index_pattern.ts @@ -21,8 +21,7 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const transform = getService('transform'); - // Failing: See https://github.com/elastic/kibana/issues/139781 - describe.skip('creation_index_pattern', function () { + describe('creation_index_pattern', function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/ecommerce'); await transform.testResources.createIndexPatternIfNeeded('ft_ecommerce', 'order_date'); diff --git a/x-pack/test/functional/services/transform/source_selection.ts b/x-pack/test/functional/services/transform/source_selection.ts index 9f77dbeb7ba40..b5096a2dd2f3d 100644 --- a/x-pack/test/functional/services/transform/source_selection.ts +++ b/x-pack/test/functional/services/transform/source_selection.ts @@ -26,7 +26,7 @@ export function TransformSourceSelectionProvider({ getService }: FtrProviderCont async selectSource(sourceName: string) { await this.filterSourceSelection(sourceName); await retry.tryForTime(30 * 1000, async () => { - await testSubjects.clickWhenNotDisabledWithoutRetry(`savedObjectTitle${sourceName}`); + await testSubjects.clickWhenNotDisabled(`savedObjectTitle${sourceName}`); await testSubjects.existOrFail('transformPageCreateTransform', { timeout: 10 * 1000 }); }); }, diff --git a/x-pack/test/functional/services/transform/wizard.ts b/x-pack/test/functional/services/transform/wizard.ts index 9eff6dff611e3..df65911cb4098 100644 --- a/x-pack/test/functional/services/transform/wizard.ts +++ b/x-pack/test/functional/services/transform/wizard.ts @@ -34,7 +34,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi return { async clickNextButton() { await testSubjects.existOrFail('transformWizardNavButtonNext'); - await testSubjects.clickWhenNotDisabledWithoutRetry('transformWizardNavButtonNext'); + await testSubjects.clickWhenNotDisabled('transformWizardNavButtonNext'); }, async assertDefineStepActive() { @@ -317,7 +317,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi const subj = 'transformAdvancedRuntimeMappingsEditorSwitch'; if ((await this.getRuntimeMappingsEditorSwitchCheckedState()) !== toggle) { await retry.tryForTime(5 * 1000, async () => { - await testSubjects.clickWhenNotDisabledWithoutRetry(subj); + await testSubjects.clickWhenNotDisabled(subj); await this.assertRuntimeMappingsEditorSwitchCheckState(toggle); }); } @@ -355,7 +355,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi async applyRuntimeMappings() { const subj = 'transformRuntimeMappingsApplyButton'; await testSubjects.existOrFail(subj); - await testSubjects.clickWhenNotDisabledWithoutRetry(subj); + await testSubjects.clickWhenNotDisabled(subj); const isEnabled = await testSubjects.isEnabled(subj); expect(isEnabled).to.eql( false, @@ -560,7 +560,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi break; } } - await testSubjects.clickWhenNotDisabledWithoutRetry('transformApplyAggChanges'); + await testSubjects.clickWhenNotDisabled('transformApplyAggChanges'); await testSubjects.missingOrFail(`transformAggPopoverForm_${expectedLabel}`); },