improve error pages: minimal version when site not live
All checks were successful
deploy / deploy (push) Successful in 1m19s

Show a lightweight error page using admin.css when the shop isn't
live yet, avoiding broken theme dependencies. Also tidied up copy
to sentence case and shorter descriptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-20 22:19:21 +00:00
parent 2563338a6a
commit b06029079d
2 changed files with 46 additions and 14 deletions

View File

@@ -4,17 +4,15 @@ defmodule BerrypodWeb.ErrorHTMLTest do
# Bring render_to_string/4 for testing custom views
import Phoenix.Template, only: [render_to_string: 4]
test "renders 404.html with themed page" do
test "renders 404.html" do
html = render_to_string(BerrypodWeb.ErrorHTML, "404", "html", [])
assert html =~ "404"
assert html =~ "Page Not Found"
assert html =~ "shop-root"
assert html =~ "Page not found"
end
test "renders 500.html with themed page" do
test "renders 500.html" do
html = render_to_string(BerrypodWeb.ErrorHTML, "500", "html", [])
assert html =~ "500"
assert html =~ "Server Error"
assert html =~ "shop-root"
assert html =~ "Server error"
end
end