mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
directly submit query (#97254)
This commit is contained in:
parent
5035230190
commit
4540a943d7
2 changed files with 21 additions and 0 deletions
|
@ -1272,6 +1272,26 @@ describe('Lens App', () => {
|
|||
);
|
||||
});
|
||||
|
||||
it('updates the query if saved query is selected', () => {
|
||||
const { component } = mountWith({});
|
||||
act(() => {
|
||||
component.find(TopNavMenu).prop('onSavedQueryUpdated')!({
|
||||
id: '2',
|
||||
attributes: {
|
||||
title: 'new title',
|
||||
description: '',
|
||||
query: { query: 'abc:def', language: 'lucene' },
|
||||
},
|
||||
});
|
||||
});
|
||||
expect(TopNavMenu).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
query: { query: 'abc:def', language: 'lucene' },
|
||||
}),
|
||||
{}
|
||||
);
|
||||
});
|
||||
|
||||
it('clears all existing unpinned filters when the active saved query is cleared', () => {
|
||||
const { component, frame, services } = mountWith({});
|
||||
act(() =>
|
||||
|
|
|
@ -692,6 +692,7 @@ export function App({
|
|||
setState((s) => ({
|
||||
...s,
|
||||
savedQuery: { ...savedQuery }, // Shallow query for reference issues
|
||||
query: savedQuery.attributes.query,
|
||||
}));
|
||||
}}
|
||||
onClearSavedQuery={() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue