2026-09-11 11:41:52 +02:00
|
|
|
/** Shared seed data for integration and e2e tests against a real ephemeral PocketBase. */
|
|
|
|
|
|
|
|
|
|
export interface FixtureCategory {
|
|
|
|
|
name: string
|
|
|
|
|
slug: string
|
2026-09-11 13:52:13 +02:00
|
|
|
nameEn?: string
|
2026-09-11 11:41:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface FixtureArticle {
|
|
|
|
|
title: string
|
|
|
|
|
slug: string
|
|
|
|
|
content: string
|
|
|
|
|
category: string
|
|
|
|
|
/** `null` = draft (never returned by the public API). */
|
|
|
|
|
publishedAt: string | null
|
|
|
|
|
authorName?: string
|
2026-09-11 13:52:13 +02:00
|
|
|
titleEn?: string
|
|
|
|
|
contentEn?: string
|
2026-09-11 11:41:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const FIXTURE_CATEGORIES: FixtureCategory[] = [
|
2026-09-11 13:52:13 +02:00
|
|
|
{ name: 'Economia', slug: 'economia', nameEn: 'Economy' },
|
2026-09-11 11:41:52 +02:00
|
|
|
{ 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',
|
2026-09-11 13:52:13 +02:00
|
|
|
titleEn: 'Published article',
|
|
|
|
|
contentEn: '# Title\n\nTest **markdown** body with [a link](https://example.com).',
|
2026-09-11 11:41:52 +02:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
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',
|
2026-09-11 13:52:13 +02:00
|
|
|
// Deliberately no English translation: exercises the untranslated path.
|
2026-09-11 11:41:52 +02:00
|
|
|
},
|
|
|
|
|
]
|