RD-03 moved the dashboard page to overzicht/ui/overzicht.page.ts and left four sections in registratie/ui/dashboard/. The folder was named after a page that lives in another context. A reader who opened it found four sections that are not the dashboard. The folder is now overzicht-secties/ — registratie's sections for the overzicht page. The alias does not change, because the sections stay in the registratie context. The story titles do not change, because they name the context. Five documents cited registratie/ui/dashboard.page.ts, a file that RD-03 renamed. They now name overzicht.page.ts, or the section that owns the behaviour they describe. The /dashboard route keeps its path. It is a user-visible URL. npm run ci --full passes: 67 and 45 storybook suites, 306 axe tests. Co-Authored-By: Claude Opus 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'))) }],
|
|
}),
|
|
],
|
|
};
|