+
+ {isVideoPlaying && (
+
+
+
+
+
+ )}
+ {!isVideoPlaying && (
+
+ )}
+
+
+ );
+};
+
+export const DataIngestionHubVideo = React.memo(DataIngestionHubVideoComponent);
diff --git a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/step_content.test.tsx b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/step_content.test.tsx
index 2d67c587dce51..5d3aae3f3d7dd 100644
--- a/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/step_content.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/landing_page/onboarding/card_step/step_content.test.tsx
@@ -4,41 +4,52 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
+
import React from 'react';
-import { render } from '@testing-library/react';
import { StepContent } from './step_content';
-import { QuickStartSectionCardsId, SectionId } from '../types';
-import { overviewVideoSteps } from '../sections';
+import { AddAndValidateYourDataCardsId, SectionId } from '../types';
+import { viewDashboardSteps } from '../sections';
+import { mountWithIntl } from '@kbn/test-jest-helpers';
jest.mock('../context/step_context');
-jest.mock('../../../../lib/kibana');
+jest.mock('@kbn/security-solution-navigation/src/context');
+jest.mock('../../../../lib/kibana', () => ({
+ useKibana: () => ({
+ services: {
+ notifications: {
+ toasts: {
+ addError: jest.fn(),
+ },
+ },
+ },
+ }),
+}));
describe('StepContent', () => {
const toggleTaskCompleteStatus = jest.fn();
const props = {
- cardId: QuickStartSectionCardsId.watchTheOverviewVideo,
+ cardId: AddAndValidateYourDataCardsId.viewDashboards,
indicesExist: false,
- sectionId: SectionId.quickStart,
- step: overviewVideoSteps[0],
+ sectionId: SectionId.addAndValidateYourData,
+ step: viewDashboardSteps[0],
toggleTaskCompleteStatus,
};
it('renders step content when hasStepContent is true and isExpandedStep is true', () => {
const mockProps = { ...props, hasStepContent: true, isExpandedStep: true };
- const { getByTestId, getByText } = render(