fix Remove ready recovery notice

Commit
851984afc4661fa88ded9d09255f6f3631d0cc2c
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/presenter/pages_routine.ml
index bbfdbc6b..2ad60ba2 100644..100644
@@ -106,13 +106,13 @@
106 106 let status, gate =
107 107 match vm.gate with
108 108 | View_model.Home.Ready ->
109 Removed: ( "Recovery is complete.",
109 Added: ( None,
110 110 [
111 111 begin_form request ~routine_id:vm.routine_id ~override:false
112 112 "Begin next workout";
113 113 ] )
114 114 | View_model.Home.Recovering { status } ->
115 Removed: ( status,
115 Added: ( Some status,
116 116 [
117 117 tag "div"
118 118 [ class_ "warn" ]
@@ -127,10 +127,10 @@
127 127 in
128 128 html_page ~viewer ~request ~active:"home" "Home"
129 129 ([
130 Removed: tag "h1" [] [ txt "Next Workout" ];
131 Removed: upcoming_workout_card vm.next_workout;
132 Removed: tag "p" [] [ txt "%s" status ];
130 Added: tag "h1" [] [ txt "Next Workout" ]; upcoming_workout_card vm.next_workout;
133 131 ]
132 Added: @ Option.to_list
133 Added: (Option.map (fun text -> tag "p" [] [ txt "%s" text ]) status)
134 134 @ gate)
135 135
136 136 (* Home while a workout is in progress. Rather than the recovery gate or the
test/web/overview.ml
index 84353fc1..901dd10b 100644..100644
@@ -59,6 +59,15 @@
59 59 (Option.is_some
60 60 (index_from ~needle:"Next Workout" selected_home 0));
61 61 Alcotest.(check bool)
62 Added: "Home does not repeat the complete recovery notice" false
63 Added: (Option.is_some
64 Added: (index_from ~needle:"Recovery is complete." selected_home 0));
65 Added: Alcotest.(check bool)
66 Added: "Home offers the next workout action" true
67 Added: (Option.is_some
68 Added: (index_from ~needle:"value=\"Begin next workout\""
69 Added: selected_home 0));
70 Added: Alcotest.(check bool)
62 71 "Selected Home does not offer the Account affordance" false
63 72 (Option.is_some (index_from ~needle:"Account" selected_home 0));
64 73 Alcotest.(check bool)