mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
This PR adds a retry to the ML source selection service method for functional tests.
This commit is contained in:
parent
39d211be0f
commit
4c4382898f
6 changed files with 15 additions and 8 deletions
|
@ -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 () => {
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -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) {
|
||||
|
@ -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');
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue