Skip to content

Commit 25dcb4f

Browse files
authored
[Discover] Address flaky doc navigation test (elastic#266654)
- Resolves elastic#265790 ## Summary Adding retries as we wait. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent de7bc10 commit 25dcb4f

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/platform/test/functional/apps/context/_discover_navigation.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
122122
await rowActions[0].click();
123123
});
124124

125-
const hasDocHit = await testSubjects.exists('doc-hit');
126-
expect(hasDocHit).to.be(true);
125+
await retry.try(async () => {
126+
const hasDocHit = await testSubjects.exists('doc-hit');
127+
expect(hasDocHit).to.be(true);
128+
});
127129

128130
await testSubjects.click('~breadcrumb & ~first');
129131
await discover.waitForDiscoverAppOnScreen();

x-pack/platform/test/serverless/functional/test_suites/context/_discover_navigation.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
128128
await rowActions[0].click();
129129
});
130130

131-
const hasDocHit = await testSubjects.exists('doc-hit');
132-
expect(hasDocHit).to.be(true);
131+
await retry.try(async () => {
132+
const hasDocHit = await testSubjects.exists('doc-hit');
133+
expect(hasDocHit).to.be(true);
134+
});
133135

134136
// TODO: Clicking breadcrumbs works differently in Serverless
135137
await PageObjects.svlCommonNavigation.breadcrumbs.clickBreadcrumb({

0 commit comments

Comments
 (0)