* [ML] Add index visualizer * [ML] Readd support for global state * [ML] Add time buckets & fix dependencies * [ML] Working ver * [ML] Add back and boolean support * [ML] Remove old files inside ml * [ML] Rename files * [ML] Move field type icon * [ML] Create new folder structure * [ML] Organize index_data_visualizer * [ML] Move types into index_data_visualizer folder * [ML] Move more files into file_data_visualizer * [ML] Move more files into index_data_visualizer * [ML] Add new data visualizer model * [ML] Remove getVisualizerFieldStats which is not used by dv * [ML] Delete redundant folder * [ML] Copy old data visualizer routes to new plugin * [ML] Remove old routes * [ML] Disable for ml job cards tests for now * [ML] Remove todos * [ML] Move the toast error to the UI component * [ML] Fix map styling * [ML] Add runtime_mappings for internal/file_upload/time_field_range * [ML] Move routes into folder * [ML] Update permissions * [ML] Update texts * [ML] Update schemas import and api get_field_stats * [ML] Reorg folders into common * [ML] Update types & tests * [ML] Update internal/data_visualizer permissions and action panel tests * [ML] Update imports after #100863 * [ML] Fix CI * [ML] Rename folder from file_data_visualizer to data_visualizer * [ML] Rename i18n ids * [ML] Update fileDataVisualizer -> dataVisualizer dependency name in ml plugin * [ML] Remove ml prefix in data test subjs * [ML] Fix settings and docs * [ML] Update plugin description * [ML] Remove mlContext dependency completely * [ML] Set query to optional * Revert "[ML] Update plugin description" This reverts commit 4ab1a25c * [ML] Update plugins list docs * [ML] Fix types and i18n * [ML] Revert ml data test subj/class name changes * [ML] Split up data visualizer model, remove Logger * [ML] Remove empty file and indexPatternFieldEditor * [ML] Move imports of file_upload * [ML] Update plugin dependencies * Re-add missing data_visualizer.json * Remove capabilities in data_visualizer * Fix test subjs * Update ownership for data_visualizer and file_upload code to be ml * Update estypes after 98266 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
import { FtrProviderContext } from '../../ftr_provider_context';
|
|
|
|
export function MachineLearningJobSourceSelectionProvider({ getService }: FtrProviderContext) {
|
|
const testSubjects = getService('testSubjects');
|
|
const retry = getService('retry');
|
|
|
|
return {
|
|
async assertSourceListContainsEntry(sourceName: string) {
|
|
await testSubjects.existOrFail(`savedObjectTitle${sourceName}`);
|
|
},
|
|
|
|
async filterSourceSelection(sourceName: string) {
|
|
await testSubjects.setValue('savedObjectFinderSearchInput', sourceName, {
|
|
clearWithKeyboard: true,
|
|
});
|
|
await this.assertSourceListContainsEntry(sourceName);
|
|
},
|
|
|
|
async selectSource(sourceName: string, nextPageSubj: string) {
|
|
await this.filterSourceSelection(sourceName);
|
|
await retry.tryForTime(30 * 1000, async () => {
|
|
await testSubjects.clickWhenNotDisabled(`savedObjectTitle${sourceName}`);
|
|
await testSubjects.existOrFail(nextPageSubj, { timeout: 10 * 1000 });
|
|
});
|
|
},
|
|
|
|
async selectSourceForAnomalyDetectionJob(sourceName: string) {
|
|
await this.selectSource(sourceName, 'mlPageJobTypeSelection');
|
|
},
|
|
|
|
async selectSourceForAnalyticsJob(sourceName: string) {
|
|
await this.selectSource(sourceName, 'mlAnalyticsCreationContainer');
|
|
},
|
|
|
|
async selectSourceForIndexBasedDataVisualizer(sourceName: string) {
|
|
await this.selectSource(sourceName, 'dataVisualizerIndexPage');
|
|
},
|
|
};
|
|
}
|