From 2177c76ebe464bfa1d2f5d5d1d8367c620a96957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yulia=20=C4=8Cech?= <6585477+yuliacech@users.noreply.github.com> Date: Thu, 6 Oct 2022 20:06:00 +0200 Subject: [PATCH] [Guided onboarding] Security config update (#142886) * [Guided onboarding] Merged alerts and cases steps in the security guide, added isGuidePanelOpen$ to the interface * [Guided onboarding] Fixed the mock file for the ApiService --- src/plugins/guided_onboarding/common/types.ts | 2 +- .../public/constants/guides_config/security.ts | 13 ++----------- src/plugins/guided_onboarding/public/mocks.tsx | 1 + src/plugins/guided_onboarding/public/types.ts | 1 + 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/plugins/guided_onboarding/common/types.ts b/src/plugins/guided_onboarding/common/types.ts index 412154ede98b0..92cc3af1ff1dd 100644 --- a/src/plugins/guided_onboarding/common/types.ts +++ b/src/plugins/guided_onboarding/common/types.ts @@ -9,7 +9,7 @@ export type GuideId = 'observability' | 'security' | 'search'; export type ObservabilityStepIds = 'add_data' | 'view_dashboard' | 'tour_observability'; -export type SecurityStepIds = 'add_data' | 'rules' | 'alerts' | 'cases'; +export type SecurityStepIds = 'add_data' | 'rules' | 'alertsCases'; export type SearchStepIds = 'add_data' | 'browse_docs' | 'search_experience'; export type GuideStepIds = ObservabilityStepIds | SecurityStepIds | SearchStepIds; diff --git a/src/plugins/guided_onboarding/public/constants/guides_config/security.ts b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts index 769d95f978edc..8eafa3b51c408 100644 --- a/src/plugins/guided_onboarding/public/constants/guides_config/security.ts +++ b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts @@ -37,17 +37,8 @@ export const securityConfig: GuideConfig = { ], }, { - id: 'alerts', - title: 'View Alerts', - descriptionList: [ - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', - 'Nullam ligula enim, malesuada a finibus vel, cursus sed risus.', - 'Vivamus pretium, elit dictum lacinia aliquet, libero nibh dictum enim, a rhoncus leo magna in sapien.', - ], - }, - { - id: 'cases', - title: 'Cases and investigations', + id: 'alertsCases', + title: 'Alerts and cases', descriptionList: [ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'Nullam ligula enim, malesuada a finibus vel, cursus sed risus.', diff --git a/src/plugins/guided_onboarding/public/mocks.tsx b/src/plugins/guided_onboarding/public/mocks.tsx index dff111fba67c8..dcac2cfc1c0fb 100644 --- a/src/plugins/guided_onboarding/public/mocks.tsx +++ b/src/plugins/guided_onboarding/public/mocks.tsx @@ -22,6 +22,7 @@ const apiServiceMock: jest.Mocked = { completeGuideStep: jest.fn(), isGuidedOnboardingActiveForIntegration$: () => new BehaviorSubject(false), completeGuidedOnboardingForIntegration: jest.fn(), + isGuidePanelOpen$: new BehaviorSubject(false), }, }; diff --git a/src/plugins/guided_onboarding/public/types.ts b/src/plugins/guided_onboarding/public/types.ts index dbc300bf0d43d..ba7271756cbb7 100755 --- a/src/plugins/guided_onboarding/public/types.ts +++ b/src/plugins/guided_onboarding/public/types.ts @@ -52,6 +52,7 @@ export interface GuidedOnboardingApi { completeGuidedOnboardingForIntegration: ( integration?: string ) => Promise<{ state: GuideState } | undefined>; + isGuidePanelOpen$: Observable; } export interface StepConfig {