Files
dance-lessons-coach/frontend/components/HealthDashboard.stories.ts
Gabriel Radureau 7c3617c9d7
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 12s
CI/CD Pipeline / CI Pipeline (push) Failing after 4m34s
CI/CD Pipeline / Trigger Docker Push (push) Has been skipped
♻️ refactor(frontend): split HealthDashboard into smart wrapper + dumb View for state-based stories (#33)
SRP split: HealthDashboardView (presentational, props-based) + HealthDashboard (smart wrapper, useFetch). Enables 4 Storybook stories per state + unit testability per branch. Existing testids preserved, Playwright tests still pass.

Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
2026-05-03 17:55:47 +02:00

27 lines
809 B
TypeScript

import type { Meta, StoryObj } from '@storybook/vue3'
import HealthDashboard from './HealthDashboard.vue'
const meta: Meta<typeof HealthDashboard> = {
title: 'Components/HealthDashboard',
component: HealthDashboard,
tags: ['autodocs'],
parameters: {
docs: {
description: {
component:
'Smart wrapper that calls /api/healthz internally and delegates rendering to HealthDashboardView. ' +
'For state-by-state previews (Healthy, Loading, Error), see ' +
'[HealthDashboardView stories](?path=/docs/components-healthdashboardview--docs).',
},
},
},
}
export default meta
type Story = StoryObj<typeof meta>
// Default story - calls real /api/healthz (works in browser if dev proxy + backend are up)
export const Default: Story = {
args: {},
}