let the difficulty picker be closed

Add an X in the corner and a Cancel button, both returning home, so a user
who opens /train without wanting a session is not stuck in the modal.
This commit is contained in:
2026-11-05 15:50:17 +01:00
parent 84eee4057e
commit 1b44dae378
2 changed files with 21 additions and 4 deletions
@@ -85,6 +85,8 @@ defmodule ChesstrainerWeb.EndgameLive.TrainTest do
assert has_element?(view, "#difficulty-easy")
assert has_element?(view, "#difficulty-medium")
assert has_element?(view, "#difficulty-hard")
assert has_element?(view, "#close-difficulty[href='/']")
assert has_element?(view, "a", "Cancel")
assert render(view) =~ "Choose a difficulty"
end