Skip to content

Commit

Permalink
[ML] Functional tests - stabilize transform wizard field input (#123126
Browse files Browse the repository at this point in the history
…) (#123180)

This PR stabilizes the transform wizard field input during functional tests by changing to the more stable setValueWithChecks service method that we're already using for many ML wizard fields.

(cherry picked from commit 7f15eaa)

Co-authored-by: Robert Oskamp <[email protected]>
  • Loading branch information
kibanamachine and pheyos authored Jan 17, 2022
1 parent daf372a commit 3cd5f59
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions x-pack/test/functional/services/transform/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
const testSubjects = getService('testSubjects');
const comboBox = getService('comboBox');
const retry = getService('retry');
const ml = getService('ml');
const PageObjects = getPageObjects(['discover', 'timePicker']);

return {
Expand Down Expand Up @@ -679,7 +680,9 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
},

async setTransformId(transformId: string) {
await testSubjects.setValue('transformIdInput', transformId, { clearWithKeyboard: true });
await ml.commonUI.setValueWithChecks('transformIdInput', transformId, {
clearWithKeyboard: true,
});
await this.assertTransformIdValue(transformId);
},

Expand All @@ -699,7 +702,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
},

async setTransformDescription(transformDescription: string) {
await testSubjects.setValue('transformDescriptionInput', transformDescription, {
await ml.commonUI.setValueWithChecks('transformDescriptionInput', transformDescription, {
clearWithKeyboard: true,
});
await this.assertTransformDescriptionValue(transformDescription);
Expand All @@ -721,7 +724,7 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
},

async setDestinationIndex(destinationIndex: string) {
await testSubjects.setValue('transformDestinationIndexInput', destinationIndex, {
await ml.commonUI.setValueWithChecks('transformDestinationIndexInput', destinationIndex, {
clearWithKeyboard: true,
});
await this.assertDestinationIndexValue(destinationIndex);
Expand Down

0 comments on commit 3cd5f59

Please sign in to comment.