curated2: !28
This commit is contained in:
commit
a65287de0f
24 files changed
+136
-11
No files matched your search
+3
-1
@@ -95,7 +95,8 @@ export const listRoutines = {
|
||||
emoji: r.emoji || null,
|
||||
exercise_count: (r.ex || []).length,
|
||||
superset_groups: [...new Set((r.ex || []).map(e => e.sg).filter(Boolean))].length || 0,
|
||||
policy: policyFor(null, r, 'reps')
|
||||
policy: policyFor(null, r, 'reps'),
|
||||
exclude_from_progression: r.excludeFromProgression === true
|
||||
}))
|
||||
}
|
||||
}
|
||||
@@ -117,6 +118,7 @@ export const getRoutine = {
|
||||
emoji: r.emoji || null,
|
||||
policy: policyFor(null, r, 'reps'),
|
||||
policy_name: policyName(policyFor(null, r, 'reps')),
|
||||
exclude_from_progression: r.excludeFromProgression === true,
|
||||
unit: S.unit || 'kg',
|
||||
exercises: (r.ex || []).map((cfg, i) => {
|
||||
const ex = exerciseOf(cfg.id, S)
|
||||
|
||||
@@ -71,6 +71,15 @@ describe('list_routines', () => {
|
||||
})
|
||||
})
|
||||
|
||||
test('reports progression exclusion in routine summaries and details', () => {
|
||||
S.routines[0].excludeFromProgression = true
|
||||
const summary = call('list_routines').routines.find(r => r.id === S.routines[0].id)
|
||||
const detail = call('get_routine', { routine_id: S.routines[0].id })
|
||||
|
||||
expect(summary.exclude_from_progression).toBe(true)
|
||||
expect(detail.exclude_from_progression).toBe(true)
|
||||
})
|
||||
|
||||
test('list_routines entries line up with get_routine (no id drift)', () => {
|
||||
const list = call('list_routines').routines
|
||||
list.forEach(summary => {
|
||||
|
||||
Reference in new issue
Block a user