Write proper FAQ page intro; drop dead faqs-embed from tests
This commit is contained in:
1 parent
e38ebf078d
commit
cb345975cb
5 files changed
+47
-22
No files matched your search
@@ -85,18 +85,19 @@ public sealed class RouteSmokeTests : IDisposable
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Faqs_route_renders_the_grouped_list()
|
||||
public async Task Faqs_route_renders_the_topic_list()
|
||||
{
|
||||
// /faqs is a literal route (FaqList) that must win over the /{Slug}
|
||||
// catch-all content page. Assert it shows the FAQ list, grouped by topic
|
||||
// from the seeded questions, not a content page body.
|
||||
// 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.
|
||||
var client = _factory.CreateClient();
|
||||
|
||||
var html = await client.GetStringAsync(new Uri("/faqs", UriKind.Relative));
|
||||
|
||||
html.ShouldContain("Häufige Fragen");
|
||||
html.ShouldContain("Wann gibt es Mittagessen?");
|
||||
html.ShouldContain("Mensa und Mittagessen"); // German topic heading
|
||||
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
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -129,16 +130,14 @@ public sealed class RouteSmokeTests : IDisposable
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Content_page_renders_the_embed_its_page_opts_into()
|
||||
public async Task Content_page_renders_its_body()
|
||||
{
|
||||
// /patrons is a catch-all content page whose embed field is ["faqs"], so it
|
||||
// shows its body plus the FAQ teaser -- proving the ContentPage embed path.
|
||||
// /patrons is a catch-all content page (the /{Slug} route). Assert it renders
|
||||
// its Markdown body, proving the ContentPage path works for an arbitrary slug.
|
||||
var client = _factory.CreateClient();
|
||||
|
||||
var html = await client.GetStringAsync(new Uri("/patrons", UriKind.Relative));
|
||||
|
||||
html.ShouldContain("Förderverein"); // the page body
|
||||
html.ShouldContain("Häufige Fragen"); // faqs embed heading
|
||||
html.ShouldContain("Wann gibt es Mittagessen?"); // a seeded question
|
||||
html.ShouldContain("Förderverein"); // the page body, rendered from Markdown
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user