Skip to content

Commit

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

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.
  • Loading branch information
pheyos committed Jan 17, 2022
1 parent f347714 commit 7f15eaa
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 7f15eaa

Please sign in to comment.