Skip to content

Commit

Permalink
[Cloud Security] Fix Detection Rule flaky FTR (#189768)
Browse files Browse the repository at this point in the history
## Summary

It closes #172312

This PR fixed the flaky FTR test by adding a retry method to the title
checking.
  • Loading branch information
opauloh authored Aug 2, 2024
1 parent 964fb66 commit d4dc118
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
await testSubjects.click('csp:toast-success-link');
await pageObjects.header.waitUntilLoadingHasFinished();
const rulePageTitle = await testSubjects.find('header-page-title');
expect(await rulePageTitle.getVisibleText()).to.be(ruleName1);
// Rule page title is not immediately available, so we need to retry until it is
await retry.try(async () => {
expect(await rulePageTitle.getVisibleText()).to.be(ruleName1);
});
});
});
describe('Rule details', () => {
Expand Down

0 comments on commit d4dc118

Please sign in to comment.