diff --git a/x-pack/test/functional/services/ml/job_wizard_common.ts b/x-pack/test/functional/services/ml/job_wizard_common.ts index 8c478d004e7de..df2b0ad906912 100644 --- a/x-pack/test/functional/services/ml/job_wizard_common.ts +++ b/x-pack/test/functional/services/ml/job_wizard_common.ts @@ -358,7 +358,7 @@ export function MachineLearningJobWizardCommonProvider( async toggleStartDatafeedSwitch(toggle: boolean) { const subj = 'mlJobWizardStartDatafeedCheckbox'; - if ((await this.getStartDatafeedSwitchCheckedState()) === !toggle) { + if ((await this.getStartDatafeedSwitchCheckedState()) !== toggle) { await retry.tryForTime(5 * 1000, async () => { await testSubjects.clickWhenNotDisabled(subj); await this.assertStartDatafeedSwitchCheckedState(toggle);