[OCaml] High Intensity Training Online
fix Title home page Next Workout
Changed files
lib/presenter/pages_routine.ml
@@ -158,7 +158,7 @@
158
158
in
159
159
html_page ~viewer ~request ~active:"home" "Home"
160
160
([
161
Removed:
tag "h1" [] [ txt "%s" vm.routine_name ];
161
Added:
tag "h1" [] [ txt "Next Workout" ];
162
162
upcoming_workout_card vm.next_workout;
163
163
tag "p" [] [ txt "%s" status ];
164
164
]
test/web/overview.ml
@@ -53,6 +53,11 @@
53
53
let trainee = the_trainee repo ~username:"lifter" in
54
54
let token = Option.get (csrf_token (body (get c "/"))) in
55
55
let _ = post c "/routines/ideal/select" [ ("dream.csrf", token) ] in
56
Added:
let selected_home = body (get c "/") in
57
Added:
Alcotest.(check bool)
58
Added:
"Home shows the next workout title" true
59
Added:
(Option.is_some
60
Added:
(index_from ~needle:"Next Workout" selected_home 0));
56
61
let header =
57
62
"title,start_time,end_time,description,exercise_title,superset_id,exercise_notes,set_index,set_type,weight_kg,reps,distance_km,duration_seconds,rpe\r\n"
58
63
in