Fix the error-state regressions from the #164 verification (#171) (#173)

T8: the invalid-FEN flash is generic; the client message and FEN go to the
log. A2: an expired confirmation link says so and lands on log-in, where an
unconfirmed account resends the email. W3: the connection banner gains Reload
and Home actions. D1: a failed export logs and redirects to the data tab with
a support address instead of a bare 500. D2: an unknown export format renders
the styled 404. H1: the empty-database home CTA points at the guest trainer
instead of auth-gated /endgames. X2/X3: the importer hides inspect(reason)
behind generic copy and logs it.

Adds coverage for the T8 copy, A2 destination, D2 404 page, H1 CTA and the W3
actions; the H1 tests now restore the curated-code override so async page
tests cannot poison each other.
This commit is contained in:
2026-11-13 16:46:29 +01:00
committed by GitHub
parent 8934d191ad
commit aebb2aecfb
13 changed files with 103 additions and 27 deletions
@@ -326,6 +326,7 @@ defmodule ChesstrainerWeb.EndgameLive.PlayTest do
end
describe "chess_fen_invalid" do
@tag capture_log: true
test "shows a flash when the chessground hook reports an unparseable FEN", %{conn: conn} do
endgame = endgame_fixture()
seed_tablebase(endgame.fen)
@@ -339,8 +340,9 @@ defmodule ChesstrainerWeb.EndgameLive.PlayTest do
})
html = render(view)
assert html =~ "Endgame FEN is invalid"
assert html =~ "move number must be a positive integer"
assert html =~ "The board couldn't load this position. Reset to try again."
refute html =~ "Endgame FEN is invalid"
refute html =~ "move number must be a positive integer"
end
end