Show FAQ topics as an in-page accordion instead of drill-down pages

This commit is contained in:
tleininger committed 2026-09-30 16:21:49 +02:00
1 parent cb345975cb
commit eacf95e041
7 files changed
+79 -162

No files matched your search

+5 -5
View File
@@ -85,19 +85,19 @@ public sealed class RouteSmokeTests : IDisposable
}
[Fact]
public async Task Faqs_route_renders_the_topic_list()
public async Task Faqs_route_renders_the_topic_accordion()
{
// /faqs is a literal route (FaqList) that must win over the /{Slug}
// catch-all content page. It reads the "faqs" page for heading and intro
// and lists the topics as cards linking to their own pages. The individual
// questions live on the topic pages (/faqs/{slug}), not here.
// and renders each topic as a collapsible group with its questions nested
// inside, so both the topic headings and the questions are in the markup.
var client = _factory.CreateClient();
var html = await client.GetStringAsync(new Uri("/faqs", UriKind.Relative));
html.ShouldContain("FAQs"); // heading from the page title
html.ShouldContain("Mensa und Mittagessen"); // German topic heading (a card)
html.ShouldContain("href=\"/faqs/cafeteria\""); // card links to the topic page
html.ShouldContain("Mensa und Mittagessen"); // German topic heading (a group)
html.ShouldContain("Wann gibt es Mittagessen?"); // a question nested in the group
}
[Fact]