Skip to content

Commit

Permalink
[ML] DF Analytics functional tests: re-enable regression, classificat…
Browse files Browse the repository at this point in the history
…ion, and outlier creation (elastic#71006)

* update mml test. re-enable reg, class, and outlier creation tests

* remove unnecessary second argument
  • Loading branch information
alvarezmelissa87 committed Jul 8, 2020
1 parent eff820b commit 2d2de40
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');
// flaky test https://github.com/elastic/kibana/issues/70455
describe.skip('classification creation', function () {

describe('classification creation', function () {
before(async () => {
await esArchiver.loadIfNeeded('ml/bm_classification');
await ml.testResources.createIndexPatternIfNeeded('ft_bank_marketing', '@timestamp');
Expand Down Expand Up @@ -96,9 +96,9 @@ export default function ({ getService }: FtrProviderContext) {
await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep();
});

it('inputs the model memory limit', async () => {
it('accepts the suggested model memory limit', async () => {
await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists();
await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory);
await ml.dataFrameAnalyticsCreation.assertModelMemoryInputPopulated();
});

it('continues to the details step', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');

// Flaky: https://github.com/elastic/kibana/issues/70906
describe.skip('outlier detection creation', function () {
describe('outlier detection creation', function () {
before(async () => {
await esArchiver.loadIfNeeded('ml/ihp_outlier');
await ml.testResources.createIndexPatternIfNeeded('ft_ihp_outlier', '@timestamp');
Expand Down Expand Up @@ -93,9 +92,9 @@ export default function ({ getService }: FtrProviderContext) {
await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep();
});

it('inputs the model memory limit', async () => {
it('accepts the suggested model memory limit', async () => {
await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists();
await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory);
await ml.dataFrameAnalyticsCreation.assertModelMemoryInputPopulated();
});

it('continues to the details step', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');
// flaky test https://github.com/elastic/kibana/issues/70455
describe.skip('regression creation', function () {

describe('regression creation', function () {
before(async () => {
await esArchiver.loadIfNeeded('ml/egs_regression');
await ml.testResources.createIndexPatternIfNeeded('ft_egs_regression', '@timestamp');
Expand Down Expand Up @@ -96,9 +96,9 @@ export default function ({ getService }: FtrProviderContext) {
await ml.dataFrameAnalyticsCreation.continueToAdditionalOptionsStep();
});

it('inputs the model memory limit', async () => {
it('accepts the suggested model memory limit', async () => {
await ml.dataFrameAnalyticsCreation.assertModelMemoryInputExists();
await ml.dataFrameAnalyticsCreation.setModelMemory(testData.modelMemory);
await ml.dataFrameAnalyticsCreation.assertModelMemoryInputPopulated();
});

it('continues to the details step', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,15 @@ export function MachineLearningDataFrameAnalyticsCreationProvider(
);
},

async assertModelMemoryInputPopulated() {
const actualModelMemory = await testSubjects.getAttribute(
'mlAnalyticsCreateJobWizardModelMemoryInput',
'value'
);

expect(actualModelMemory).not.to.be('');
},

async assertPredictionFieldNameValue(expectedValue: string) {
const actualPredictedFieldName = await testSubjects.getAttribute(
'mlAnalyticsCreateJobWizardPredictionFieldNameInput',
Expand Down

0 comments on commit 2d2de40

Please sign in to comment.