Correct Doris Barbell 7-7-7 and punch-out routines
This commit is contained in:
@@ -55,6 +55,18 @@ def test_dashboard_summary_seeds_john_and_manndra(tmp_path: Path) -> None:
|
||||
}
|
||||
assert '3 sets of 10 reps' in payload['routines'][0]['notes']
|
||||
assert 'Weights are still TBD' in payload['routines'][0]['notes']
|
||||
shoulders = next(routine for routine in payload['routines'] if routine['name'] == 'Thursday: Shoulders')
|
||||
assert shoulders['exercises'][6] == {
|
||||
'exercise_name': '7-7-7 Shoulder Press',
|
||||
'target_sets': 1,
|
||||
'target_reps': '7-7-7',
|
||||
}
|
||||
assert shoulders['exercises'][7] == {
|
||||
'exercise_name': 'Resistance Band Punch-Out Training',
|
||||
'target_sets': 3,
|
||||
'target_reps': '10',
|
||||
}
|
||||
assert 'resistance band punch-out training' in shoulders['notes']
|
||||
template_names = [template['name'] for template in payload['exercise_templates']]
|
||||
assert template_names == [
|
||||
'Resistance Band Crunches',
|
||||
@@ -546,6 +558,82 @@ def test_existing_seeded_routines_upgrade_prescriptions_to_three_by_ten(tmp_path
|
||||
assert 'Weights are still TBD' in monday['notes']
|
||||
|
||||
|
||||
def test_existing_seeded_shoulders_routine_gets_777_and_punch_out_corrections(tmp_path: Path) -> None:
|
||||
state_path = tmp_path / 'state.json'
|
||||
state_path.write_text(
|
||||
json.dumps(
|
||||
{
|
||||
'users': {
|
||||
'john': {
|
||||
'id': 'john',
|
||||
'display_name': 'John',
|
||||
'is_stub': False,
|
||||
'measurement_system': 'imperial',
|
||||
'height_inches': 68.5,
|
||||
'goal_weight_lbs': None,
|
||||
'notes': 'Legacy state',
|
||||
},
|
||||
'manndra': {
|
||||
'id': 'manndra',
|
||||
'display_name': 'Manndra',
|
||||
'is_stub': True,
|
||||
'measurement_system': 'imperial',
|
||||
'height_inches': None,
|
||||
'goal_weight_lbs': None,
|
||||
'notes': 'Legacy stub',
|
||||
},
|
||||
},
|
||||
'exercise_templates': [
|
||||
{
|
||||
'id': 'seed-template-25',
|
||||
'name': 'Resistance Band Punch-Out Holds',
|
||||
'primary_muscle': 'abs',
|
||||
'equipment': 'band',
|
||||
'notes': None,
|
||||
}
|
||||
],
|
||||
'routines': [
|
||||
{
|
||||
'id': 'seed-routine-04',
|
||||
'user_id': 'john',
|
||||
'name': 'Thursday: Shoulders',
|
||||
'notes': "Imported from John's current routine. Default prescription is 3 sets of 10 reps. Weights are still TBD. Includes resistance band punch-out ab holds.",
|
||||
'exercises': [
|
||||
{'exercise_name': 'Shoulder Press', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': 'Arnold Press', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': 'Side Lateral Raise', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': 'Front Lateral Raise', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': 'Upright Row', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': 'Shoulder Shrugs', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': '7-7-7 Shoulder Press', 'target_sets': 3, 'target_reps': '10'},
|
||||
{'exercise_name': 'Resistance Band Punch-Out Holds', 'target_sets': 3, 'target_reps': '10'},
|
||||
],
|
||||
}
|
||||
],
|
||||
'weight_entries': [],
|
||||
'measurement_entries': [],
|
||||
'workout_sessions': [],
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
client = make_client(tmp_path)
|
||||
payload = client.get('/api/dashboard/summary').json()
|
||||
|
||||
shoulders = next(routine for routine in payload['routines'] if routine['name'] == 'Thursday: Shoulders')
|
||||
assert shoulders['exercises'][6] == {
|
||||
'exercise_name': '7-7-7 Shoulder Press',
|
||||
'target_sets': 1,
|
||||
'target_reps': '7-7-7',
|
||||
}
|
||||
assert shoulders['exercises'][7] == {
|
||||
'exercise_name': 'Resistance Band Punch-Out Training',
|
||||
'target_sets': 3,
|
||||
'target_reps': '10',
|
||||
}
|
||||
assert 'resistance band punch-out training' in shoulders['notes']
|
||||
|
||||
|
||||
def test_weight_form_submission_redirects_and_updates_dashboard(tmp_path: Path) -> None:
|
||||
client = make_client(tmp_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user