Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[ML] Functional tests - add retry to click the add detector button (e…
Browse files Browse the repository at this point in the history
…lastic#52057) (elastic#52082)

This PR adds a retry to the `openCreateDetectorModal` method in order to increase test stability.
  • Loading branch information
pheyos authored Dec 3, 2019
1 parent e8eb9cb commit f164eae
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ export function MachineLearningJobWizardAdvancedProvider({
},

async openCreateDetectorModal() {
await testSubjects.click('mlAddDetectorButton');
await this.assertCreateDetectorModalExists();
await retry.tryForTime(20 * 1000, async () => {
await testSubjects.click('mlAddDetectorButton');
await this.assertCreateDetectorModalExists();
});
},

async assertCreateDetectorModalExists() {
Expand Down

0 comments on commit f164eae

Please sign in to comment.