Skip to content

Commit

Permalink
[ML] Functional tests - stabilize advanced wizard tests (#61579)
Browse files Browse the repository at this point in the history
This PR stabilizes the anomaly detection wizard tests by adding a retry to the wizard navigation.
  • Loading branch information
pheyos authored Mar 27, 2020
1 parent ab39ceb commit 91c437d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,7 @@ export default function({ getService }: FtrProviderContext) {
},
];

// FLAKY: https://github.com/elastic/kibana/issues/61562
// FLAKY: https://github.com/elastic/kibana/issues/61563
describe.skip('advanced job', function() {
describe('advanced job', function() {
this.tags(['smoke', 'mlqa']);
before(async () => {
await esArchiver.load('ml/ecommerce');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,55 @@ export function MachineLearningJobWizardCommonProvider(
},

async assertTimeRangeSectionExists() {
await testSubjects.existOrFail('mlJobWizardStepTitleTimeRange');
await testSubjects.existOrFail('mlJobWizardStepTitleTimeRange', { timeout: 5000 });
},

async assertPickFieldsSectionExists() {
await testSubjects.existOrFail('mlJobWizardStepTitlePickFields');
await testSubjects.existOrFail('mlJobWizardStepTitlePickFields', { timeout: 5000 });
},

async assertJobDetailsSectionExists() {
await testSubjects.existOrFail('mlJobWizardStepTitleJobDetails');
await testSubjects.existOrFail('mlJobWizardStepTitleJobDetails', { timeout: 5000 });
},

async assertValidationSectionExists() {
await testSubjects.existOrFail('mlJobWizardStepTitleValidation');
await testSubjects.existOrFail('mlJobWizardStepTitleValidation', { timeout: 5000 });
},

async assertSummarySectionExists() {
await testSubjects.existOrFail('mlJobWizardStepTitleSummary');
await testSubjects.existOrFail('mlJobWizardStepTitleSummary', { timeout: 5000 });
},

async assertConfigureDatafeedSectionExists() {
await testSubjects.existOrFail('mlJobWizardStepTitleConfigureDatafeed');
},

async advanceToPickFieldsSection() {
await this.clickNextButton();
await this.assertPickFieldsSectionExists();
await retry.tryForTime(15 * 1000, async () => {
await this.clickNextButton();
await this.assertPickFieldsSectionExists();
});
},

async advanceToJobDetailsSection() {
await this.clickNextButton();
await this.assertJobDetailsSectionExists();
await retry.tryForTime(15 * 1000, async () => {
await this.clickNextButton();
await this.assertJobDetailsSectionExists();
});
},

async advanceToValidationSection() {
await this.clickNextButton();
await this.assertValidationSectionExists();
await retry.tryForTime(15 * 1000, async () => {
await this.clickNextButton();
await this.assertValidationSectionExists();
});
},

async advanceToSummarySection() {
await this.clickNextButton();
await this.assertSummarySectionExists();
await retry.tryForTime(15 * 1000, async () => {
await this.clickNextButton();
await this.assertSummarySectionExists();
});
},

async assertEventRateChartExists() {
Expand Down

0 comments on commit 91c437d

Please sign in to comment.