feat(app): app page at /, mockup gallery moved to /mockups/
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c11c2ef079
commit
3235df8bea
10 files changed
+53
-12
No files matched your search
+18
-4
@@ -10,15 +10,15 @@ afterAll(() => server.stop(true));
|
||||
|
||||
test("registry has 17 mockups", () => expect(mockups).toHaveLength(17));
|
||||
|
||||
test("index links every mockup", async () => {
|
||||
const res = await fetch(base + "/");
|
||||
test("gallery links every mockup", async () => {
|
||||
const res = await fetch(base + "/mockups/");
|
||||
expect(res.status).toBe(200);
|
||||
const html = await res.text();
|
||||
for (const m of mockups) expect(html).toContain(`/mockups/${m.slug}/`);
|
||||
});
|
||||
|
||||
test("index shows every registry name, pitch and tryThis", async () => {
|
||||
const html = (await (await fetch(base + "/")).text()).replaceAll("&", "&");
|
||||
test("gallery shows every registry name, pitch and tryThis", async () => {
|
||||
const html = (await (await fetch(base + "/mockups/")).text()).replaceAll("&", "&");
|
||||
for (const m of mockups) for (const text of [m.name, m.pitch, m.tryThis]) expect(html).toContain(text);
|
||||
});
|
||||
|
||||
@@ -34,3 +34,17 @@ for (const m of mockups) {
|
||||
else expect(res.status).toBe(200);
|
||||
});
|
||||
}
|
||||
|
||||
test("the app is served at / with the credits hook", async () => {
|
||||
const res = await fetch(base + "/");
|
||||
expect(res.status).toBe(200);
|
||||
const html = await res.text();
|
||||
expect(html).toContain('id="voyage-app"');
|
||||
expect(html).toContain("data-fan-credits");
|
||||
});
|
||||
|
||||
test("/mockups redirects to the gallery", async () => {
|
||||
const res = await fetch(base + "/mockups", { redirect: "manual" });
|
||||
expect(res.status).toBe(302);
|
||||
expect(res.headers.get("location")).toContain("/mockups/");
|
||||
});
|
||||
Reference in new issue
Block a user