mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
* Show rating changes in flashes and session UI (#146) - Flash the new rating and delta on every rated completion, with a dedicated success flash kind for solved puzzles - Move flash notifications to the top-left - Add a colour-coded rating-change pill and show the current rating with the session's net change in the train session bar - Show the user's rating and change beside the puzzle rating after an attempt, and show the finishing rating in the last-session summary * fix header component and start reusing it * Hide the sign-up link on the prelaunch admin login The header refactor dropped the @prelaunch guard, so the gated admin login linked to the public registration page again.
This commit is contained in:
@@ -149,6 +149,11 @@ defmodule ChesstrainerWeb.EndgameLive.TrainTest do
|
||||
assert assigns.last_rating_delta > 0
|
||||
assert assigns.user_rating > 1500.0
|
||||
assert assigns.user_deviation < 350.0
|
||||
|
||||
assert has_element?(view, "#session-rating")
|
||||
assert has_element?(view, "#session-rating-change")
|
||||
assert has_element?(view, "#rating-change")
|
||||
assert render(view) =~ "Your rating is now"
|
||||
end
|
||||
|
||||
test "loads a different puzzle on next", %{conn: conn} do
|
||||
@@ -205,6 +210,7 @@ defmodule ChesstrainerWeb.EndgameLive.TrainTest do
|
||||
assert last.count == 1
|
||||
assert is_float(last.gain)
|
||||
assert last.gain > 0
|
||||
assert last.rating > 1500.0
|
||||
assert last.duration_ms >= 0
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user