: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
test(auth): render the organization revocation screens in storybook (#96181)
Paul D'Ambra4e23911c28fb
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 5d11c795ec34..12fe30769dfb 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -9616,6 +9616,14 @@ snapshots:hash: v1.k794b7964.035587a8b5e312e7090802ce64658770e8203ed95a272199a59fb854d07b8e4c.xPEsURT17vLAz5gEM4ChIgLSXTy8WIipv5pZUUhoSwAscenes-other-org-member-invites--current-user-is-owner--light:hash: v1.k794b7964.f4fe409e93f3be73dbbd723a795233dafc57b47fa9a10e1586bb123bd4975dfd.oCEutKjA-YPKNncWVj3xSWMHnOgv6_xXWT7ZJr2wVqw+ scenes-other-organization-deactivated--deactivated--dark:+ hash: v1.k794b7964.c97f1ed943259f5567c27813c96bbb0566aca0adbf84459ee7d56b2ebea36b57.SgcQHuoYp4dLjnk797pwVsGonoLU6rH2XdLf0lrzefk+ scenes-other-organization-deactivated--deactivated--light:+ hash: v1.k794b7964.8b2936f2f73a9576c3f5d8108d81fadb1669eb2f65e20f5d9a79cee96d6103c5.kJep-xkW_R6RDRqH385kSLgRdomjewdycLhO5QpAdd4+ scenes-other-organization-pending-deletion--pending-deletion--dark:+ hash: v1.k794b7964.a6c16e6775a08807ece079306c8f686050629a1a3da244534e2b7145c25f7502.SzP_amO7Op2xfUeFilO6OGdks-qkK8byu5m22BfmTkY+ scenes-other-organization-pending-deletion--pending-deletion--light:+ hash: v1.k794b7964.b4d3bd0691c3b878ef1fa5a6404b79206e9de433cb52aaf2765246fea64da6c5.rllVi0no6y64yflVpXVCGrC7HibRFl84s-LXEOp4Zi0scenes-other-password-reset--initial--dark:hash: v1.k794b7964.e3d5f708ff09306e1f06f485f1e389207698e60a0388f606900b947ca5a70ec9.3XJguWf4w1HF8NIOqLCRARBInuoUXmbo9esa81izrrMscenes-other-password-reset--initial--light:diff --git a/frontend/src/scenes/organization/Deactivated.stories.tsx b/frontend/src/scenes/organization/Deactivated.stories.tsxnew file mode 100644index 000000000000..749107112630--- /dev/null+++ b/frontend/src/scenes/organization/Deactivated.stories.tsx@@ -0,0 +1,54 @@+import { Meta, StoryObj } from '@storybook/react'++import { App } from 'scenes/App'+import { urls } from 'scenes/urls'++import { mswDecorator } from '~/mocks/browser'++import preflightJson from '../../mocks/fixtures/_preflight.json'++const meta: Meta = {+ title: 'Scenes-Other/Organization Deactivated',+ parameters: {+ layout: 'fullscreen',+ viewMode: 'story',+ mockDate: '2023-02-01',+ pageUrl: urls.organizationDeactivated(),+ testOptions: { waitForLoadersToDisappear: true },+ },+ decorators: [+ mswDecorator({+ get: {+ '/_preflight': { ...preflightJson, cloud: true, realm: 'cloud' },+ '/api/users/@me/': () => [+ 200,+ {+ email: '[email protected]',+ first_name: 'Test PostHog',+ organization: { name: 'Test org', teams: [], projects: [] },+ organizations: [],+ team: null,+ },+ ],+ // The reason below is the only place a revoked organization learns why.+ '/api/organizations/@current/': () => [+ 200,+ {+ id: '018e1b6b-0000-0000-0000-000000000001',+ name: 'Test org',+ membership_level: 15,+ is_active: false,+ is_not_active_reason: 'Access revoked due to unpaid balance.',+ teams: [],+ projects: [],+ },+ ],+ },+ }),+ ],+}+export default meta++type Story = StoryObj<{}>++export const Deactivated: Story = { render: () => <App /> }diff --git a/frontend/src/scenes/organization/PendingDeletion.stories.tsx b/frontend/src/scenes/organization/PendingDeletion.stories.tsxnew file mode 100644index 000000000000..47085d00320b--- /dev/null+++ b/frontend/src/scenes/organization/PendingDeletion.stories.tsx@@ -0,0 +1,52 @@+import { Meta, StoryObj } from '@storybook/react'++import { App } from 'scenes/App'+import { urls } from 'scenes/urls'++import { mswDecorator } from '~/mocks/browser'++import preflightJson from '../../mocks/fixtures/_preflight.json'++const meta: Meta = {+ title: 'Scenes-Other/Organization Pending Deletion',+ parameters: {+ layout: 'fullscreen',+ viewMode: 'story',+ mockDate: '2023-02-01',+ pageUrl: urls.organizationPendingDeletion(),+ testOptions: { waitForLoadersToDisappear: true },+ },+ decorators: [+ mswDecorator({+ get: {+ '/_preflight': { ...preflightJson, cloud: true, realm: 'cloud' },+ '/api/users/@me/': () => [+ 200,+ {+ email: '[email protected]',+ first_name: 'Test PostHog',+ organization: { name: 'Test org', teams: [], projects: [] },+ organizations: [],+ team: null,+ },+ ],+ '/api/organizations/@current/': () => [+ 200,+ {+ id: '018e1b6b-0000-0000-0000-000000000002',+ name: 'Test org',+ membership_level: 15,+ is_pending_deletion: true,+ teams: [],+ projects: [],+ },+ ],+ },+ }),+ ],+}+export default meta++type Story = StoryObj<{}>++export const PendingDeletion: Story = { render: () => <App /> }