Three dashboard-section stories used a fourth title segment (`Domein/Registratie/Dashboard/<Name>`) that the sidebar rule does not have. Drop the `Dashboard/` segment so all story titles follow the one rule from CLAUDE.md decision 5. Add the two missing stories for sections that have more than one visual state: `wat-moet-ik-regelen` (4 states) and `wat-wilt-u-doen` (2 states, the first story in the new `Domein/Overzicht/` bucket). `beheer-links` gets no story — it has one visual state and its other branch renders nothing. The `MetTaken` story disables the a11y addon with the same reason and WP-11 reference already used on `task-list.stories.ts` and `choice-list.stories.ts`: `app-choice-link`'s host sits between the keuzelijst `<ul>` and its `<li>`, a pre-existing structural gap this ticket does not fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/angular';
|
|
import { applicationConfig } from '@storybook/angular';
|
|
import { SpecialismenSection } from './specialismen.section';
|
|
import { BigProfileStore } from '@registratie/application/big-profile.store';
|
|
import { Aantekening } from '@registratie/domain/registration';
|
|
import { RemoteData } from '@shared/application/remote-data';
|
|
import { loading, success, empty, failure } from '@shared/testing/remote-data';
|
|
|
|
const rows: Aantekening[] = [
|
|
{ type: 'Specialisme', omschrijving: 'Huisartsgeneeskunde', datum: '2016-04-12' },
|
|
{ type: 'Aantekening', omschrijving: 'Erkend opleider huisartsgeneeskunde', datum: '2019-01-08' },
|
|
];
|
|
|
|
/** Minimal store stand-in — only the members the section's template reads. */
|
|
function storeStub(aantekeningen: RemoteData<Error | undefined, Aantekening[]>) {
|
|
return { aantekeningen: () => aantekeningen, reloadAantekeningen: () => {} };
|
|
}
|
|
|
|
const meta: Meta<SpecialismenSection> = {
|
|
title: 'Domein/Registratie/Specialismen',
|
|
component: SpecialismenSection,
|
|
};
|
|
export default meta;
|
|
type Story = StoryObj<SpecialismenSection>;
|
|
|
|
export const Loading: Story = {
|
|
decorators: [
|
|
applicationConfig({
|
|
providers: [{ provide: BigProfileStore, useValue: storeStub(loading()) }],
|
|
}),
|
|
],
|
|
};
|
|
export const Loaded: Story = {
|
|
decorators: [
|
|
applicationConfig({
|
|
providers: [{ provide: BigProfileStore, useValue: storeStub(success(rows)) }],
|
|
}),
|
|
],
|
|
};
|
|
export const Empty: Story = {
|
|
decorators: [
|
|
applicationConfig({ providers: [{ provide: BigProfileStore, useValue: storeStub(empty()) }] }),
|
|
],
|
|
};
|
|
export const Failed: Story = {
|
|
decorators: [
|
|
applicationConfig({
|
|
providers: [{ provide: BigProfileStore, useValue: storeStub(failure(new Error('offline'))) }],
|
|
}),
|
|
],
|
|
};
|