Skip to content
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

[SecuritySolution] Dashboard listing UI #160540

Merged
merged 41 commits into from
Jul 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
716fd81
replace dashboard listing
angorayc Jun 26, 2023
071dfb7
styling
angorayc Apr 25, 2023
eb41945
add fixed tag
angorayc May 16, 2023
aac6c3c
disable actions
angorayc May 16, 2023
df89974
default selected tags
angorayc Jun 26, 2023
3fa5710
fix tag types
angorayc Jun 26, 2023
93237cd
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 26, 2023
a08e4ce
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 26, 2023
ce5e867
fix types
angorayc Jun 27, 2023
59a293d
unit tests
angorayc Jun 27, 2023
0413ea0
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 27, 2023
3429a79
consume TableListViewTable from dashboard listing
angorayc Jun 27, 2023
c51202c
revert tagReferences
angorayc Jun 27, 2023
94c0758
fix filter count
angorayc Jun 27, 2023
c86641c
rename
angorayc Jun 27, 2023
7e8ce70
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 28, 2023
8573325
styling
angorayc Jun 28, 2023
884643f
Merge branch 'dashboard-listing' of github.com:angorayc/kibana into d…
angorayc Jun 28, 2023
ffebde7
unit test
angorayc Jun 28, 2023
288e21e
unit tests
angorayc Jun 28, 2023
7b068b2
Merge branch 'main' of github.com:elastic/kibana into dashboard-listing
angorayc Jun 28, 2023
ab434ac
revert changes for fixing active tag count
angorayc Jun 28, 2023
875b3b9
add tests
angorayc Jun 28, 2023
a578b94
types
angorayc Jun 28, 2023
f1ffe31
Merge branch 'main' into dashboard-listing
angorayc Jun 28, 2023
521e978
revert change
angorayc Jun 30, 2023
d11ff02
Merge branch 'main' of github.com:elastic/kibana into dashboard-listing
angorayc Jun 30, 2023
0b5c270
export dashboardListingTable
angorayc Jun 30, 2023
060bca6
Merge branch 'main' of github.com:elastic/kibana into dashboard-listing
angorayc Jun 30, 2023
448ee22
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jun 30, 2023
20d1511
types
angorayc Jun 30, 2023
cbc4b7d
Merge branch 'dashboard-listing' of github.com:angorayc/kibana into d…
angorayc Jun 30, 2023
d6e2435
test
angorayc Jun 30, 2023
34ba502
Implement review sugestions
machadoum Jul 5, 2023
cad6053
Merge branch 'main' into dashboard-listing
angorayc Jul 18, 2023
59bd25a
review
angorayc Jul 18, 2023
2afacc4
review
angorayc Jul 18, 2023
93ee16a
Merge branch 'main' of github.com:elastic/kibana into dashboard-listing
angorayc Jul 24, 2023
df1000c
use savedObjectsTagging client
angorayc Jul 24, 2023
5b028b0
unit test
angorayc Jul 24, 2023
c0ffaea
review
angorayc Jul 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
unit tests
  • Loading branch information
angorayc committed Jun 28, 2023
commit 288e21e442d9ee9991ebe7404a035b8c42ca6872
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { Query } from '@elastic/eui';
import { Ast, Query } from '@elastic/eui';
import { renderHook } from '@testing-library/react-hooks';
import { waitFor } from '@testing-library/react';
import { useTagFilterPanel } from './use_tag_filter_panel';
@@ -64,6 +64,26 @@ describe('useTagFilterPanel', () => {
expect(result.current.totalActiveFilters).toBe(0);
});

it('should initialize filter options with default state', () => {
let ast = Ast.create([]);
ast = ast.addOrFieldValue('tag', 'tag', true, 'eq');
ast = ast.addOrFieldValue('tag', 'tag3', false, 'eq');
const text = `tag:("tag") -tag:(tag3)`;
const initialQuery = new Query(ast, undefined, text);

const { result } = renderHook(() =>
useTagFilterPanel({
query: initialQuery,
tagsToTableItemMap,
getTagList,
addOrRemoveIncludeTagFilter,
addOrRemoveExcludeTagFilter,
})
);

expect(result.current.totalActiveFilters).toBe(3);
});

it('should render options with query', async () => {
const { result } = renderHook(
(props) =>