-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security solution] Mocks and Unit tests for Alert Page controls + Ha…
…ndles #155414 and #155481 (#155508) ## Summary This PR - Adds unit tests and mocks for the Alert Page Controls. - Adds feature - [Security Solution] New Alert Page Controls should have a blank placeholder + only string controls #155414 1. For newly added controls placeholder should be blank instead of `Any` 2. Do not allow number fields to be added as controls. | Before | After | |--|--| | <video src="https://user-images.githubusercontent.com/7485038/233952385-79fdae88-d3a1-4bf2-abd7-a6a0fa8fb12d.mov" /> | <video src="https://user-images.githubusercontent.com/7485038/233955823-5b8d11f5-c3f0-409b-82ba-d50c645ca16e.mov" /> | - Handles [Security Solution] Alerts filters are automatically changed #155481 and adds unit tests for the same. | Before | After | |--|--| | <video src="https://user-images.githubusercontent.com/7485038/233944949-7c4dac7e-4b31-46a3-9737-296729437ca0.mov"/> | <video src="https://user-images.githubusercontent.com/7485038/233944528-d1ddcb1a-a61d-4a96-9a19-aaa2646765e7.mov"/> |
- Loading branch information
Showing
15 changed files
with
1,225 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
x-pack/plugins/security_solution/public/common/components/filter_group/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const TEST_IDS = { | ||
FILTER_CONTROLS: 'filter-group__items', | ||
FILTER_LOADING: 'filter-group__loading', | ||
MOCKED_CONTROL: 'mocked_control_group', | ||
ADD_CONTROL: 'filter-group__add-control', | ||
SAVE_CONTROL: 'filter-group__save', | ||
SAVE_CHANGE_POPOVER: 'filter-group__save-popover', | ||
FILTERS_CHANGED_BANNER: 'filter-group--changed-banner', | ||
FILTERS_CHANGED_BANNER_SAVE: 'filter-group__save', | ||
FILTERS_CHANGED_BANNER_DISCARD: 'filter-group__discard', | ||
CONTEXT_MENU: { | ||
BTN: 'filter-group__context', | ||
MENU: 'filter-group__context-menu', | ||
RESET: 'filter-group__context--reset', | ||
EDIT: 'filter-group__context--edit', | ||
DISCARD: `filter-group__context--discard`, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.