Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.5] [ML] Functional tests - export service types (#52612) #52857

Merged
merged 1 commit into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions x-pack/test/functional/services/machine_learning/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
import { ProvidedType } from '@kbn/test/types/ftr';

import { isEmpty } from 'lodash';
import { FtrProviderContext } from '../../ftr_provider_context';

import { JOB_STATE, DATAFEED_STATE } from '../../../../legacy/plugins/ml/common/constants/states';

export type MlApi = ProvidedType<typeof MachineLearningAPIProvider>;

export function MachineLearningAPIProvider({ getService }: FtrProviderContext) {
const es = getService('legacyEs');
const log = getService('log');
Expand Down
3 changes: 3 additions & 0 deletions x-pack/test/functional/services/machine_learning/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { ProvidedType } from '@kbn/test/types/ftr';

import { FtrProviderContext } from '../../ftr_provider_context';

Expand All @@ -11,6 +12,8 @@ interface SetValueOptions {
typeCharByChar?: boolean;
}

export type MlCommon = ProvidedType<typeof MachineLearningCommonProvider>;

export function MachineLearningCommonProvider({ getService }: FtrProviderContext) {
const log = getService('log');
const retry = getService('retry');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { ProvidedType } from '@kbn/test/types/ftr';

import { FtrProviderContext } from '../../ftr_provider_context';
import { MachineLearningAPIProvider } from './api';
import { MlApi } from './api';

import { JOB_STATE, DATAFEED_STATE } from '../../../../legacy/plugins/ml/common/constants/states';

export function MachineLearningJobManagementProvider(
{ getService }: FtrProviderContext,
mlApi: ProvidedType<typeof MachineLearningAPIProvider>
mlApi: MlApi
) {
const testSubjects = getService('testSubjects');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
import { ProvidedType } from '@kbn/test/types/ftr';

import { FtrProviderContext } from '../../ftr_provider_context';
import { MachineLearningCommonProvider } from './common';
import { MlCommon } from './common';

export function MachineLearningJobWizardAdvancedProvider(
{ getService }: FtrProviderContext,
mlCommon: ProvidedType<typeof MachineLearningCommonProvider>
mlCommon: MlCommon
) {
const comboBox = getService('comboBox');
const testSubjects = getService('testSubjects');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
* you may not use this file except in compliance with the Elastic License.
*/
import expect from '@kbn/expect';
import { ProvidedType } from '@kbn/test/types/ftr';

import { FtrProviderContext } from '../../ftr_provider_context';
import { MachineLearningCommonProvider } from './common';
import { MlCommon } from './common';

export function MachineLearningJobWizardCommonProvider(
{ getService }: FtrProviderContext,
mlCommon: ProvidedType<typeof MachineLearningCommonProvider>
mlCommon: MlCommon
) {
const comboBox = getService('comboBox');
const retry = getService('retry');
Expand Down