Implemented phase 5 for the POC prototype in the Website service.

This commit is contained in:
javier committed 2026-09-21 13:32:05 +02:00
1 parent 89a7a7b8e5
commit 31d2d98d49
46 files changed
+4039 -162

No files matched your search

@@ -35,13 +35,23 @@ struct SiteHeaderTests {
#expect(html.contains(#"href="/sell""#))
#expect(html.contains(">MV<"))
#expect(html.contains(">Mara<"))
#expect(html.contains(#"action="/sign-out" method="post""#))
// Signing out lives on the account screen.
#expect(!html.contains("/sign-out"))
#expect(!html.contains(#"href="/sign-in""#))
}
@Test
func `links the shop of a seller alone`() {
#expect(!SiteHeader(viewer: .init(displayName: "Mara")).render().contains(#"href="/sell""#))
func `leads a seller to their shop, and anyone else to opening one`() {
let buyer = SiteHeader(viewer: .init(displayName: "Mara")).render()
#expect(!buyer.contains(#"href="/sell""#))
#expect(buyer.contains(#"href="/sell/open-a-shop""#))
#expect(buyer.contains(">Open a shop<"))
}
@Test
func `counts one new match in the singular`() {
#expect(SiteHeader(viewer: .init(displayName: "Mara", newWantMatches: 1)).render().contains(#"aria-label="Want list, 1 new match""#))
}
@Test