From 1c92606e9306b228da6cea4cd4039fa685adaf55 Mon Sep 17 00:00:00 2001 From: Pete Harverson Date: Tue, 22 Mar 2022 16:35:51 +0000 Subject: [PATCH] [ML] Fix tests --- .../api_integration/apis/transform/delete_transforms.ts | 6 +++--- x-pack/test/functional/apps/transform/cloning.ts | 4 ++-- .../functional/apps/transform/creation_index_pattern.ts | 4 ++-- .../apps/transform/creation_runtime_mappings.ts | 4 ++-- .../functional/apps/transform/creation_saved_search.ts | 4 ++-- x-pack/test/functional/services/transform/wizard.ts | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/x-pack/test/api_integration/apis/transform/delete_transforms.ts b/x-pack/test/api_integration/apis/transform/delete_transforms.ts index b823c46509a6362..740155b2726e3a2 100644 --- a/x-pack/test/api_integration/apis/transform/delete_transforms.ts +++ b/x-pack/test/api_integration/apis/transform/delete_transforms.ts @@ -66,7 +66,7 @@ export default ({ getService }: FtrProviderContext) => { expect(body[transformId].transformDeleted.success).to.eql(true); expect(body[transformId].destIndexDeleted.success).to.eql(false); - expect(body[transformId].destIndexPatternDeleted.success).to.eql(false); + expect(body[transformId].destDataViewDeleted.success).to.eql(false); await transform.api.waitForTransformNotToExist(transformId); await transform.api.waitForIndicesToExist(destinationIndex); }); @@ -244,7 +244,7 @@ export default ({ getService }: FtrProviderContext) => { const reqBody: DeleteTransformsRequestSchema = { transformsInfo: [{ id: transformId, state: TRANSFORM_STATE.STOPPED }], deleteDestIndex: false, - deleteDestIndexPattern: true, + deleteDestDataView: true, }; const { body, status } = await supertest .post(`/api/transform/delete_transforms`) @@ -284,7 +284,7 @@ export default ({ getService }: FtrProviderContext) => { const reqBody: DeleteTransformsRequestSchema = { transformsInfo: [{ id: transformId, state: TRANSFORM_STATE.STOPPED }], deleteDestIndex: true, - deleteDestIndexPattern: true, + deleteDestDataView: true, }; const { body, status } = await supertest .post(`/api/transform/delete_transforms`) diff --git a/x-pack/test/functional/apps/transform/cloning.ts b/x-pack/test/functional/apps/transform/cloning.ts index 382f1b5ba75ab10..3cbb0892bd4ecf9 100644 --- a/x-pack/test/functional/apps/transform/cloning.ts +++ b/x-pack/test/functional/apps/transform/cloning.ts @@ -333,8 +333,8 @@ export default function ({ getService }: FtrProviderContext) { await transform.wizard.setDestinationIndex(testData.destinationIndex); await transform.testExecution.logTestStep('should display the create data view switch'); - await transform.wizard.assertCreateIndexPatternSwitchExists(); - await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); + await transform.wizard.assertCreateDataViewSwitchExists(); + await transform.wizard.assertCreateDataViewSwitchCheckState(true); await transform.testExecution.logTestStep('should display the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); 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 37647b48d31807e..dc8190c877d613c 100644 --- a/x-pack/test/functional/apps/transform/creation_index_pattern.ts +++ b/x-pack/test/functional/apps/transform/creation_index_pattern.ts @@ -589,8 +589,8 @@ export default function ({ getService }: FtrProviderContext) { await transform.wizard.setDestinationIndex(testData.destinationIndex); await transform.testExecution.logTestStep('displays the create data view switch'); - await transform.wizard.assertCreateIndexPatternSwitchExists(); - await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); + await transform.wizard.assertCreateDataViewSwitchExists(); + await transform.wizard.assertCreateDataViewSwitchCheckState(true); await transform.testExecution.logTestStep('displays the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); diff --git a/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts b/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts index 72467b3060ab140..2c7889572ce74c4 100644 --- a/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts +++ b/x-pack/test/functional/apps/transform/creation_runtime_mappings.ts @@ -401,8 +401,8 @@ export default function ({ getService }: FtrProviderContext) { await transform.wizard.setDestinationIndex(testData.destinationIndex); await transform.testExecution.logTestStep('displays the create data view switch'); - await transform.wizard.assertCreateIndexPatternSwitchExists(); - await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); + await transform.wizard.assertCreateDataViewSwitchExists(); + await transform.wizard.assertCreateDataViewSwitchCheckState(true); await transform.testExecution.logTestStep('displays the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); diff --git a/x-pack/test/functional/apps/transform/creation_saved_search.ts b/x-pack/test/functional/apps/transform/creation_saved_search.ts index acdc0c64ddda206..b33027da24341aa 100644 --- a/x-pack/test/functional/apps/transform/creation_saved_search.ts +++ b/x-pack/test/functional/apps/transform/creation_saved_search.ts @@ -232,8 +232,8 @@ export default function ({ getService }: FtrProviderContext) { await transform.wizard.setDestinationIndex(testData.destinationIndex); await transform.testExecution.logTestStep('displays the create data view switch'); - await transform.wizard.assertCreateIndexPatternSwitchExists(); - await transform.wizard.assertCreateIndexPatternSwitchCheckState(true); + await transform.wizard.assertCreateDataViewSwitchExists(); + await transform.wizard.assertCreateDataViewSwitchCheckState(true); await transform.testExecution.logTestStep('displays the continuous mode switch'); await transform.wizard.assertContinuousModeSwitchExists(); diff --git a/x-pack/test/functional/services/transform/wizard.ts b/x-pack/test/functional/services/transform/wizard.ts index 714ae52a6641b97..2b95570a9fb1a58 100644 --- a/x-pack/test/functional/services/transform/wizard.ts +++ b/x-pack/test/functional/services/transform/wizard.ts @@ -670,13 +670,13 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi await this.assertDestinationIndexValue(destinationIndex); }, - async assertCreateIndexPatternSwitchExists() { - await testSubjects.existOrFail(`transformCreateIndexPatternSwitch`, { allowHidden: true }); + async assertCreateDataViewSwitchExists() { + await testSubjects.existOrFail(`transformCreateDataViewSwitch`, { allowHidden: true }); }, - async assertCreateIndexPatternSwitchCheckState(expectedCheckState: boolean) { + async assertCreateDataViewSwitchCheckState(expectedCheckState: boolean) { const actualCheckState = - (await testSubjects.getAttribute('transformCreateIndexPatternSwitch', 'aria-checked')) === + (await testSubjects.getAttribute('transformCreateDataViewSwitch', 'aria-checked')) === 'true'; expect(actualCheckState).to.eql( expectedCheckState,