Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export default function({ getService }: FtrProviderContext) {
});

it('job creation loads the job type selection page', async () => {
await ml.jobSourceSelection.selectSource(testData.jobSource);
await ml.jobSourceSelection.selectSourceForAnomalyDetectionJob(testData.jobSource);
});

it('job creation loads the advanced job wizard page', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function({ getService }: FtrProviderContext) {
});

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

it('job creation loads the multi metric job wizard page', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function({ getService }: FtrProviderContext) {
});

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

it('job creation loads the population job wizard page', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export default function({ getService }: FtrProviderContext) {
});

it('job creation loads the job type selection page', async () => {
await ml.jobSourceSelection.selectSource(testData.jobSource);
await ml.jobSourceSelection.selectSourceForAnomalyDetectionJob(testData.jobSource);
});

it('job creation loads the multi metric job wizard page', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default function({ getService }: FtrProviderContext) {
});

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

it('job creation loads the single metric job wizard page', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { FtrProviderContext } from '../../ftr_provider_context';

export function MachineLearningJobSourceSelectionProvider({ getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const retry = getService('retry');

return {
async assertSourceListContainsEntry(sourceName: string) {
Expand All @@ -21,10 +22,16 @@ export function MachineLearningJobSourceSelectionProvider({ getService }: FtrPro
await this.assertSourceListContainsEntry(sourceName);
},

async selectSource(sourceName: string) {
async selectSource(sourceName: string, nextPageSubj: string) {
await this.filterSourceSelection(sourceName);
await testSubjects.clickWhenNotDisabled(`savedObjectTitle${sourceName}`);
await testSubjects.existOrFail('mlPageJobTypeSelection');
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');
},
};
}