mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Transform: Fix data view error on cloning due to missing indices (#138756)
* [ML] Fix data view fetch fields error due to index not yet existing by setting allowNoIndex to true * Add functional tests * Remove toast check for deletion Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
08210170bd
commit
b6fce4df84
6 changed files with 17 additions and 0 deletions
|
@ -244,6 +244,7 @@ export const StepCreateForm: FC<StepCreateFormProps> = React.memo(
|
|||
...(isPopulatedObject(runtimeMappings) && isLatestTransform(transformConfig)
|
||||
? { runtimeFieldMap: runtimeMappings }
|
||||
: {}),
|
||||
allowNoIndex: true,
|
||||
},
|
||||
false,
|
||||
true
|
||||
|
|
|
@ -565,6 +565,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
'should start the transform and finish processing'
|
||||
);
|
||||
await transform.wizard.startTransform();
|
||||
await transform.wizard.assertErrorToastsNotExist();
|
||||
await transform.wizard.waitForProgressBarComplete();
|
||||
|
||||
await transform.testExecution.logTestStep('should return to the management page');
|
||||
|
|
|
@ -664,6 +664,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
await transform.testExecution.logTestStep('starts the transform and finishes processing');
|
||||
await transform.wizard.startTransform();
|
||||
await transform.wizard.assertErrorToastsNotExist();
|
||||
await transform.wizard.waitForProgressBarComplete();
|
||||
|
||||
await transform.testExecution.logTestStep('returns to the management page');
|
||||
|
|
|
@ -430,6 +430,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
await transform.testExecution.logTestStep('starts the transform and finishes processing');
|
||||
await transform.wizard.startTransform();
|
||||
await transform.wizard.assertErrorToastsNotExist();
|
||||
await transform.wizard.waitForProgressBarComplete();
|
||||
|
||||
await transform.testExecution.logTestStep('redirects to Discover page');
|
||||
|
|
|
@ -261,6 +261,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
|
||||
await transform.testExecution.logTestStep('starts the transform and finishes processing');
|
||||
await transform.wizard.startTransform();
|
||||
await transform.wizard.assertErrorToastsNotExist();
|
||||
await transform.wizard.waitForProgressBarComplete();
|
||||
|
||||
await transform.testExecution.logTestStep('returns to the management page');
|
||||
|
|
|
@ -27,6 +27,8 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
|
|||
const retry = getService('retry');
|
||||
const find = getService('find');
|
||||
const ml = getService('ml');
|
||||
const toasts = getService('toasts');
|
||||
|
||||
const PageObjects = getPageObjects(['discover', 'timePicker']);
|
||||
|
||||
return {
|
||||
|
@ -1068,5 +1070,15 @@ export function TransformWizardProvider({ getService, getPageObjects }: FtrProvi
|
|||
await browser.pressKeys(browser.keys.ESCAPE);
|
||||
});
|
||||
},
|
||||
|
||||
async assertErrorToastsNotExist() {
|
||||
const toastCount = await toasts.getToastCount();
|
||||
// Toast element index starts at 1, not 0
|
||||
for (let toastIdx = 1; toastIdx < toastCount + 1; toastIdx++) {
|
||||
const toast = await toasts.getToastElement(toastIdx);
|
||||
const isErrorToast = await toast.elementHasClass('euiToast--danger');
|
||||
expect(isErrorToast).to.eql(false, `Expected toast message to be successful, got error.`);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue