Skip to content

Commit

Permalink
add story
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelmsmith committed Jan 26, 2024
1 parent 5d93e84 commit 22c9611
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/mocks/fixtures/_billing_v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
19 changes: 18 additions & 1 deletion frontend/src/scenes/onboarding/Onboarding.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { onboardingLogic, OnboardingStepKey } from './onboardingLogic'

const meta: Meta = {
title: 'Scenes-Other/Onboarding',
tags: ['test-skip'],
parameters: {
layout: 'fullscreen',
viewMode: 'story',
Expand Down Expand Up @@ -88,3 +87,21 @@ export const _OnboardingOtherProducts = (): JSX.Element => {
}, [])
return <App />
}

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 <App />
}

0 comments on commit 22c9611

Please sign in to comment.