48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
/** Shared seed data for integration and e2e tests against a real ephemeral PocketBase. */
|
|||
|
|
|
||
|
|
export interface FixtureCategory {
|
||
|
|
name: string
|
||
|
|
slug: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface FixtureArticle {
|
||
|
|
title: string
|
||
|
|
slug: string
|
||
|
|
content: string
|
||
|
|
category: string
|
||
|
|
/** `null` = draft (never returned by the public API). */
|
||
|
|
publishedAt: string | null
|
||
|
|
authorName?: string
|
||
|
|
}
|
||
|
|
|
||
|
|
export const FIXTURE_CATEGORIES: FixtureCategory[] = [
|
||
|
|
{ name: 'Economia', slug: 'economia' },
|
||
|
|
{ name: 'Attualità', slug: 'attualita' },
|
||
|
|
]
|
||
|
|
|
||
|
|
export const FIXTURE_ARTICLES: FixtureArticle[] = [
|
||
|
|
{
|
||
|
|
title: 'Articolo pubblicato',
|
||
|
|
slug: 'articolo-pubblicato',
|
||
|
|
content: '# Titolo\n\nCorpo **markdown** di prova con [un link](https://example.com).',
|
||
|
|
category: 'economia',
|
||
|
|
publishedAt: '2025-01-15 10:00:00',
|
||
|
|
authorName: 'Redazione',
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: 'Articolo in bozza',
|
||
|
|
slug: 'articolo-bozza',
|
||
|
|
content: 'Contenuto non ancora pubblicato.',
|
||
|
|
category: 'economia',
|
||
|
|
publishedAt: null,
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: 'Secondo articolo pubblicato',
|
||
|
|
slug: 'secondo-articolo',
|
||
|
|
content: 'Un altro articolo pubblicato, in un\'altra categoria.',
|
||
|
|
category: 'attualita',
|
||
|
|
publishedAt: '2025-02-01 08:00:00',
|
||
|
|
authorName: 'Redazione',
|
||
|
|
},
|
||
|
|
]
|