Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(storybook): type story parameters and drop settings that never applied (#123767)

Rafael Audibert166acb23c25f
diff --git a/common/storybook/.storybook/decorators/withFeatureFlags.tsx b/common/storybook/.storybook/decorators/withFeatureFlags.tsx
index 3fdac383b06c..03e9aa60d5b5 100644
--- a/common/storybook/.storybook/decorators/withFeatureFlags.tsx
+++ b/common/storybook/.storybook/decorators/withFeatureFlags.tsx
@@ -2,12 +2,6 @@ import type { Decorator } from '@storybook/react'
import { setFeatureFlags } from '~/mocks/browser'
-declare module 'storybook/internal/types' {
- interface Parameters {
- featureFlags?: string[] | Record<string, string | boolean>
- }
-}
-
/** Global story decorator that allows setting feature flags.
*
* Boolean flags (just "on") — pass an array:
diff --git a/common/storybook/.storybook/decorators/withMockDate.tsx b/common/storybook/.storybook/decorators/withMockDate.tsx
index 0315e6882f01..0582d225a5f9 100644
--- a/common/storybook/.storybook/decorators/withMockDate.tsx
+++ b/common/storybook/.storybook/decorators/withMockDate.tsx
@@ -1,12 +1,6 @@
import type { Decorator } from '@storybook/react'
import MockDate from 'mockdate'
-declare module 'storybook/internal/types' {
- interface Parameters {
- mockDate?: string | number | Date
- }
-}
-
/** Global story decorator that allows mocking of dates.
*
* ```ts
diff --git a/common/storybook/.storybook/decorators/withPageUrl.tsx b/common/storybook/.storybook/decorators/withPageUrl.tsx
index 2efdf6d9d594..df1f1a1112b5 100644
--- a/common/storybook/.storybook/decorators/withPageUrl.tsx
+++ b/common/storybook/.storybook/decorators/withPageUrl.tsx
@@ -2,12 +2,6 @@ import type { Decorator } from '@storybook/react'
import { router } from 'kea-router'
import { useEffect } from 'react'
-declare module 'storybook/internal/types' {
- interface Parameters {
- pageUrl?: string
- }
-}
-
/** Global story decorator that allows setting the page URL.
*
* ```ts
diff --git a/common/storybook/.storybook/preview.tsx b/common/storybook/.storybook/preview.tsx
index 6caead130769..201ec0b23efc 100644
--- a/common/storybook/.storybook/preview.tsx
+++ b/common/storybook/.storybook/preview.tsx
@@ -1,14 +1,13 @@
import '~/styles'
import { Controls, Description, Primary, Stories, Subtitle, Title } from '@storybook/addon-docs/blocks'
-import type { Meta, Parameters, Preview } from '@storybook/react'
+import type { Preview } from '@storybook/react'
import { configure as configureTestingLibrary } from '@testing-library/dom'
import { apiHostOrigin } from 'lib/utils/apiHost'
import { loadPostHogJS } from '~/loadPostHogJS'
import { worker } from '~/mocks/browser'
-import { defaultMocks } from '~/mocks/handlers'
import { getStorybookAppContext } from './app-context'
import { withChartCanvasSnapshot } from './decorators/withChartCanvasSnapshot'
@@ -57,7 +56,7 @@ setupPosthogJs()
// Canvas charts measure text at paint time and never repaint when fonts finish loading, so hold
// every story's render until the app fonts (the set the visual-regression runner preloads) are in.
-export const loaders: Preview['loaders'] = [
+const loaders: Preview['loaders'] = [
async () => {
await Promise.all(
['400', '500', '700', '800'].flatMap((weight) => [
@@ -71,43 +70,8 @@ export const loaders: Preview['loaders'] = [
},
]
-/** Storybook global parameters. See https://storybook.js.org/docs/react/writing-stories/parameters#global-parameters */
-export const parameters: Parameters = {
- actions: { argTypesRegex: '^on[A-Z].*', disabled: true },
- controls: {
- matchers: {
- color: /(background|color)$/i,
- date: /Date$/,
- },
- },
- options: {
- // automatically show code panel
- showPanel: false,
- storySort: {
- method: 'alphabetical',
- order: [
- 'Lemon UI',
- ['Overview', 'Utilities', 'Icons'],
- 'Components',
- 'Forms',
- ['Field'],
- 'Filters',
- 'Layout',
- ],
- },
- },
- viewMode: 'docs',
- // auto-expand code blocks in docs
- docs: {
- source: { state: 'closed' },
- },
- msw: {
- mocks: defaultMocks,
- },
-}
-
// Setup storybook global decorators. See https://storybook.js.org/docs/react/writing-stories/decorators#global-decorators
-export const decorators: Meta['decorators'] = [
+const decorators: Preview['decorators'] = [
// Make sure the msw service worker is started, and reset the handlers to defaults.
withKea,
// Allow us to time travel to ensure our stories don't change over time.
@@ -124,6 +88,8 @@ export const decorators: Meta['decorators'] = [
]
const preview: Preview = {
+ loaders,
+ decorators,
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
// We don't want axe-core tests in visual review
@@ -134,7 +100,23 @@ const preview: Preview = {
date: /Date$/,
},
},
+ options: {
+ showPanel: false,
+ storySort: {
+ method: 'alphabetical',
+ order: [
+ 'Lemon UI',
+ ['Overview', 'Utilities', 'Icons'],
+ 'Components',
+ 'Forms',
+ ['Field'],
+ 'Filters',
+ 'Layout',
+ ],
+ },
+ },
docs: {
+ source: { state: 'closed' },
page: () => (
<>
<Title />
diff --git a/common/storybook/.storybook/test-runner.ts b/common/storybook/.storybook/test-runner.ts
index a3c484f87763..95171145c88c 100644
--- a/common/storybook/.storybook/test-runner.ts
+++ b/common/storybook/.storybook/test-runner.ts
@@ -5,7 +5,7 @@ import { toMatchImageSnapshot } from 'jest-image-snapshot'
import { fileURLToPath } from 'node:url'
import path from 'path'
-import type { Mocks } from '~/mocks/utils'
+import type { SnapshotTheme, SupportedBrowserName, ViewportWidthName } from '~/@types/storybook-parameters'
// Storybook 10 loads this config as a native ES module, where `__dirname` is
// not defined — derive it from the module URL instead.
@@ -18,92 +18,7 @@ const VIEWPORT_WIDTHS = {
medium: { width: 960, height: 720 },
wide: { width: 1300, height: 720 },
superwide: { width: 1920, height: 720 },
-} as const
-type ViewportWidthName = keyof typeof VIEWPORT_WIDTHS
-
-// 'firefox' is technically supported too, but as of June 2023 it has memory usage issues that make is unusable
-type SupportedBrowserName = 'chromium' | 'webkit'
-type SnapshotTheme = 'light' | 'dark'
-
-// Extend Storybook interface `Parameters` with Chromatic parameters
-declare module 'storybook/internal/types' {
- interface Parameters {
- options?: any
- /** @default 'padded' */
- layout?: 'padded' | 'fullscreen' | 'centered'
- testOptions?: {
- /**
- * Whether we should wait for all loading indicators to disappear before taking a snapshot.
- * @default true
- */
- waitForLoadersToDisappear?: boolean
- /** If set, we'll wait for the given selector (or all selectors, if multiple) to be satisfied. */
- waitForSelector?: string | string[]
- /** Timeout in ms for waitForSelector. Defaults to Playwright's context timeout (PLAYWRIGHT_TIMEOUT_MS). */
- waitForSelectorTimeout?: number
- /**
- * Override the per-test Jest timeout (ms) for stories whose render legitimately needs
- * longer than the default. Use sparingly — a slow story is usually a bug, not a budget
- * problem. Still scaled by the viewport-widths multiplier. Defaults to JEST_TIMEOUT_MS.
- */
- jestTimeout?: number
- /**
- * By default we wait for images to have width as an indication the page is ready for screenshot testing
- * Some stories have broken images on purpose to test what the UI does
- * in those cases set `allowImagesWithoutWidth` to `true`
- */
- allowImagesWithoutWidth?: boolean
- /**
- * Whether navigation should be included in the snapshot. Only applies to `layout: 'fullscreen'` stories.
- * @default false
- */
- includeNavigationInSnapshot?: boolean
- /**
- * The test will always run for all the browers, but snapshots are only taken in Chromium by default.
- * Override this to take snapshots in other browsers too.
- *
- * @default ['chromium']
- */
- snapshotBrowsers?: SupportedBrowserName[]
- /** Narrow the snapshot to a specific element. Only works for component (non-fullscreen) snapshots — throws an error if used with `layout: 'fullscreen'`. */
- snapshotTargetSelector?: string
- /** specify an alternative viewport size */
- viewport?: { width: number; height: number }
- /** take snapshots at multiple preset widths, producing one snapshot per width */
- viewportWidths?: ViewportWidthName[]
- /**
- * Skip waiting for iframes to load. Useful for stories with external iframes that fail in CI.
- * Also skips waiting for networkidle, which is useful for stories with background network activity.
- * @default false
- */
- skipIframeWait?: boolean
- /**
- * Skip taking a dark mode snapshot. Useful for stories that don't support dark mode or have known issues in dark mode that would cause snapshot failures.
- */
- skipDarkMode?: boolean
- /**
- * Skip taking a light mode snapshot. Useful for stories that pin themselves to dark mode
- * (e.g. via story globals plus a mocked `theme_mode: 'dark'` user), where the light
- * snapshot would render dark-computed values on a light background.
- */
- skipLightMode?: boolean
- /**
- * Suppress quill-charts canvas painting for this story's snapshot, avoiding flake from
- * the charts' async paint. Handled by the `withChartCanvasSnapshot` decorator.
- * @default false
- */
- skipCanvasDraw?: boolean
- }
- msw?: {
- mocks?: Mocks
- }
- [name: string]: any
- }
-
- interface Globals {
- theme: SnapshotTheme
- }
-}
+} as const satisfies Record<ViewportWidthName, { width: number; height: number }>
const RETRY_TIMES = 2
const FRAME_SELECTOR_SEPARATOR = ' >>> '
diff --git a/common/storybook/README.md b/common/storybook/README.md
index 40930315f327..c2a9b4683f5e 100644
--- a/common/storybook/README.md
+++ b/common/storybook/README.md
@@ -89,7 +89,8 @@ STORYBOOK_STORIES=frontend/src/toolbar pnpm exec test-storybook --browsers chrom
- `test-storybook` reads the story list from `main.ts` in its own process, so give it the same `STORYBOOK_STORIES` as the build. Otherwise it collects every story in the repo, and each one the build doesn't have fails with "Couldn't find story matching id".
- `-u` writes fresh images. Without it, the runner compares each story with the image an earlier local run left in `frontend/__snapshots__/`, and an old image fails the story with a size or pixel diff.
-- Images go to `frontend/__snapshots__/`, which git ignores. Failure images go to `frontend/__snapshots__/__failures__/` under the directory you ran from, so delete `common/storybook/frontend/` afterwards.
+- Images go to `frontend/__snapshots__/`. Git ignores the folder but still tracks some older PNGs in it, and `-u` rewrites them. Run `git status` afterwards and restore any tracked image the run changed.
+- Failure images go to `frontend/__snapshots__/__failures__/` under the directory you ran from, so delete `common/storybook/frontend/` afterwards.
- These images are not the baseline. Visual review keeps the baseline hashes in `frontend/snapshots.yml`. See [Snapshots](docs/snapshots.md#baselines-and-visual-review).
Other scripts in `common/storybook/package.json`:
diff --git a/common/storybook/docs/writing-stories.md b/common/storybook/docs/writing-stories.md
index 5ce1a4c04bca..8e85cb20143f 100644
--- a/common/storybook/docs/writing-stories.md
+++ b/common/storybook/docs/writing-stories.md
@@ -63,6 +63,15 @@ An action dispatched from a story can run after the snapshot, or a load that fin
A decorator in a story or meta, such as `mswDecorator`, sits inside all of them.
Before each render, Storybook also waits for the Inter and RoundHog fonts. Canvas charts measure text when they paint and never paint again after a font arrives.
+## Parameter types
+
+`frontend/src/@types/storybook-parameters.d.ts` types every parameter that a global decorator or the test runner reads, including each `testOptions` key.
+The typecheck rejects an unknown key, so a typo such as `testOptions: { skip: true }` fails before it can silently do nothing.
+When a decorator or the runner starts to read a new parameter, add it to that file.
+The file lives under `frontend/` on purpose: story files resolve a different copy of the `storybook` package from `common/storybook/`, and a type declared from there never reaches them.
+
+A file-local parameter, read only by that file's own `render` or decorator, has no type. Read it through a `Decorator`, whose `parameters` accept any key.
+
## How story and meta parameters combine
Storybook merges a story's `parameters` into the meta's.
@@ -157,6 +166,7 @@ parameters: {
- `docs`, `controls`, `actions` and `options` are standard Storybook parameters for the Storybook UI. The runner ignores them.
- `parameters.msw.mocks` works only with `mswDecorator` on the story or meta. No global decorator reads it. See [Mocking data](mocking-data.md).
- A parameter that only one file uses, such as `narrow`, `width` or `tab`, is read by that file's own `render` or `beforeEach`. Read the file before you copy one.
+- A derived story that needs a base story's mocks imports a shared `Mocks` constant, for example `BI_MODE_WORKSHEET_MOCKS` in `SQLEditorScene.stories.tsx`. Don't read them back out of `BaseStory.parameters.msw.mocks`.
## Story functions: `render`, `play`, `beforeEach`, `loaders`
diff --git a/common/storybook/package.json b/common/storybook/package.json
index 0f5ccdd2e180..1341477cefdf 100644
--- a/common/storybook/package.json
+++ b/common/storybook/package.json
@@ -32,7 +32,6 @@
"posthog-js-lite": "4.13.1",
"sass": "^1.26.2",
"storybook": "catalog:",
- "storybook-addon-pseudo-states": "^10.4.3",
"vite": "catalog:"
},
"devDependencies": {
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 08b6d260c5b7..e5bdaafd7701 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -7972,10 +7972,6 @@ snapshots:
hash: v1.k794b7964.ff266ce4b007479bd8156db3c4b65a91a8b987d226bfd7622b20085df50d5d1c.2IsZbL1hVZEqsqWd22bNC0XJvJSqSlXHKCc0LGtJzJc
products-posthog-ai-threadview--saved-insight-query--light:
hash: v1.k794b7964.405cb15303a44d4f837d5569ab4110e07b62ffa71fc418e0aaeb29ddafe8cf8e.mnRWTc0Tao1ttGBbi8vm9n77TQn-RXrRtmeeaDk-yM8
- products-posthog-ai-threadview-quill--compared-with-lemon--dark:
- hash: v1.k794b7964.6ee083d43feb17cbf75de903a58fc0f22e2a6096325ed71807bc7b5d4d9b3fb8.kb4rt8HOCJqb2JDFBOD4iCPLXARpcLLuaAruzfbiwKE
- products-posthog-ai-threadview-quill--compared-with-lemon--light:
- hash: v1.k794b7964.8ddd3e0f26bc30a2c8765cc95a50d44cbad6004ed71865e02803d0ce3bac8d70.880PRQXkoRu4Cqq7IolKEjWJKucfChdwHN2virYl4rQ
products-posthog-ai-threadview-quill--completed-turn--dark:
hash: v1.k794b7964.c0c04f36fad1bde518d957b22e870ce81bd09f24ab907101ee1e6c8f405caa81.YxTkfFJuf49W2ekYQ7vlU7xIik6AK0t3kZOLq_qdzXo
products-posthog-ai-threadview-quill--completed-turn--light:
@@ -14568,10 +14564,6 @@ snapshots:
hash: v1.k794b7964.facd192bb03d3df6b38f20e6013b1fceba68dc2dd34db0fc9cee305c0a341126.znEaknxEodm1Dnsk7410w3PUaacVaJltTxWwWHwc2Kw
scenes-app-posthog-ai-forms--thread-with-text-and-number-form--light:
hash: v1.k794b7964.10721901188497f184bda24ccfd799dd03cbcccccb1fdabbd86d0fb293375b38.OPA1aN19eYGYgdieSvoRpgYStJ7fpWXezR_IxCi4QA4
- scenes-app-posthog-ai-quill-comparison--side-by-side--dark:
- hash: v1.k794b7964.57b952a719ed739c7af6ca36ace26e4b478178fa439cd206b111b9382864b2ae.LPAgqTeySKR77G4_xZd5ATEXJq61uIQRLgq24eprubw
- scenes-app-posthog-ai-quill-comparison--side-by-side--light:
- hash: v1.k794b7964.83eb8c95a27b1ecf650839174f16029b867d64ed2400884f57c73516fceeeb95.gEDivGbOPazQNKHi3kot51UHkLPZJE3ztEODWLGx0-0
scenes-app-posthog-ai-tools--changelog-only--dark:
hash: v1.k794b7964.f17aec31dd25e93672f7d76b065a6b49052c643eb6da67458011462b883f1c9c.sYkAo1RWtXpQRQNxl5SzUkO4ELuuEshq9Kdbc0H1L0E
scenes-app-posthog-ai-tools--changelog-only--light:
diff --git a/frontend/src/@types/storybook-parameters.d.ts b/frontend/src/@types/storybook-parameters.d.ts
new file mode 100644
index 000000000000..4b0312773bad
--- /dev/null
+++ b/frontend/src/@types/storybook-parameters.d.ts
@@ -0,0 +1,92 @@
+// Story files resolve their own copy of `storybook`, so the parameter types live here, where they augment that copy.
+import type { Mocks } from '~/mocks/utils'
+
+export type ViewportWidthName = 'narrow' | 'medium' | 'wide' | 'superwide'
+// 'firefox' is technically supported too, but as of June 2023 it has memory usage issues that make is unusable
+export type SupportedBrowserName = 'chromium' | 'webkit'
+export type SnapshotTheme = 'light' | 'dark'
+
+declare module 'storybook/internal/types' {
+ interface Parameters {
+ options?: any
+ /** @default 'padded' */
+ layout?: 'padded' | 'fullscreen' | 'centered'
+ testOptions?: {
+ /**
+ * Whether we should wait for all loading indicators to disappear before taking a snapshot.
+ * @default true
+ */
+ waitForLoadersToDisappear?: boolean
+ /** If set, we'll wait for the given selector (or all selectors, if multiple) to be satisfied. */
+ waitForSelector?: string | string[]
+ /** Timeout in ms for waitForSelector. Defaults to Playwright's context timeout (PLAYWRIGHT_TIMEOUT_MS). */
+ waitForSelectorTimeout?: number
+ /**
+ * Override the per-test Jest timeout (ms) for stories whose render legitimately needs
+ * longer than the default. Use sparingly — a slow story is usually a bug, not a budget
+ * problem. Still scaled by the viewport-widths multiplier. Defaults to JEST_TIMEOUT_MS.
+ */
+ jestTimeout?: number
+ /**
+ * By default we wait for images to have width as an indication the page is ready for screenshot testing
+ * Some stories have broken images on purpose to test what the UI does
+ * in those cases set `allowImagesWithoutWidth` to `true`
+ */
+ allowImagesWithoutWidth?: boolean
+ /**
+ * Whether navigation should be included in the snapshot. Only applies to `layout: 'fullscreen'` stories.
+ * @default false
+ */
+ includeNavigationInSnapshot?: boolean
+ /**
+ * The test will always run for all the browers, but snapshots are only taken in Chromium by default.
+ * Override this to take snapshots in other browsers too.
+ *
+ * @default ['chromium']
+ */
+ snapshotBrowsers?: SupportedBrowserName[]
+ /** Narrow the snapshot to a specific element. Only works for component (non-fullscreen) snapshots — throws an error if used with `layout: 'fullscreen'`. */
+ snapshotTargetSelector?: string
+ /** specify an alternative viewport size */
+ viewport?: { width: number; height: number }
+ /** take snapshots at multiple preset widths, producing one snapshot per width */
+ viewportWidths?: ViewportWidthName[]
+ /**
+ * Skip waiting for iframes to load. Useful for stories with external iframes that fail in CI.
+ * Also skips waiting for networkidle, which is useful for stories with background network activity.
+ * @default false
+ */
+ skipIframeWait?: boolean
+ /**
+ * Skip taking a dark mode snapshot. Useful for stories that don't support dark mode or have known issues in dark mode that would cause snapshot failures.
+ */
+ skipDarkMode?: boolean
+ /**
+ * Skip taking a light mode snapshot. Useful for stories that pin themselves to dark mode
+ * (e.g. via story globals plus a mocked `theme_mode: 'dark'` user), where the light
+ * snapshot would render dark-computed values on a light background.
+ */
+ skipLightMode?: boolean
+ /**
+ * Suppress quill-charts canvas painting for this story's snapshot, avoiding flake from
+ * the charts' async paint. Handled by the `withChartCanvasSnapshot` decorator.
+ * @default false
+ */
+ skipCanvasDraw?: boolean
+ }
+ /** Flags that are on (`string[]`), or flags pinned to a value or variant (`Record`). Applied by `withFeatureFlags`. */
+ featureFlags?: string[] | Record<string, string | boolean>
+ /** Pins the clock with MockDate. Applied by `withMockDate`. */
+ mockDate?: string | number | Date
+ /** Pushed to the kea router after the story mounts. Applied by `withPageUrl`. */
+ pageUrl?: string
+ msw?: {
+ mocks?: Mocks
+ }
+ [name: string]: any
+ }
+
+ interface Globals {
+ theme: SnapshotTheme
+ }
+}
diff --git a/frontend/src/scenes/data-warehouse/editor/SQLEditorScene.stories.tsx b/frontend/src/scenes/data-warehouse/editor/SQLEditorScene.stories.tsx
index 86de8ecb9c87..f71797ab3f20 100644
--- a/frontend/src/scenes/data-warehouse/editor/SQLEditorScene.stories.tsx
+++ b/frontend/src/scenes/data-warehouse/editor/SQLEditorScene.stories.tsx
@@ -13,7 +13,7 @@ import { organizationLogic } from 'scenes/organizationLogic'
import { urls } from 'scenes/urls'
import { mswDecorator } from '~/mocks/browser'
-import type { MockResolverInfo } from '~/mocks/utils'
+import type { MockResolverInfo, Mocks } from '~/mocks/utils'
import { dataNodeLogic } from '~/queries/nodes/DataNode/dataNodeLogic'
import { IMAGE_QUERY, IMAGE_RESULTS } from '~/queries/nodes/HogQLX/image.fixtures'
import { BIConfig, BIField } from '~/queries/schema/schema-business-intelligence'
@@ -614,6 +614,22 @@ export const SidebarMaterializationStatus: Story = {
},
}
+const BI_MODE_WORKSHEET_MOCKS = {
+ get: {
+ '/api/projects/:team_id/warehouse_expressions/': { results: [] },
+ '/api/environments/:team_id/warehouse_expressions/': { results: [] },
+ },
+ post: {
+ // The specific path wins over the catch-all query mock on the meta
+ '/api/environments/:team_id/query/DatabaseSchemaQuery/': {
+ tables: {
+ events: { id: 'events', name: 'events', type: 'posthog', fields: BI_EVENTS_FIELDS },
+ },
+ },
+ '/api/environments/:team_id/query/HogQLQuery/': BI_WORKSHEET_RESULTS,
+ },
+} satisfies Mocks
+
export const BIModeWorksheet: Story = {
beforeEach: pinQueryTimer,
parameters: {
@@ -629,21 +645,7 @@ export const BIModeWorksheet: Story = {
viewport: { width: 1600, height: 900 },
},
msw: {
- mocks: {
- get: {
- '/api/projects/:team_id/warehouse_expressions/': { results: [] },
- '/api/environments/:team_id/warehouse_expressions/': { results: [] },
- },
- post: {
- // The specific path wins over the catch-all query mock on the meta
- '/api/environments/:team_id/query/DatabaseSchemaQuery/': {
- tables: {
- events: { id: 'events', name: 'events', type: 'posthog', fields: BI_EVENTS_FIELDS },
- },
- },
- '/api/environments/:team_id/query/HogQLQuery/': BI_WORKSHEET_RESULTS,
- },
- },
+ mocks: BI_MODE_WORKSHEET_MOCKS,
},
},
}
@@ -694,9 +696,9 @@ export const BISavedInsight: Story = {
testOptions: { waitForSelector: '[data-attr="insight-edit-button"]', viewport: { width: 1600, height: 900 } },
msw: {
mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
get: {
- ...BIModeWorksheet.parameters?.msw.mocks.get,
+ ...BI_MODE_WORKSHEET_MOCKS.get,
'/api/:scope/:team_id/insights/': [200, { results: [BI_SAVED_INSIGHT] }],
'/api/environments/:team_id/insights/:id/': [200, BI_SAVED_INSIGHT],
'/api/projects/:team_id/events_retention/': [200, { retention_months: null, retained_from: null }],
@@ -733,9 +735,9 @@ export const BICalculatedMeasureEditor: Story = {
},
msw: {
mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/projects/:team_id/query/HogQLAutocomplete/': {
suggestions: [{ kind: 'Variable', label: 'event', insertText: 'event', detail: 'String' }],
incomplete_list: false,
@@ -804,9 +806,9 @@ export const BIQuickFilters: Story = {
pageUrl: `${urls.businessIntelligence()}#${new URLSearchParams({ q: buildBIQuery(BI_QUICK_FILTERS_CONFIG)?.query ?? '', mode: 'bi', bi: JSON.stringify(BI_QUICK_FILTERS_CONFIG) })}`,
msw: {
mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/environments/:team_id/query/HogQLQuery/': async ({ request }: { request: Request }) => {
const { query } = await request.json()
return [
@@ -1032,9 +1034,9 @@ export const BIDataSourcePicker: Story = {
},
msw: {
mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/environments/:team_id/query/DatabaseSchemaQuery/': {
tables: {
events: { id: 'events', name: 'events', type: 'posthog', fields: BI_EVENTS_FIELDS },
@@ -1227,9 +1229,9 @@ export const BIConnections: Story = {
},
msw: {
mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/environments/:team_id/query/DatabaseSchemaQuery/': {
tables: {
events: {
@@ -1327,6 +1329,29 @@ async function stabilizeQueryElapsedTime(): Promise<void> {
logic!.actions.setElapsedTime(180)
}
+const BI_TABLE_ANALYSIS_MOCKS = {
+ ...BI_MODE_WORKSHEET_MOCKS,
+ post: {
+ ...BI_MODE_WORKSHEET_MOCKS.post,
+ '/api/environments/:team_id/query/HogQLQuery/': {
+ columns: ['bi_row_timestamp', 'bi_column_event', 'sum_revenue', 'average_revenue_2'],
+ types: [
+ ['bi_row_timestamp', 'String'],
+ ['bi_column_event', 'String'],
+ ['sum_revenue', 'Nullable(Float64)'],
+ ['average_revenue_2', 'Float64'],
+ ],
+ results: [
+ ['Total', 'Total', null, 14.2],
+ ['2026-06-01', 'purchase', 120, 12],
+ ['2026-06-02', 'purchase', 300, 15],
+ ['2026-06-01', 'Other', 40, 10],
+ ],
+ hasMore: false,
+ },
+ },
+} satisfies Mocks
+
export const BITableAnalysis: Story = {
...BIModeWorksheet,
parameters: {
@@ -1337,28 +1362,7 @@ export const BITableAnalysis: Story = {
bi: JSON.stringify(BI_ANALYSIS_CONFIG),
})}`,
msw: {
- mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
- post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
- '/api/environments/:team_id/query/HogQLQuery/': {
- columns: ['bi_row_timestamp', 'bi_column_event', 'sum_revenue', 'average_revenue_2'],
- types: [
- ['bi_row_timestamp', 'String'],
- ['bi_column_event', 'String'],
- ['sum_revenue', 'Nullable(Float64)'],
- ['average_revenue_2', 'Float64'],
- ],
- results: [
- ['Total', 'Total', null, 14.2],
- ['2026-06-01', 'purchase', 120, 12],
- ['2026-06-02', 'purchase', 300, 15],
- ['2026-06-01', 'Other', 40, 10],
- ],
- hasMore: false,
- },
- },
- },
+ mocks: BI_TABLE_ANALYSIS_MOCKS,
},
},
play: async ({ canvasElement }) => {
@@ -1390,33 +1394,35 @@ const BI_COMBO_CONFIG: BIConfig = {
],
}
+const BI_COMBINED_MEASURES_MOCKS = {
+ ...BI_MODE_WORKSHEET_MOCKS,
+ post: {
+ ...BI_MODE_WORKSHEET_MOCKS.post,
+ '/api/environments/:team_id/query/HogQLQuery/': {
+ columns: ['toStartOfDay(timestamp)', 'sum_revenue', 'average_revenue_2'],
+ types: [
+ ['toStartOfDay(timestamp)', 'DateTime'],
+ ['sum_revenue', 'Float64'],
+ ['average_revenue_2', 'Float64'],
+ ],
+ results: [
+ ['2026-06-01', 1200, 12.5],
+ ['2026-06-02', 2100, 15.2],
+ ['2026-06-03', 1800, 13.4],
+ ['2026-06-04', 2450, 16.8],
+ ],
+ hasMore: false,
+ },
+ },
+} satisfies Mocks
+
export const BICombinedMeasures: Story = {
...BIModeWorksheet,
parameters: {
...BIModeWorksheet.parameters,
pageUrl: `${urls.businessIntelligence()}#${new URLSearchParams({ q: buildBIQuery(BI_COMBO_CONFIG)!.query, mode: 'bi', bi: JSON.stringify(BI_COMBO_CONFIG) })}`,
msw: {
- mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
- post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
- '/api/environments/:team_id/query/HogQLQuery/': {
- columns: ['toStartOfDay(timestamp)', 'sum_revenue', 'average_revenue_2'],
- types: [
- ['toStartOfDay(timestamp)', 'DateTime'],
- ['sum_revenue', 'Float64'],
- ['average_revenue_2', 'Float64'],
- ],
- results: [
- ['2026-06-01', 1200, 12.5],
- ['2026-06-02', 2100, 15.2],
- ['2026-06-03', 1800, 13.4],
- ['2026-06-04', 2450, 16.8],
- ],
- hasMore: false,
- },
- },
- },
+ mocks: BI_COMBINED_MEASURES_MOCKS,
},
},
play: async ({ canvasElement }) => {
@@ -1445,9 +1451,9 @@ export const BIDrilldown: Story = {
testOptions: { ...BITableAnalysis.parameters?.testOptions, includeNavigationInSnapshot: true },
msw: {
mocks: {
- ...BITableAnalysis.parameters?.msw.mocks,
+ ...BI_TABLE_ANALYSIS_MOCKS,
post: {
- ...BITableAnalysis.parameters?.msw.mocks.post,
+ ...BI_TABLE_ANALYSIS_MOCKS.post,
'/api/environments/:team_id/query/HogQLQuery/': async ({ request }: MockResolverInfo) => {
const { query } = (await request.json()) as { query: { query: string } }
return query.query.startsWith('SELECT *')
@@ -1464,7 +1470,7 @@ export const BIDrilldown: Story = {
],
hasMore: false,
}
- : BITableAnalysis.parameters?.msw.mocks.post['/api/environments/:team_id/query/HogQLQuery/']
+ : BI_TABLE_ANALYSIS_MOCKS.post['/api/environments/:team_id/query/HogQLQuery/']
},
},
},
@@ -1494,9 +1500,9 @@ export const BIOneClickComparison: Story = {
pageUrl: `${urls.businessIntelligence()}#${new URLSearchParams({ q: buildBIQuery(BI_COMPARISON_CONFIG)!.query, mode: 'bi', bi: JSON.stringify(BI_COMPARISON_CONFIG) })}`,
msw: {
mocks: {
- ...BICombinedMeasures.parameters?.msw.mocks,
+ ...BI_COMBINED_MEASURES_MOCKS,
post: {
- ...BICombinedMeasures.parameters?.msw.mocks.post,
+ ...BI_COMBINED_MEASURES_MOCKS.post,
'/api/environments/:team_id/query/HogQLQuery/': {
columns: ['bi_row_timestamp', 'sum_revenue', 'bi_comparison'],
types: [
@@ -1536,9 +1542,9 @@ export const BIPivotTotals: Story = {
pageUrl: `${urls.businessIntelligence()}#${new URLSearchParams({ q: buildBIQuery(BI_PIVOT_TOTALS_CONFIG)!.query, mode: 'bi', bi: JSON.stringify(BI_PIVOT_TOTALS_CONFIG) })}`,
msw: {
mocks: {
- ...BITableAnalysis.parameters?.msw.mocks,
+ ...BI_TABLE_ANALYSIS_MOCKS,
post: {
- ...BITableAnalysis.parameters?.msw.mocks.post,
+ ...BI_TABLE_ANALYSIS_MOCKS.post,
'/api/environments/:team_id/query/HogQLQuery/': {
columns: ['bi_row_timestamp', 'bi_column_event', 'sum_revenue'],
types: [
@@ -1590,9 +1596,9 @@ export const BINamedHierarchy: Story = {
testOptions: { ...BITableAnalysis.parameters?.testOptions, includeNavigationInSnapshot: true },
msw: {
mocks: {
- ...BIModeWorksheet.parameters?.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
get: {
- ...BIModeWorksheet.parameters?.msw.mocks.get,
+ ...BI_MODE_WORKSHEET_MOCKS.get,
'/api/projects/:team_id/insights/': {
results: [
{
@@ -1613,7 +1619,7 @@ export const BINamedHierarchy: Story = {
},
},
post: {
- ...BIModeWorksheet.parameters?.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/environments/:team_id/query/DatabaseSchemaQuery/': {
tables: {
events: {
@@ -1805,9 +1811,9 @@ export const BISourcePreviewLargeSample: Story = {
...BIModeWorksheet.parameters,
msw: {
mocks: {
- ...BIModeWorksheet.parameters!.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
get: {
- ...BIModeWorksheet.parameters!.msw.mocks.get,
+ ...BI_MODE_WORKSHEET_MOCKS.get,
'/api/projects/:team_id/data_catalog/relationship_proposals/': {
count: 0,
next: null,
@@ -1815,7 +1821,7 @@ export const BISourcePreviewLargeSample: Story = {
},
},
post: {
- ...BIModeWorksheet.parameters!.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/projects/:team_id/file_system/home_folder/': { id: 'example-home', path: 'Users/Example' },
'/api/environments/:team_id/query/HogQLQuery/': async ({ request }: MockResolverInfo) => {
const { query } = (await request.json()) as { query: { query: string } }
@@ -1906,9 +1912,9 @@ export const BIWideTransposedResults: Story = {
},
msw: {
mocks: {
- ...BIModeWorksheet.parameters!.msw.mocks,
+ ...BI_MODE_WORKSHEET_MOCKS,
get: {
- ...BIModeWorksheet.parameters!.msw.mocks.get,
+ ...BI_MODE_WORKSHEET_MOCKS.get,
'/api/projects/:team_id/data_catalog/relationship_proposals/': {
count: 0,
next: null,
@@ -1916,7 +1922,7 @@ export const BIWideTransposedResults: Story = {
},
},
post: {
- ...BIModeWorksheet.parameters!.msw.mocks.post,
+ ...BI_MODE_WORKSHEET_MOCKS.post,
'/api/projects/:team_id/file_system/home_folder/': { id: 'example-home', path: 'Users/Example' },
'/api/environments/:team_id/query/HogQLQuery/': {
columns: [
diff --git a/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx b/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx
index b1968c53a117..cac6910b5062 100644
--- a/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx
+++ b/frontend/src/scenes/insights/__mocks__/createInsightScene.tsx
@@ -1,6 +1,6 @@
import { samplePersonProperties, sampleRetentionPeopleResponse } from 'scenes/insights/__mocks__/insight.mocks'
-import { StoryFn } from '@storybook/react'
+import type { Parameters, StoryFn } from '@storybook/react'
import { waitFor } from '@testing-library/dom'
import userEvent from '@testing-library/user-event'
import { useMountedLogic } from 'kea'
@@ -21,14 +21,14 @@ export const insightSceneStoryParameters = {
viewMode: 'story',
mockDate: '2022-03-11',
testOptions: {
- snapshotBrowsers: ['chromium' as const],
+ snapshotBrowsers: ['chromium'],
viewport: {
// needs a slightly larger width to push the rendered scene away from the breakpoint boundary
width: 1300,
height: 720,
},
},
-}
+} satisfies Parameters
/** API mocks the insight scene needs beyond the insight itself (editor taxonomy, persons). */
export const insightSceneMswDecorator = mswDecorator({
diff --git a/frontend/src/scenes/max/PostHogAiQuillComparison.stories.tsx b/frontend/src/scenes/max/PostHogAiQuillComparison.stories.tsx
index c576b5fda3ac..f5687588671a 100644
--- a/frontend/src/scenes/max/PostHogAiQuillComparison.stories.tsx
+++ b/frontend/src/scenes/max/PostHogAiQuillComparison.stories.tsx
@@ -41,6 +41,9 @@ async function queryHandler({ request }: { request: Request }): Promise<[number,
const meta: Meta = {
title: 'Scenes-App/PostHog AI/Quill comparison',
+ // Three live threads with charts: a snapshot of this page would be slow and flaky, and the story is a
+ // review surface, not a regression gate.
+ tags: ['test-skip'],
decorators: [
mswDecorator({
get: {
@@ -82,9 +85,6 @@ const meta: Meta = {
layout: 'fullscreen',
viewMode: 'story',
mockDate: '2024-03-15T14:10:00Z',
- // Three live threads with charts: a snapshot of this page would be slow and flaky, and the story is a
- // review surface, not a regression gate.
- testOptions: { skip: true },
},
}
export default meta
diff --git a/frontend/src/scenes/project-homepage/today/Today.stories.tsx b/frontend/src/scenes/project-homepage/today/Today.stories.tsx
index ff5d5440c504..9ccd93135209 100644
--- a/frontend/src/scenes/project-homepage/today/Today.stories.tsx
+++ b/frontend/src/scenes/project-homepage/today/Today.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react'
+import type { Decorator, Meta, StoryObj } from '@storybook/react'
import { fireEvent, waitFor, within } from '@testing-library/dom'
import userEvent from '@testing-library/user-event'
import { ReactNode } from 'react'
@@ -476,10 +476,7 @@ const OPEN_REPORT_COUNT = 46
// a story. Clearing it makes each story start clean, so only the sample stories show sample reports.
// A story's `spaceFeedView` parameter is written after the clear, so it starts with that saved space feed view, the
// way a returning person sees it.
-function clearTodayStorage(
- Story: () => JSX.Element,
- { parameters }: { parameters: { spaceFeedView?: Record<string, unknown> } }
-): JSX.Element {
+const clearTodayStorage: Decorator = (Story, { parameters }) => {
for (const key of Object.keys(window.localStorage)) {
if (/today|spaceFeedViewLogic/i.test(key)) {
window.localStorage.removeItem(key)
diff --git a/frontend/src/scenes/session-recordings/SessionsRecordings-activity-modal.stories.tsx b/frontend/src/scenes/session-recordings/SessionsRecordings-activity-modal.stories.tsx
index d49f3fe725f4..d268937a8a42 100644
--- a/frontend/src/scenes/session-recordings/SessionsRecordings-activity-modal.stories.tsx
+++ b/frontend/src/scenes/session-recordings/SessionsRecordings-activity-modal.stories.tsx
@@ -19,9 +19,6 @@ const meta: Meta = {
layout: 'fullscreen',
viewMode: 'story',
mockDate: '2023-01-28',
- testOptions: {
- loaderTimeout: 15000,
- },
},
decorators: [
mswDecorator({
diff --git a/frontend/src/scenes/session-recordings/SessionsRecordings-group-scene.stories.tsx b/frontend/src/scenes/session-recordings/SessionsRecordings-group-scene.stories.tsx
index 200b03e27533..16582db20e4d 100644
--- a/frontend/src/scenes/session-recordings/SessionsRecordings-group-scene.stories.tsx
+++ b/frontend/src/scenes/session-recordings/SessionsRecordings-group-scene.stories.tsx
@@ -120,9 +120,6 @@ const meta: Meta = {
layout: 'fullscreen',
viewMode: 'story',
mockDate: '2023-07-04',
- testOptions: {
- loaderTimeout: 15000,
- },
},
decorators: [
mswDecorator({
diff --git a/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene.stories.tsx b/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene.stories.tsx
index acd88fdb9597..b961136b3055 100644
--- a/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene.stories.tsx
+++ b/frontend/src/scenes/session-recordings/playlist/SessionRecordingsPlaylistScene.stories.tsx
@@ -87,7 +87,6 @@ const meta: Meta = {
viewMode: 'story',
mockDate: '2023-07-04',
testOptions: {
- loaderTimeout: 15000,
waitForSelector: 'iframe.PlayerFrame__document >>> .PlayerFrame__content .replayer-wrapper iframe',
},
},
diff --git a/frontend/src/scenes/welcome/cards/FlagshipProductsCard.stories.tsx b/frontend/src/scenes/welcome/cards/FlagshipProductsCard.stories.tsx
index 1284fbae5a8f..a67d59679b07 100644
--- a/frontend/src/scenes/welcome/cards/FlagshipProductsCard.stories.tsx
+++ b/frontend/src/scenes/welcome/cards/FlagshipProductsCard.stories.tsx
@@ -11,7 +11,6 @@ const meta: Meta<typeof FlagshipProductsCard> = {
component: FlagshipProductsCard,
parameters: {
layout: 'padded',
- testOptions: { include: false },
},
decorators: [mswDecorator({})],
}
diff --git a/frontend/src/scenes/welcome/cards/InstallProgressCard.stories.tsx b/frontend/src/scenes/welcome/cards/InstallProgressCard.stories.tsx
index 21f6192346a2..49df7118162f 100644
--- a/frontend/src/scenes/welcome/cards/InstallProgressCard.stories.tsx
+++ b/frontend/src/scenes/welcome/cards/InstallProgressCard.stories.tsx
@@ -15,7 +15,6 @@ const meta: Meta<typeof InstallProgressCard> = {
component: InstallProgressCard,
parameters: {
layout: 'padded',
- testOptions: { include: false },
},
decorators: [mswDecorator({})],
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9b119de35dce..66743f78277c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -530,9 +530,6 @@ importers:
storybook:
specifier: 'catalog:'
- storybook-addon-pseudo-states:
- specifier: ^10.4.3
vite:
specifier: 'catalog:'
diff --git a/products/marketing_analytics/frontend/search/SearchPerformanceTab.stories.tsx b/products/marketing_analytics/frontend/search/SearchPerformanceTab.stories.tsx
index d2c72960d08b..dbeb825ea81c 100644
--- a/products/marketing_analytics/frontend/search/SearchPerformanceTab.stories.tsx
+++ b/products/marketing_analytics/frontend/search/SearchPerformanceTab.stories.tsx
@@ -411,21 +411,23 @@ export const MixedWithPosition: Story = {
await expect(canvas.queryByRole('checkbox', { name: 'Show position' })).not.toBeInTheDocument()
},
}
+const ORGANIC_TRAFFIC_MOCKS = {
+ get: {
+ '/api/environments/:team_id/external_data_sources/': {
+ results: SOURCES.filter((source) => source.source_type === 'GoogleSearchConsole'),
+ count: 1,
+ next: null,
+ previous: null,
+ },
+ },
+} satisfies Mocks
+
export const OrganicTraffic: Story = {
...Comparison,
parameters: {
...Comparison.parameters,
msw: {
- mocks: {
- get: {
- '/api/environments/:team_id/external_data_sources/': {
- results: SOURCES.filter((source) => source.source_type === 'GoogleSearchConsole'),
- count: 1,
- next: null,
- previous: null,
- },
- },
- },
+ mocks: ORGANIC_TRAFFIC_MOCKS,
},
},
}
@@ -556,19 +558,21 @@ export const UnavailableSourcesNarrow: Story = {
...UnavailableSources,
decorators: Narrow.decorators,
}
+const ONLY_GOOGLE_ADS_MOCKS = {
+ get: {
+ '/api/environments/:team_id/external_data_sources/': {
+ results: SOURCES.filter((source) => source.source_type === 'GoogleAds'),
+ count: 1,
+ next: null,
+ previous: null,
+ },
+ },
+} satisfies Mocks
+
export const OnlyGoogleAds: Story = {
parameters: {
msw: {
- mocks: {
- get: {
- '/api/environments/:team_id/external_data_sources/': {
- results: SOURCES.filter((source) => source.source_type === 'GoogleAds'),
- count: 1,
- next: null,
- previous: null,
- },
- },
- },
+ mocks: ONLY_GOOGLE_ADS_MOCKS,
},
},
}
@@ -595,10 +599,14 @@ export const PlacementUnavailable: Story = {
expect((await canvas.findAllByRole('button', { name: 'product analytics' })).length).toBeGreaterThan(0)
},
}
+const EMPTY_MOCKS = {
+ post: { '/api/environments/:team_id/query/MarketingAnalyticsSearchQuery/': { results: [] } },
+} satisfies Mocks
+
export const Empty: Story = {
parameters: {
msw: {
- mocks: { post: { '/api/environments/:team_id/query/MarketingAnalyticsSearchQuery/': { results: [] } } },
+ mocks: EMPTY_MOCKS,
},
},
}
@@ -614,8 +622,8 @@ export const EmptyGoogleAds: Story = {
parameters: {
msw: {
mocks: {
- get: OnlyGoogleAds.parameters!.msw.mocks.get,
- post: Empty.parameters!.msw.mocks.post,
+ get: ONLY_GOOGLE_ADS_MOCKS.get,
+ post: EMPTY_MOCKS.post,
},
},
},
@@ -624,8 +632,8 @@ export const EmptyOrganic: Story = {
parameters: {
msw: {
mocks: {
- get: OrganicTraffic.parameters!.msw.mocks.get,
- post: Empty.parameters!.msw.mocks.post,
+ get: ORGANIC_TRAFFIC_MOCKS.get,
+ post: EMPTY_MOCKS.post,
},
},
},
diff --git a/products/posthog_ai/frontend/components/quill/QuillThread.stories.tsx b/products/posthog_ai/frontend/components/quill/QuillThread.stories.tsx
index e5ca3ba0b336..0387f58eb6f3 100644
--- a/products/posthog_ai/frontend/components/quill/QuillThread.stories.tsx
+++ b/products/posthog_ai/frontend/components/quill/QuillThread.stories.tsx
@@ -270,5 +270,5 @@ export const LongRun: Story = {
}
export const ComparedWithLemon: Story = {
args: { streamKey: 'example-quill-compare', skin: 'both' },
- parameters: { testOptions: { skip: true } },
+ tags: ['test-skip'],
}
diff --git a/products/workflows/frontend/Workflows/hogflows/steps/components/CustomerTaskWorkflowReferenceInput.stories.tsx b/products/workflows/frontend/Workflows/hogflows/steps/components/CustomerTaskWorkflowReferenceInput.stories.tsx
index f6d73cfa62fd..61fc77f0dc16 100644
--- a/products/workflows/frontend/Workflows/hogflows/steps/components/CustomerTaskWorkflowReferenceInput.stories.tsx
+++ b/products/workflows/frontend/Workflows/hogflows/steps/components/CustomerTaskWorkflowReferenceInput.stories.tsx
@@ -1,6 +1,7 @@
import { Meta, StoryFn } from '@storybook/react'
import { useState } from 'react'
+import { mswDecorator } from '~/mocks/browser'
import { CyclotronJobInputType } from '~/types'
import { CustomerTaskWorkflowReferenceInput } from './CustomerTaskWorkflowReferenceInput'
@@ -8,17 +9,17 @@ import { CustomerTaskWorkflowReferenceInput } from './CustomerTaskWorkflowRefere
const meta: Meta<typeof CustomerTaskWorkflowReferenceInput> = {
title: 'Products/Workflows/Steps/Customer task reference input',
component: CustomerTaskWorkflowReferenceInput,
- parameters: {
- mockDate: '2026-01-01',
- msw: {
- mocks: {
- get: {
- '/api/projects/:project_id/accounts/': {
- results: [{ id: '11111111-1111-4111-8111-111111111111', name: 'Example account' }],
- },
+ decorators: [
+ mswDecorator({
+ get: {
+ '/api/projects/:project_id/accounts/': {
+ results: [{ id: '11111111-1111-4111-8111-111111111111', name: 'Example account' }],
},
},
- },
+ }),
+ ],
+ parameters: {
+ mockDate: '2026-01-01',
// Wait for the editor itself: `.monaco-editor` also matches Monaco's shared overflow root on
// <body>, which exists before any editor mounts.
testOptions: {