-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UnifiedSearch] Expose QueryStringInput via plugin contract #173810
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
/ci |
/ci |
Pinging @elastic/fleet (Team:Fleet) |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obs UX LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fleet changes LGTM!
ML changes LGTM (tested and reviewed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kibana-gis changes LGTM
code review only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice devex enhancement. Question on some test removals.
it('should render search bar and submit queries', async () => { | ||
await mountSearchBar(); | ||
|
||
await waitForIndexPatternFetch(); | ||
|
||
act(() => { | ||
instance.find(QueryStringInput).prop('onChange')!({ language: 'lucene', query: 'testQuery' }); | ||
}); | ||
|
||
act(() => { | ||
instance.find('form').simulate('submit', { preventDefault: () => {} }); | ||
}); | ||
|
||
expect(dispatchSpy).toHaveBeenCalledWith({ | ||
type: 'x-pack/graph/workspace/SUBMIT_SEARCH', | ||
payload: 'testQuery', | ||
}); | ||
}); | ||
|
||
it('should translate kql query into JSON dsl', async () => { | ||
await mountSearchBar(); | ||
|
||
await waitForIndexPatternFetch(); | ||
|
||
act(() => { | ||
instance.find(QueryStringInput).prop('onChange')!({ language: 'kuery', query: 'test: abc' }); | ||
}); | ||
|
||
act(() => { | ||
instance.find('form').simulate('submit', { preventDefault: () => {} }); | ||
}); | ||
|
||
const parsedQuery = JSON.parse(dispatchSpy.mock.calls[0][0].payload); | ||
expect(parsedQuery).toEqual({ | ||
bool: { should: [{ match: { test: 'abc' } }], minimum_should_match: 1 }, | ||
}); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have these tests been removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drewdaemon i have restored these tests
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…173810) ## Summary Expose QueryStringInput via plugin contract this will make sure deps are handled by the component itself. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Expose QueryStringInput via plugin contract this will make sure deps are handled by the component itself.