refactor: story titles to Domein/<Context>/<Name>; add 2 missing stories (RD-04)
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>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import type { Meta, StoryObj } from '@storybook/angular';
|
||||
import { applicationConfig } from '@storybook/angular';
|
||||
import { provideRouter } from '@angular/router';
|
||||
import { WatWiltUDoenSection } from './wat-wilt-u-doen.section';
|
||||
import { FeatureFlagStore } from '@shared/application/feature-flags.store';
|
||||
|
||||
const meta: Meta<WatWiltUDoenSection> = {
|
||||
title: 'Domein/Overzicht/Wat Wilt U Doen',
|
||||
component: WatWiltUDoenSection,
|
||||
decorators: [applicationConfig({ providers: [provideRouter([])] })],
|
||||
};
|
||||
export default meta;
|
||||
type Story = StoryObj<WatWiltUDoenSection>;
|
||||
|
||||
export const InschrijvingOpen: Story = {
|
||||
decorators: [
|
||||
applicationConfig({
|
||||
providers: [{ provide: FeatureFlagStore, useValue: { enabled: () => true } }],
|
||||
}),
|
||||
],
|
||||
};
|
||||
export const InschrijvingDicht: Story = {
|
||||
decorators: [
|
||||
applicationConfig({
|
||||
providers: [{ provide: FeatureFlagStore, useValue: { enabled: () => false } }],
|
||||
}),
|
||||
],
|
||||
};
|
||||
@@ -34,7 +34,7 @@ function storeStub(aanvragen: RemoteData<Error | undefined, Aanvraag[]>, lastErr
|
||||
}
|
||||
|
||||
const meta: Meta<MijnAanvragenSection> = {
|
||||
title: 'Domein/Registratie/Dashboard/Mijn Aanvragen',
|
||||
title: 'Domein/Registratie/Mijn Aanvragen',
|
||||
component: MijnAanvragenSection,
|
||||
decorators: [applicationConfig({ providers: [provideRouter([])] })],
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ function storeStub(profileRd: RemoteData<Error | undefined, BigProfile>) {
|
||||
}
|
||||
|
||||
const meta: Meta<MijnRegistratieSection> = {
|
||||
title: 'Domein/Registratie/Dashboard/Mijn Registratie',
|
||||
title: 'Domein/Registratie/Mijn Registratie',
|
||||
component: MijnRegistratieSection,
|
||||
};
|
||||
export default meta;
|
||||
|
||||
@@ -17,7 +17,7 @@ function storeStub(aantekeningen: RemoteData<Error | undefined, Aantekening[]>)
|
||||
}
|
||||
|
||||
const meta: Meta<SpecialismenSection> = {
|
||||
title: 'Domein/Registratie/Dashboard/Specialismen',
|
||||
title: 'Domein/Registratie/Specialismen',
|
||||
component: SpecialismenSection,
|
||||
};
|
||||
export default meta;
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
import type { Meta, StoryObj } from '@storybook/angular';
|
||||
import { applicationConfig } from '@storybook/angular';
|
||||
import { WatMoetIkRegelenSection } from './wat-moet-ik-regelen.section';
|
||||
import { BigProfileStore } from '@registratie/application/big-profile.store';
|
||||
import { BigProfile } from '@registratie/domain/big-profile';
|
||||
import { HerregistratieDecisions } from '@registratie/domain/registration';
|
||||
import { RemoteData } from '@shared/application/remote-data';
|
||||
import { loading, success } from '@shared/testing/remote-data';
|
||||
|
||||
const profile: BigProfile = {
|
||||
registration: {
|
||||
bigNummer: '19012345601',
|
||||
naam: 'Dr. A. (Anna) de Vries',
|
||||
beroep: 'Arts',
|
||||
registratiedatum: '2012-09-01',
|
||||
geboortedatum: '1985-03-14',
|
||||
status: { tag: 'Geregistreerd', herregistratieDatum: '2027-09-01' },
|
||||
},
|
||||
person: {
|
||||
naam: 'Dr. A. (Anna) de Vries',
|
||||
geboortedatum: '1985-03-14',
|
||||
adres: { straat: 'Rijksweg 1', postcode: '2514 EA', woonplaats: 'Den Haag' },
|
||||
},
|
||||
};
|
||||
|
||||
/** Minimal store stand-in — only the members the section's template and class read. */
|
||||
function storeStub(
|
||||
profileRd: RemoteData<Error | undefined, BigProfile>,
|
||||
decisionsRd: RemoteData<Error | undefined, HerregistratieDecisions>,
|
||||
pendingHerregistratie: boolean,
|
||||
) {
|
||||
return {
|
||||
profile: () => profileRd,
|
||||
decisions: () => decisionsRd,
|
||||
pendingHerregistratie: () => pendingHerregistratie,
|
||||
reloadProfile: () => {},
|
||||
};
|
||||
}
|
||||
|
||||
const meta: Meta<WatMoetIkRegelenSection> = {
|
||||
title: 'Domein/Registratie/Wat Moet Ik Regelen',
|
||||
component: WatMoetIkRegelenSection,
|
||||
};
|
||||
export default meta;
|
||||
type Story = StoryObj<WatMoetIkRegelenSection>;
|
||||
|
||||
export const Loading: Story = {
|
||||
decorators: [
|
||||
applicationConfig({
|
||||
providers: [{ provide: BigProfileStore, useValue: storeStub(loading(), loading(), false) }],
|
||||
}),
|
||||
],
|
||||
};
|
||||
export const MetTaken: Story = {
|
||||
decorators: [
|
||||
applicationConfig({
|
||||
providers: [
|
||||
{
|
||||
provide: BigProfileStore,
|
||||
useValue: storeStub(
|
||||
success(profile),
|
||||
success({ eligibleForHerregistratie: true }),
|
||||
false,
|
||||
),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
parameters: {
|
||||
// Structural: app-choice-link's host sits between the keuzelijst <ul> and its <li>
|
||||
// — axe's list/listitem rule needs them adjacent regardless of `display:contents`.
|
||||
// Same pre-existing gap as task-list.stories.ts and choice-list.stories.ts. WP-11
|
||||
// (CIBG markup fidelity) reworks this markup; see
|
||||
// docs/project/backlog/WP-11-markup-fidelity.md.
|
||||
a11y: { disable: true },
|
||||
},
|
||||
};
|
||||
export const NietsOpenstaand: Story = {
|
||||
decorators: [
|
||||
applicationConfig({
|
||||
providers: [
|
||||
{
|
||||
provide: BigProfileStore,
|
||||
useValue: storeStub(
|
||||
success(profile),
|
||||
success({ eligibleForHerregistratie: false }),
|
||||
false,
|
||||
),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
};
|
||||
export const InBehandeling: Story = {
|
||||
decorators: [
|
||||
applicationConfig({
|
||||
providers: [
|
||||
{
|
||||
provide: BigProfileStore,
|
||||
useValue: storeStub(
|
||||
success(profile),
|
||||
success({ eligibleForHerregistratie: false }),
|
||||
true,
|
||||
),
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user