fix(web): CI E2E — resilient blog/RSS without Supabase + update stale test

The dynamic /blog/rss.xml returned 500 in CI (no Supabase env) and the E2E
still asserted the old static feed's hand-written items.

- /blog, /blog/[slug], and /blog/rss.xml now degrade gracefully (empty feed/
  list, HTTP 200) when Supabase is unavailable, instead of throwing.
- E2E: assert the always-present channel <title>LogicSRC Blog</title> and a
  looser xml content-type, dropping the removed static post titles.

Verified with `next dev` and no Supabase env (CI conditions): rss/blog/sitemap
all return 200.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-06-08 13:00:51 +00:00
parent 74abf8985f
commit e47616bf9d
4 changed files with 42 additions and 26 deletions

View file

@ -61,8 +61,9 @@ test.describe("LogicSRC PWA", () => {
await expect(sitemap.text()).resolves.toContain("https://logicsrc.com/hire-us");
expect(rss.status()).toBe(200);
expect(rss.headers()["content-type"]).toMatch(/(?:application|text)\/xml/);
await expect(rss.text()).resolves.toContain("LogicSRC OpenSpec Compatibility");
await expect(rss.text()).resolves.toContain("LogicSRC Credential Sharing OpenSpec");
expect(rss.headers()["content-type"]).toMatch(/xml/);
// Feed is generated from the blog_posts table; the channel header is always
// present even when there are no posts (e.g. CI without Supabase).
await expect(rss.text()).resolves.toContain("<title>LogicSRC Blog</title>");
});
});