diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts index 3048dcedef26f..df61e23fa3cdc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.test.ts @@ -210,11 +210,13 @@ describe('GroupLogic', () => { describe('deleteGroup', () => { beforeEach(() => { GroupLogic.actions.onInitializeGroup(group); + GroupLogic.actions.showConfirmDeleteModal(); }); it('deletes a group', async () => { http.delete.mockReturnValue(Promise.resolve(true)); GroupLogic.actions.deleteGroup(); + expect(GroupLogic.values.confirmDeleteModalVisible).toEqual(false); expect(http.delete).toHaveBeenCalledWith('/internal/workplace_search/groups/123'); await nextTick(); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts index 6e465854ff44f..6b6fa0f21aba2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/groups/group_logic.ts @@ -122,6 +122,7 @@ export const GroupLogic = kea>({ { showConfirmDeleteModal: () => true, hideConfirmDeleteModal: () => false, + deleteGroup: () => false, }, ], groupNameInputValue: [