Skip to content
/ kibana Public
forked from elastic/kibana

Commit

Permalink
[ML] Add tests to create saved search based jobs (elastic#47323)
Browse files Browse the repository at this point in the history
This PR adds tests for ML job creation based on saved searches
  • Loading branch information
pheyos authored Oct 7, 2019
1 parent 9413939 commit f5c6853
Show file tree
Hide file tree
Showing 8 changed files with 508 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { FtrProviderContext } from '../../../ftr_provider_context';

export default function({ loadTestFile }: FtrProviderContext) {
describe('anomaly detection', function() {
loadTestFile(require.resolve('./single_metric_job'));
loadTestFile(require.resolve('./multi_metric_job'));
loadTestFile(require.resolve('./population_job'));
loadTestFile(require.resolve('./saved_search_job'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import expect from '@kbn/expect';

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

// eslint-disable-next-line import/no-default-export
export default function({ getService }: FtrProviderContext) {
Expand Down Expand Up @@ -94,7 +94,7 @@ export default function({ getService }: FtrProviderContext) {
});

it('loads the job type selection page', async () => {
await ml.jobSourceSelection.selectSourceIndexPattern('farequote');
await ml.jobSourceSelection.selectSource('farequote');
});

it('loads the multi metric job wizard page', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import expect from '@kbn/expect';

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

// eslint-disable-next-line import/no-default-export
export default function({ getService }: FtrProviderContext) {
Expand Down Expand Up @@ -108,7 +108,7 @@ export default function({ getService }: FtrProviderContext) {
});

it('loads the job type selection page', async () => {
await ml.jobSourceSelection.selectSourceIndexPattern('ecommerce');
await ml.jobSourceSelection.selectSource('ecommerce');
});

it('loads the population job wizard page', async () => {
Expand Down
Loading

0 comments on commit f5c6853

Please sign in to comment.