Skip to content

Commit

Permalink
[8.15] [UII] Fix `unifiedSearch` mock in `SearchBar&#x…
Browse files Browse the repository at this point in the history
…60; jest test (#192211) (#192239)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[UII] Fix `unifiedSearch` mock in `SearchBar`
jest test (#192211)](#192211)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-06T06:42:47Z","message":"[UII]
Fix `unifiedSearch` mock in `SearchBar` jest test (#192211)\n\n##
Summary\r\n\r\nResolves #181510. Fixes missing method in the mocked
`unifiedSearch`\r\ndependency that was causing flaky test
failures.","sha":"24e1b67027c545176fed8d8b5f8b726d45245181","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v8.16.0"],"title":"[UII]
Fix `unifiedSearch` mock in `SearchBar` jest
test","number":192211,"url":"https://github.com/elastic/kibana/pull/192211","mergeCommit":{"message":"[UII]
Fix `unifiedSearch` mock in `SearchBar` jest test (#192211)\n\n##
Summary\r\n\r\nResolves #181510. Fixes missing method in the mocked
`unifiedSearch`\r\ndependency that was causing flaky test
failures.","sha":"24e1b67027c545176fed8d8b5f8b726d45245181"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192211","number":192211,"mergeCommit":{"message":"[UII]
Fix `unifiedSearch` mock in `SearchBar` jest test (#192211)\n\n##
Summary\r\n\r\nResolves #181510. Fixes missing method in the mocked
`unifiedSearch`\r\ndependency that was causing flaky test
failures.","sha":"24e1b67027c545176fed8d8b5f8b726d45245181"}}]}]
BACKPORT-->

Co-authored-by: Jen Huang <[email protected]>
  • Loading branch information
kibanamachine and jen-huang authored Sep 6, 2024
1 parent 4dfe5cb commit 78f8baf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jest.mock('../hooks', () => {
},
},
]),
hasQuerySuggestions: jest.fn().mockReturnValue(true),
},
ui: {
IndexPatternSelect: jest.fn(),
Expand Down

0 comments on commit 78f8baf

Please sign in to comment.