Serve the home nav link from PocketBase, not a hard-coded copy
This commit is contained in:
1 parent
1bdb026669
commit
3fd4068762
8 files changed
+26
-40
No files matched your search
@@ -220,14 +220,14 @@ public sealed class PocketBaseFixture : IAsyncLifetime
|
||||
private static async Task SeedRecordsAsync(HttpClient http)
|
||||
{
|
||||
// Pages that the route smoke tests reach through the navigation, the
|
||||
// footer or the FAQ hub. Header pages carry a location+order; the FAQ
|
||||
// sub-pages are plain content pages without a menu slot. All public.
|
||||
// The home page has no menu slot (location ""): the site brand is the home
|
||||
// link, so a separate "Start" nav entry would be redundant.
|
||||
// footer or the FAQ hub. Every page carries a location ("header" or
|
||||
// "footer") -- the field is required, matching production. All public.
|
||||
// The home page sits in the header at order 1, like production; the brand
|
||||
// links home too, but the nav entry is the single source of the home link.
|
||||
await CreateRecordAsync(http, "pages", new
|
||||
{
|
||||
title = "Startseite", body = "# Willkommen", location = "",
|
||||
order = 0, slug = "home", embed = new[] { "posts", "events" }, @public = true,
|
||||
title = "Start", body = "# Willkommen", location = "header",
|
||||
order = 1, slug = "home", embed = new[] { "posts", "events" }, @public = true,
|
||||
});
|
||||
await CreateRecordAsync(http, "pages", new
|
||||
{
|
||||
@@ -253,10 +253,13 @@ public sealed class PocketBaseFixture : IAsyncLifetime
|
||||
title = "Downloads", body = "# Downloads", location = "header",
|
||||
order = 5, slug = "downloads", embed = Array.Empty<string>(), @public = true,
|
||||
});
|
||||
// A plain content page reached only by its slug (not shown in the header),
|
||||
// so the catch-all "/{slug}" ContentPage route stays covered. It carries a
|
||||
// valid location because the field is required; footer keeps it low-key.
|
||||
await CreateRecordAsync(http, "pages", new
|
||||
{
|
||||
title = "FAQ Mensa", body = "# Mensa", location = "",
|
||||
order = 0, slug = "faq-lunch", embed = Array.Empty<string>(), @public = true,
|
||||
title = "FAQ Mensa", body = "# Mensa", location = "footer",
|
||||
order = 9, slug = "faq-lunch", embed = Array.Empty<string>(), @public = true,
|
||||
});
|
||||
await CreateRecordAsync(http, "pages", new
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user