Skip to content

Commit 5d76a03

Browse files
[9.1] [Discover] Fix flaky test - query should support querying on nested fields (#231692) (#231736)
# Backport This will backport the following commits from `main` to `9.1`: - [[Discover] Fix flaky test - query should support querying on nested fields (#231692)](#231692) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Ania Kowalska","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-08-14T06:13:22Z","message":"[Discover] Fix flaky test - query should support querying on nested fields (#231692)","sha":"b2b2f27dd8aafaeea94f2f63e516650b67e387d4","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:version","v9.2.0","v9.1.3","v8.19.3","v9.0.6","v8.18.6"],"title":"[Discover] Fix flaky test - query should support querying on nested fields","number":231692,"url":"https://github.com/elastic/kibana/pull/231692","mergeCommit":{"message":"[Discover] Fix flaky test - query should support querying on nested fields (#231692)","sha":"b2b2f27dd8aafaeea94f2f63e516650b67e387d4"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","9.0","8.18"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231692","number":231692,"mergeCommit":{"message":"[Discover] Fix flaky test - query should support querying on nested fields (#231692)","sha":"b2b2f27dd8aafaeea94f2f63e516650b67e387d4"}},{"branch":"9.1","label":"v9.1.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ania Kowalska <[email protected]>
1 parent 3c50c00 commit 5d76a03

File tree

2 files changed

+8
-0
lines changed
  • src/platform/test/functional/apps/discover/group1
  • x-pack/platform/test/serverless/functional/test_suites/discover/group1

2 files changed

+8
-0
lines changed

src/platform/test/functional/apps/discover/group1/_discover.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
193193
it('should support querying on nested fields', async function () {
194194
await queryBar.setQuery('nestedField:{ child: nestedValue }');
195195
await queryBar.submitQuery();
196+
197+
await header.waitUntilLoadingHasFinished();
198+
await discover.waitUntilSearchingHasFinished();
199+
196200
await retry.try(async function () {
197201
expect(await discover.getHitCount()).to.be('1');
198202
});

x-pack/platform/test/serverless/functional/test_suites/discover/group1/_discover.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
197197
it('should support querying on nested fields', async function () {
198198
await queryBar.setQuery('nestedField:{ child: nestedValue }');
199199
await queryBar.submitQuery();
200+
201+
await PageObjects.header.waitUntilLoadingHasFinished();
202+
await PageObjects.discover.waitUntilSearchingHasFinished();
203+
200204
await retry.try(async function () {
201205
expect(await PageObjects.discover.getHitCount()).to.be('1');
202206
});

0 commit comments

Comments
 (0)