From 22c96115dfe678093064920a495c4baa381d14b0 Mon Sep 17 00:00:00 2001 From: Raquel Smith Date: Fri, 26 Jan 2024 07:43:12 -0800 Subject: [PATCH] add story --- frontend/src/mocks/fixtures/_billing_v2.tsx | 2 +- .../scenes/onboarding/Onboarding.stories.tsx | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/frontend/src/mocks/fixtures/_billing_v2.tsx b/frontend/src/mocks/fixtures/_billing_v2.tsx index 87819d2392569..9ebacca093803 100644 --- a/frontend/src/mocks/fixtures/_billing_v2.tsx +++ b/frontend/src/mocks/fixtures/_billing_v2.tsx @@ -20,7 +20,7 @@ export const billingJson: BillingV2Type = { description: 'Trends, funnels, path analysis, CDP + more.', price_description: null, usage_key: 'events', - image_url: 'https://posthog.com/images/product/product-icons/product-analytics.svg', + image_url: 'https://posthog.com/images/products/product-analytics/product-analytics.png', screenshot_url: null, icon_key: 'IconGraph', docs_url: 'https://posthog.com/docs/product-analytics', diff --git a/frontend/src/scenes/onboarding/Onboarding.stories.tsx b/frontend/src/scenes/onboarding/Onboarding.stories.tsx index 8a15416f73899..e1991c0d4270d 100644 --- a/frontend/src/scenes/onboarding/Onboarding.stories.tsx +++ b/frontend/src/scenes/onboarding/Onboarding.stories.tsx @@ -15,7 +15,6 @@ import { onboardingLogic, OnboardingStepKey } from './onboardingLogic' const meta: Meta = { title: 'Scenes-Other/Onboarding', - tags: ['test-skip'], parameters: { layout: 'fullscreen', viewMode: 'story', @@ -88,3 +87,21 @@ export const _OnboardingOtherProducts = (): JSX.Element => { }, []) return } + +export const _OnboardingProductIntroduction = (): JSX.Element => { + useStorybookMocks({ + get: { + '/api/billing-v2/': { + ...billingJson, + }, + }, + }) + + const { setProduct } = useActions(onboardingLogic) + + useEffect(() => { + setProduct(billingJson.products[0]) + router.actions.push(urls.onboardingProductIntroduction(ProductKey.PRODUCT_ANALYTICS)) + }, []) + return +}