import * as React from 'react'; import { IntlProvider } from 'react-intl'; import noop from 'lodash/noop'; import ContentInsightsSummary from '../../ContentInsightsSummary'; import { GraphData } from '../../types'; const mockGraphData: GraphData = [ { start: 1, end: 2, previewsCount: 150, downloadsCount: 50, users: new Set(['user1']), type: 'day' }, { start: 2, end: 3, previewsCount: 200, downloadsCount: 60, users: new Set(['user1', 'user2']), type: 'day' }, { start: 3, end: 4, previewsCount: 180, downloadsCount: 45, users: new Set(['user2']), type: 'day' }, { start: 4, end: 5, previewsCount: 220, downloadsCount: 70, users: new Set(['user1', 'user3']), type: 'day' }, { start: 5, end: 6, previewsCount: 190, downloadsCount: 55, users: new Set(['user2', 'user3']), type: 'day' }, { start: 6, end: 7, previewsCount: 250, downloadsCount: 80, users: new Set(['user1', 'user2']), type: 'day' }, { start: 7, end: 8, previewsCount: 210, downloadsCount: 65, users: new Set(['user3']), type: 'day' }, ]; const defaultProps: React.ComponentProps = { graphData: mockGraphData, error: undefined, isLoading: false, onClick: noop, previousPeriodCount: 800, totalCount: 1217, }; const Wrapper = ({ children }: { children: React.ReactNode }) => (
{children}
); export const Default = { render: () => ( ), }; export const WithRedesignEnabled = { render: () => ( ), }; export const Loading = { render: () => ( ), }; export const LoadingWithRedesign = { render: () => ( ), }; export const WithError = { render: () => ( ), }; export const WithPositiveTrend = { render: () => ( ), }; export const WithPositiveTrendRedesign = { render: () => ( ), }; export const WithNegativeTrend = { render: () => ( ), }; export const WithNegativeTrendRedesign = { render: () => ( ), }; export default { title: 'Features/ContentInsights/tests/visual-regression-tests', component: ContentInsightsSummary as React.ComponentType, };