2026-02-03 08:56:11 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
feat(web): update all features, stories, e2e tests, and auth interceptor
Update auth, playlists, tracks, search, profile, dashboard, player,
settings, and social features. Add e2e audit specs for all major pages.
Update ESLint config, vitest config, and route configuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 17:16:36 +00:00
|
|
|
import { fn } from 'storybook/test';
|
2026-02-03 08:56:11 +00:00
|
|
|
import { ChangeUsernameModal } from './ChangeUsernameModal';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ChangeUsernameModal - Modal de changement de nom d'utilisateur
|
|
|
|
|
*
|
|
|
|
|
* Modal permettant de changer le nom d'utilisateur avec
|
|
|
|
|
* vérification de disponibilité en temps réel.
|
|
|
|
|
*/
|
|
|
|
|
const meta: Meta<typeof ChangeUsernameModal> = {
|
2026-02-05 13:20:06 +00:00
|
|
|
title: 'Components/Features/Settings/Account/ChangeUsernameModal',
|
2026-02-03 08:56:11 +00:00
|
|
|
component: ChangeUsernameModal,
|
|
|
|
|
parameters: {
|
|
|
|
|
layout: 'centered',
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
component: 'Modal de changement de nom d\'utilisateur avec vérification.',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
args: {
|
|
|
|
|
onClose: fn(),
|
|
|
|
|
},
|
|
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
2026-02-07 14:10:32 +00:00
|
|
|
<div className="bg-background min-h-screen flex items-center justify-center">
|
2026-02-03 08:56:11 +00:00
|
|
|
<Story />
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* État par défaut de la modal.
|
|
|
|
|
*/
|
|
|
|
|
export const Default: Story = {
|
|
|
|
|
name: 'Par défaut',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* État de vérification de disponibilité.
|
|
|
|
|
*/
|
|
|
|
|
export const Checking: Story = {
|
|
|
|
|
name: 'Vérification',
|
|
|
|
|
parameters: {
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
story: 'Spinner pendant la vérification de disponibilité.',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* État nom disponible.
|
|
|
|
|
*/
|
|
|
|
|
export const Available: Story = {
|
|
|
|
|
name: 'Disponible',
|
|
|
|
|
parameters: {
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
story: 'Indicateur vert quand le nom est disponible.',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|