Commit 3301f43
* fix(aluno): hint when finish button disabled by zero checks
CardTreino footer ganha <p> condicional data-testid finish-hint
quando completedCount === 0 e sem feedback loading. Sinaliza
pre-condicao (marque exercicios) para o botao Finalizar e Avaliar
Treino que parecia morto quando disabled.
Test: stateful mock useWorkoutTracker para toggle. 15/15 card-treino,
1134/1134 suite.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(workout): clamp duracaoMinutos to min 1 for Zod schema
HistoricoTreinoBaseSchema requires duracaoMinutos >= 1. Quick workouts
(<30s) rounded to 0, failing save and surfacing "ocorreu um erro
inesperado ao salvar no histórico" toast.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(aluno): address cubic P2 — aria-live, duration test, simpler mock
- card-treino.tsx: finish-hint gains aria-live="polite" so AT announces
reappearance when user unchecks last completed exercise.
- WorkoutSession.test.tsx: new test asserting onFinish receives
duracaoMinutos >= 1 even on sub-minute session (regression guard for
the Math.max(1, ...) clamp).
- card-treino.test.tsx: simplify "hides finish hint" test per cubic —
set mockReturnValue directly to { 'ex-1': true } + rerender; drop
mutable let, callback re-mock, fireEvent.click, silent no-op path.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Emiya Kiritsugu <emiyakiritsugu3@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 005f66e commit 3301f43
4 files changed
Lines changed: 74 additions & 2 deletions
File tree
- src/components
- dashboard/aluno
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
198 | 217 | | |
199 | 218 | | |
200 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
174 | 177 | | |
175 | 178 | | |
176 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
215 | 256 | | |
216 | 257 | | |
217 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
| |||
0 commit comments