mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[RAM] Unselect items and close dropdown (#146974)
## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
This commit is contained in:
parent
9f7db8f615
commit
87d1e8b6db
3 changed files with 11 additions and 1 deletions
|
@ -1047,6 +1047,7 @@ export const RulesList = ({
|
|||
setIsEnablingRules(false);
|
||||
showToast({ action: 'ENABLE', errors, total });
|
||||
await refreshRules();
|
||||
onClearSelection();
|
||||
}, [http, selectedIds, getFilter, setIsEnablingRules, showToast]);
|
||||
|
||||
const onDisable = useCallback(async () => {
|
||||
|
@ -1061,6 +1062,7 @@ export const RulesList = ({
|
|||
setIsDisablingRules(false);
|
||||
showToast({ action: 'DISABLE', errors, total });
|
||||
await refreshRules();
|
||||
onClearSelection();
|
||||
}, [http, selectedIds, getFilter, setIsDisablingRules, showToast]);
|
||||
|
||||
const onDeleteCancel = () => {
|
||||
|
|
|
@ -154,7 +154,7 @@ describe.skip('Rules list bulk disable', () => {
|
|||
wrapper.find('[data-test-subj="showBulkActionButton"]').first().simulate('click');
|
||||
});
|
||||
|
||||
it('can bulk disable', async () => {
|
||||
it.skip('can bulk disable', async () => {
|
||||
wrapper.find('button[data-test-subj="bulkDisable"]').first().simulate('click');
|
||||
|
||||
await act(async () => {
|
||||
|
@ -175,6 +175,10 @@ describe.skip('Rules list bulk disable', () => {
|
|||
ids: [],
|
||||
})
|
||||
);
|
||||
expect(
|
||||
wrapper.find('[data-test-subj="checkboxSelectRow-1"]').first().prop('checked')
|
||||
).toBeFalsy();
|
||||
expect(wrapper.find('button[data-test-subj="bulkDisable"]').exists()).toBeFalsy();
|
||||
});
|
||||
|
||||
describe('Toast', () => {
|
||||
|
|
|
@ -175,6 +175,10 @@ describe.skip('Rules list bulk enable', () => {
|
|||
ids: [],
|
||||
})
|
||||
);
|
||||
expect(
|
||||
wrapper.find('[data-test-subj="checkboxSelectRow-1"]').first().prop('checked')
|
||||
).toBeFalsy();
|
||||
expect(wrapper.find('button[data-test-subj="bulkEnable"]').exists()).toBeFalsy();
|
||||
});
|
||||
|
||||
describe('Toast', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue