Skip to content

Offline gym log for Android. No account, no ads, no internet.

fix(catalog): update primary and secondary muscles for compound exercises

NullX5e0e516976cb
diff --git a/lib/catalog/exercise_catalog.dart b/lib/catalog/exercise_catalog.dart
index 5e78f15..5533e55 100644
--- a/lib/catalog/exercise_catalog.dart
+++ b/lib/catalog/exercise_catalog.dart
@@ -37,7 +37,7 @@ const List<Exercise> kExercises = [
id: '3TZduzM',
name: 'Barbell Incline Bench Press',
primary: 'chest',
- secondary: ['triceps'],
+ secondary: ['triceps', 'shoulders'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'incline-bench-press',
@@ -53,7 +53,7 @@ const List<Exercise> kExercises = [
id: 'ns0SIbU',
name: 'Dumbbell Incline Bench Press',
primary: 'chest',
- secondary: ['triceps'],
+ secondary: ['triceps', 'shoulders'],
equipment: 'Dumbbell',
difficulty: 'Intermediate',
art: 'incline-dumbbell-press',
@@ -288,7 +288,7 @@ const List<Exercise> kExercises = [
id: 'ila4NZS',
name: 'Barbell Deadlift',
primary: 'glutes',
- secondary: ['hamstrings', 'lowerback'],
+ secondary: ['hamstrings', 'lowerback', 'quads', 'trapezius'],
equipment: 'Barbell',
difficulty: 'Advanced',
art: 'deadlift',
@@ -303,8 +303,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'wQ2c4XD',
name: 'Barbell Romanian Deadlift',
- primary: 'glutes',
- secondary: ['hamstrings', 'lowerback'],
+ primary: 'hamstrings',
+ secondary: ['glutes', 'lowerback'],
equipment: 'Barbell',
difficulty: 'Advanced',
art: 'romanian-deadlift',
@@ -320,7 +320,7 @@ const List<Exercise> kExercises = [
id: 'KgI0tqW',
name: 'Barbell Sumo Deadlift',
primary: 'glutes',
- secondary: ['hamstrings', 'lowerback'],
+ secondary: ['hamstrings', 'lowerback', 'quads'],
equipment: 'Barbell',
difficulty: 'Advanced',
art: 'sumo-deadlift',
@@ -447,8 +447,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'qXTaZnJ',
name: 'Barbell Full Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'squat',
@@ -463,8 +463,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'zG0zs85',
name: 'Barbell Front Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'front-squat',
@@ -511,8 +511,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'RRWFUcw',
name: 'Dumbbell Lunge',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Dumbbell',
difficulty: 'Intermediate',
art: 'walking-lunge',
@@ -544,7 +544,7 @@ const List<Exercise> kExercises = [
id: 'XlZ4lAC',
name: 'Barbell Good Morning',
primary: 'hamstrings',
- secondary: ['lowerback'],
+ secondary: ['glutes', 'lowerback'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'good-morning',
@@ -2270,8 +2270,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'CqhoytW',
name: 'Smith Hip Thrust',
- primary: 'abdomen',
- secondary: ['glutes', 'hamstrings'],
+ primary: 'glutes',
+ secondary: ['hamstrings'],
equipment: 'Machine',
difficulty: 'Beginner',
art: 'smith-machine-hip-thrust',
@@ -3916,7 +3916,7 @@ const List<Exercise> kExercises = [
id: 'J6Dx1Mu',
name: 'Barbell Close-grip Bench Press',
primary: 'triceps',
- secondary: [],
+ secondary: ['chest'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'close-grip-bench-press',
@@ -4027,7 +4027,7 @@ const List<Exercise> kExercises = [
id: 'WcHl7ru',
name: 'Smith Close-grip Bench Press',
primary: 'triceps',
- secondary: [],
+ secondary: ['chest'],
equipment: 'Machine',
difficulty: 'Beginner',
art: 'smith-close-grip-bench-press',
@@ -4233,8 +4233,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'mnzcrIB',
name: 'Dumbbell Bench Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Dumbbell',
difficulty: 'Intermediate',
art: 'dumbbell-bench-squat',
@@ -4249,8 +4249,8 @@ const List<Exercise> kExercises = [
Exercise(
id: '1bQkKZK',
name: 'Smith Good Morning',
- primary: 'glutes',
- secondary: ['hamstrings', 'lowerback'],
+ primary: 'hamstrings',
+ secondary: ['glutes', 'lowerback'],
equipment: 'Machine',
difficulty: 'Beginner',
art: 'smith-good-morning',
@@ -4265,8 +4265,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'GWoKnIm',
name: 'Weighted Cossack Squats',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Weighted',
difficulty: 'Intermediate',
art: 'cossack-squat',
@@ -4297,8 +4297,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'UfePqpx',
name: 'Smith Romanian Deadlift',
- primary: 'glutes',
- secondary: ['hamstrings', 'lowerback'],
+ primary: 'hamstrings',
+ secondary: ['glutes', 'lowerback'],
equipment: 'Machine',
difficulty: 'Advanced',
art: 'smith-machine-romanian-deadlift',
@@ -4329,8 +4329,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'ecl28tP',
name: 'Dumbbell Contralateral Forward Lunge',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Dumbbell',
difficulty: 'Intermediate',
art: 'forward-lunge',
@@ -4361,8 +4361,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'vR1vold',
name: 'Zercher Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'zercher-squat',
@@ -4377,8 +4377,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'nUwVh7b',
name: 'Dumbbell Romanian Deadlift',
- primary: 'glutes',
- secondary: ['hamstrings', 'lowerback'],
+ primary: 'hamstrings',
+ secondary: ['glutes', 'lowerback'],
equipment: 'Dumbbell',
difficulty: 'Advanced',
art: 'dumbbell-romanian-deadlift',
@@ -4393,8 +4393,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'NNoHCEA',
name: 'Smith Full Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Machine',
difficulty: 'Beginner',
art: 'smith-machine-squat',
@@ -4409,8 +4409,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'ZuPXtCK',
name: 'Smith Hack Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Machine',
difficulty: 'Beginner',
art: 'smith-hack-squat',
@@ -4425,8 +4425,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'wfotm7S',
name: 'Bodyweight Drop Jump Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Bodyweight',
difficulty: 'Intermediate',
art: 'jump-squat',
@@ -4441,8 +4441,8 @@ const List<Exercise> kExercises = [
Exercise(
id: '5VCj6iH',
name: 'Barbell Hack Squat',
- primary: 'glutes',
- secondary: ['hamstrings', 'calves'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings', 'calves'],
equipment: 'Barbell',
difficulty: 'Intermediate',
art: 'barbell-hack-squat',
@@ -4649,8 +4649,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'dumbbell-sumo-squat',
name: 'Dumbbell Sumo Squat',
- primary: 'glutes',
- secondary: ['quads', 'hamstrings'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings'],
equipment: 'Dumbbell',
difficulty: 'Beginner',
art: 'dumbbell-sumo-squat',
@@ -4665,8 +4665,8 @@ const List<Exercise> kExercises = [
Exercise(
id: 'deficit-reverse-lunge',
name: 'Deficit Reverse Lunge',
- primary: 'glutes',
- secondary: ['quads', 'hamstrings'],
+ primary: 'quads',
+ secondary: ['glutes', 'hamstrings'],
equipment: 'Dumbbell',
difficulty: 'Advanced',
art: 'deficit-reverse-lunge',
@@ -7448,8 +7448,20 @@ const List<ToolMeta> kToolMeta = [
];
const List<String> kFilterMuscles = [
- 'chest', 'back', 'trapezius', 'lowerback', 'shoulders', 'biceps', 'triceps', 'forearm', 'abdomen', 'obliques',
- 'quads', 'glutes', 'hamstrings', 'calves'
+ 'chest',
+ 'back',
+ 'trapezius',
+ 'lowerback',
+ 'shoulders',
+ 'biceps',
+ 'triceps',
+ 'forearm',
+ 'abdomen',
+ 'obliques',
+ 'quads',
+ 'glutes',
+ 'hamstrings',
+ 'calves',
];
const Map<String, List<String>> kBodyZones = {
'Chest': ['chest'],
@@ -7462,37 +7474,132 @@ const Map<String, List<String>> kBodyZones = {
const List<String> kDifficulties = ['Beginner', 'Intermediate', 'Advanced'];
const List<String> kEquipment = [
- 'Barbell', 'Dumbbell', 'Cable', 'Machine', 'Bodyweight', 'Weighted', 'Band', 'Kettlebell', 'Rings', 'Other'
+ 'Barbell',
+ 'Dumbbell',
+ 'Cable',
+ 'Machine',
+ 'Bodyweight',
+ 'Weighted',
+ 'Band',
+ 'Kettlebell',
+ 'Rings',
+ 'Other',
];
const List<String> kFilterEquipment = [
- 'Bodyweight', 'Dumbbell', 'Barbell', 'Machine', 'Cable', 'Band', 'Kettlebell', 'Rings', 'Weighted'
+ 'Bodyweight',
+ 'Dumbbell',
+ 'Barbell',
+ 'Machine',
+ 'Cable',
+ 'Band',
+ 'Kettlebell',
+ 'Rings',
+ 'Weighted',
];
const Set<String> kNeedsKit = {
- '9WTm7dq', 'lBDjFxJ', 'T2mxWqc', 'X6C6i5Y', '72BC5Za', 'dead-hang-hold', 'mExgrF9', 'neutral-grip-pull-up',
- 'active-hang', 'negative-pull-up', 'commando-pull-up', 'l-sit-pull-up', 'towel-pull-up', 'uWpxD4v',
- 'l-sit-hold', '7xeukSt', 'uTBt1HV', 'TFqbd8t', 'XVDdcoj', 'vertical-row', 'prone-t-raise',
- 'reverse-snow-angel', 'decline-push-up', 'seal-jack', 'feet-elevated-pike-push-up', 'handstand-push-up',
- 'dragon-flag', 'mweqJin', 'VO2qeJg', 'xdYPUtE', '9E25EOx', 'assisted-pistol-squat', 'single-leg-box-squat',
- 'RrLske5', 'u27Kcdz', 'clamshell', 'hip-airplane', 'bJYHBIN', 'iPm26QU', 'u5ESqzH', '0jp9Rlz', 'LNE3wfo',
- 'nordic-curl', 'C5jncD2', 'lying-hamstring-walkout', 'hamstring-stretch', 'outdoor-run', 'outdoor-walk',
- 'outdoor-hike', 'arch-hang', 'parallel-bar-support-hold', 'negative-dip', 'assisted-squat',
- 'bulgarian-split-squat', 'bench-leg-raise', 'incline-row', 'wide-row', 'QOA0FD0', 'G7xoEzr',
+ '9WTm7dq',
+ 'lBDjFxJ',
+ 'T2mxWqc',
+ 'X6C6i5Y',
+ '72BC5Za',
+ 'dead-hang-hold',
+ 'mExgrF9',
+ 'neutral-grip-pull-up',
+ 'active-hang',
+ 'negative-pull-up',
+ 'commando-pull-up',
+ 'l-sit-pull-up',
+ 'towel-pull-up',
+ 'uWpxD4v',
+ 'l-sit-hold',
+ '7xeukSt',
+ 'uTBt1HV',
+ 'TFqbd8t',
+ 'XVDdcoj',
+ 'vertical-row',
+ 'prone-t-raise',
+ 'reverse-snow-angel',
+ 'decline-push-up',
+ 'seal-jack',
+ 'feet-elevated-pike-push-up',
+ 'handstand-push-up',
+ 'dragon-flag',
+ 'mweqJin',
+ 'VO2qeJg',
+ 'xdYPUtE',
+ '9E25EOx',
+ 'assisted-pistol-squat',
+ 'single-leg-box-squat',
+ 'RrLske5',
+ 'u27Kcdz',
+ 'clamshell',
+ 'hip-airplane',
+ 'bJYHBIN',
+ 'iPm26QU',
+ 'u5ESqzH',
+ '0jp9Rlz',
+ 'LNE3wfo',
+ 'nordic-curl',
+ 'C5jncD2',
+ 'lying-hamstring-walkout',
+ 'hamstring-stretch',
+ 'outdoor-run',
+ 'outdoor-walk',
+ 'outdoor-hike',
+ 'arch-hang',
+ 'parallel-bar-support-hold',
+ 'negative-dip',
+ 'assisted-squat',
+ 'bulgarian-split-squat',
+ 'bench-leg-raise',
+ 'incline-row',
+ 'wide-row',
+ 'QOA0FD0',
+ 'G7xoEzr',
};
const List<String> kWarmupIds = [
- 'jumping-jack', 'high-knees', 'cat-cow-stretch', 'worlds-greatest-stretch', 'leg-swings-stretch', 'inchworm',
- 'QChZi3x', 'scapular-push-up', 'hip-airplane', 'glute-bridge', 'bird-dog', 'dead-bug', 'fire-hydrant',
- 'clamshell', 'kneeling-hip-flexor-stretch', 'BbfB8Gb', '6YUfHPL', 'jump-rope', 'band-pull-apart',
- 'yuris-shoulder-band-warmup', 'wrist-prep',
+ 'jumping-jack',
+ 'high-knees',
+ 'cat-cow-stretch',
+ 'worlds-greatest-stretch',
+ 'leg-swings-stretch',
+ 'inchworm',
+ 'QChZi3x',
+ 'scapular-push-up',
+ 'hip-airplane',
+ 'glute-bridge',
+ 'bird-dog',
+ 'dead-bug',
+ 'fire-hydrant',
+ 'clamshell',
+ 'kneeling-hip-flexor-stretch',
+ 'BbfB8Gb',
+ '6YUfHPL',
+ 'jump-rope',
+ 'band-pull-apart',
+ 'yuris-shoulder-band-warmup',
+ 'wrist-prep',
];
const Set<String> kStretchIds = {
- 'cat-cow-stretch', 'worlds-greatest-stretch', 'leg-swings-stretch', 'childs-pose', 'doorway-chest-stretch',
- 'cross-body-shoulder-stretch', 'standing-quad-stretch', 'kneeling-hip-flexor-stretch', 'butterfly-stretch',
- 'wall-calf-stretch', 'LNE3wfo', 'hamstring-stretch', 'seated-forward-fold-stretch',
- 'yuris-shoulder-band-warmup', 'wrist-prep',
+ 'cat-cow-stretch',
+ 'worlds-greatest-stretch',
+ 'leg-swings-stretch',
+ 'childs-pose',
+ 'doorway-chest-stretch',
+ 'cross-body-shoulder-stretch',
+ 'standing-quad-stretch',
+ 'kneeling-hip-flexor-stretch',
+ 'butterfly-stretch',
+ 'wall-calf-stretch',
+ 'LNE3wfo',
+ 'hamstring-stretch',
+ 'seated-forward-fold-stretch',
+ 'yuris-shoulder-band-warmup',
+ 'wrist-prep',
};
const Set<String> kCalisthenicsEquipment = {'Bodyweight', 'Rings', 'Weighted'};
@@ -7518,24 +7625,59 @@ const Map<String, String> kSportIcons = {
};
const Set<String> kCardioExtras = {
- 'jump-rope', 'battle-ropes', 'burpee', 'half-burpee', 'mountain-climber', 'high-knees', 'jumping-jack',
- 'skater-hop', 'squat-thrust', 'sprawl', 'lateral-shuffle', 'plank-jack',
+ 'jump-rope',
+ 'battle-ropes',
+ 'burpee',
+ 'half-burpee',
+ 'mountain-climber',
+ 'high-knees',
+ 'jumping-jack',
+ 'skater-hop',
+ 'squat-thrust',
+ 'sprawl',
+ 'lateral-shuffle',
+ 'plank-jack',
};
const List<List<String>> kProgressions = [
- ['wall-push-up', 'incline-push-up', 'knee-push-up', 'I4hDWkc', 'x6KpKpq', 'decline-push-up', 'A9qxk2F',
- 'pseudo-planche-push-up'],
+ [
+ 'wall-push-up',
+ 'incline-push-up',
+ 'knee-push-up',
+ 'I4hDWkc',
+ 'x6KpKpq',
+ 'decline-push-up',
+ 'A9qxk2F',
+ 'pseudo-planche-push-up',
+ ],
['vertical-row', 'incline-row', 'mExgrF9', 'wide-row', 'weighted-inverted-row'],
- ['assisted-squat', '6YUfHPL', '9E25EOx', 'bulgarian-split-squat', 'beginner-shrimp-squat',
- 'intermediate-shrimp-squat', 'shrimp-squat', 'weighted-shrimp-squat'],
- ['bodyweight-romanian-deadlift', 'bodyweight-single-leg-deadlift', 'banded-nordic-curl-negative',
- 'banded-nordic-curl', 'nordic-curl'],
+ [
+ 'assisted-squat',
+ '6YUfHPL',
+ '9E25EOx',
+ 'bulgarian-split-squat',
+ 'beginner-shrimp-squat',
+ 'intermediate-shrimp-squat',
+ 'shrimp-squat',
+ 'weighted-shrimp-squat',
+ ],
+ [
+ 'bodyweight-romanian-deadlift',
+ 'bodyweight-single-leg-deadlift',
+ 'banded-nordic-curl-negative',
+ 'banded-nordic-curl',
+ 'nordic-curl',
+ ],
['negative-dip', '9WTm7dq', 'bZq4bwK'],
['uTBt1HV', 'negative-pull-up', 'lBDjFxJ', 'HMzLjXx'],
];
const Set<String> kSlowReps = {
- 'negative-dip', 'negative-pull-up', 'banded-nordic-curl-negative', 'banded-nordic-curl', 'nordic-curl',
+ 'negative-dip',
+ 'negative-pull-up',
+ 'banded-nordic-curl-negative',
+ 'banded-nordic-curl',
+ 'nordic-curl',
};
String? nextStepOf(String id) {
diff --git a/test/muscles_test.dart b/test/muscles_test.dart
index 199425e..d369955 100644
--- a/test/muscles_test.dart
+++ b/test/muscles_test.dart
@@ -60,9 +60,11 @@ void main() {
test('cuenta los días desde la última serie del músculo principal', () {
final now = DateTime.now();
- fit.sessions.add(LoggedSession(DateTime(now.year, now.month, now.day - 9, 12), 600, [
- LoggedExercise(bench(), 'Bench Press', 'chest', [LoggedSet(8, 60)]),
- ]));
+ fit.sessions.add(
+ LoggedSession(DateTime(now.year, now.month, now.day - 9, 12), 600, [
+ LoggedExercise(bench(), 'Bench Press', 'chest', [LoggedSet(8, 60)]),
+ ]),
+ );
final days = fit.daysSinceTrained();
expect(days['chest'], 9);
expect(days['quads'], isNull);
@@ -71,14 +73,26 @@ void main() {
});
test('#300 el cardio no suma series al músculo aunque lleve uno', () {
- final run = fit.addCustomExercise(name: 'Escaladora', primary: 'quads', equipment: 'Machine', mode: 'cardio');
- final walk = fit.addCustomExercise(name: 'Cinta', primary: 'quads', equipment: 'Machine', kind: 'cardio');
+ final run = fit.addCustomExercise(
+ name: 'Escaladora',
+ primary: 'quads',
+ equipment: 'Machine',
+ mode: 'cardio',
+ );
+ final walk = fit.addCustomExercise(
+ name: 'Cinta',
+ primary: 'quads',
+ equipment: 'Machine',
+ kind: 'cardio',
+ );
final now = DateTime.now();
- fit.sessions.add(LoggedSession(now, 1800, [
- LoggedExercise(run, 'Escaladora', 'quads', [LoggedSet(1, 0, sec: 1200)]),
- LoggedExercise(walk, 'Cinta', 'quads', [LoggedSet(1, 0, sec: 900)]),
- LoggedExercise(bench(), 'Bench Press', 'chest', [LoggedSet(8, 60), LoggedSet(8, 60)]),
- ]));
+ fit.sessions.add(
+ LoggedSession(now, 1800, [
+ LoggedExercise(run, 'Escaladora', 'quads', [LoggedSet(1, 0, sec: 1200)]),
+ LoggedExercise(walk, 'Cinta', 'quads', [LoggedSet(1, 0, sec: 900)]),
+ LoggedExercise(bench(), 'Bench Press', 'chest', [LoggedSet(8, 60), LoggedSet(8, 60)]),
+ ]),
+ );
final sets = fit.muscleSetsOver(7);
expect(sets['quads'], isNull);
expect(sets['chest'], 2);
@@ -110,10 +124,13 @@ void main() {
test('a hard chest day tires the chest and it recovers in a few days', () {
final now = DateTime(2026, 9, 18, 18);
- fit.sessions.add(LoggedSession(now.subtract(const Duration(hours: 1)), 3600, [
- LoggedExercise(idOf('Barbell Bench Press'), 'Bench', 'chest',
- [for (var i = 0; i < 8; i++) LoggedSet(8, 80, rpe: 9)]),
- ]));
+ fit.sessions.add(
+ LoggedSession(now.subtract(const Duration(hours: 1)), 3600, [
+ LoggedExercise(idOf('Barbell Bench Press'), 'Bench', 'chest', [
+ for (var i = 0; i < 8; i++) LoggedSet(8, 80, rpe: 9),
+ ]),
+ ]),
+ );
final fresh = fit.muscleRecovery(now: now);
expect(fresh['chest'], lessThan(0.3));
expect(fresh['quads'], 1);
@@ -125,10 +142,13 @@ void main() {
test('dice cuándo pasa a recuperando y cuándo a listo', () {
final now = DateTime(2026, 9, 18, 18);
- fit.sessions.add(LoggedSession(now.subtract(const Duration(hours: 1)), 3600, [
- LoggedExercise(idOf('Barbell Bench Press'), 'Bench', 'chest',
- [for (var i = 0; i < 8; i++) LoggedSet(8, 80, rpe: 9)]),
- ]));
+ fit.sessions.add(
+ LoggedSession(now.subtract(const Duration(hours: 1)), 3600, [
+ LoggedExercise(idOf('Barbell Bench Press'), 'Bench', 'chest', [
+ for (var i = 0; i < 8; i++) LoggedSet(8, 80, rpe: 9),
+ ]),
+ ]),
+ );
final mid = fit.hoursUntilRecovery('chest', 0.5, now: now)!;
final ready = fit.hoursUntilRecovery('chest', 0.8, now: now)!;
expect(ready, greaterThan(mid));
@@ -154,4 +174,60 @@ void main() {
expect(press.secondary, containsAll(['glutes', 'hamstrings']));
});
});
+
+ group('#365 músculos de sentadillas, peso muerto y empujes', () {
+ setUp(() async {
+ SharedPreferences.setMockInitialValues({});
+ await Store.instance.init();
+ fit.resetAllData();
+ fit.onboarded = true;
+ setAppLanguage('en');
+ });
+
+ test('sentadillas y zancadas tienen cuádriceps como músculo principal', () {
+ final squat = kExercises.firstWhere((e) => e.id == 'qXTaZnJ');
+ expect(squat.primary, 'quads');
+ expect(squat.secondary, containsAll(['glutes', 'hamstrings', 'calves']));
+
+ final frontSquat = kExercises.firstWhere((e) => e.id == 'zG0zs85');
+ expect(frontSquat.primary, 'quads');
+ expect(frontSquat.secondary, containsAll(['glutes', 'hamstrings', 'calves']));
+
+ final hackSquat = kExercises.firstWhere((e) => e.id == 'ZuPXtCK');
+ expect(hackSquat.primary, 'quads');
+ expect(hackSquat.secondary, containsAll(['glutes', 'hamstrings', 'calves']));
+
+ final lunge = kExercises.firstWhere((e) => e.id == 'RRWFUcw');
+ expect(lunge.primary, 'quads');
+ expect(lunge.secondary, containsAll(['glutes', 'hamstrings', 'calves']));
+ });
+
+ test('peso muerto rumano y buenos días tienen isquiotibiales como primario', () {
+ final rdl = kExercises.firstWhere((e) => e.id == 'wQ2c4XD');
+ expect(rdl.primary, 'hamstrings');
+ expect(rdl.secondary, containsAll(['glutes', 'lowerback']));
+
+ final gm = kExercises.firstWhere((e) => e.id == '1bQkKZK');
+ expect(gm.primary, 'hamstrings');
+ expect(gm.secondary, containsAll(['glutes', 'lowerback']));
+ });
+
+ test('empuje de cadera smith apunta a glúteos', () {
+ final hipThrust = kExercises.firstWhere((e) => e.id == 'CqhoytW');
+ expect(hipThrust.primary, 'glutes');
+ expect(hipThrust.secondary, contains('hamstrings'));
+ });
+
+ test('las sentadillas suman series a cuádriceps y medio a glúteos', () {
+ final squat = kExercises.firstWhere((e) => e.id == 'qXTaZnJ');
+ fit.sessions.add(
+ LoggedSession(DateTime.now(), 1800, [
+ LoggedExercise(squat.id, squat.name, squat.primary, [LoggedSet(5, 100), LoggedSet(5, 100)]),
+ ]),
+ );
+ final sets = fit.muscleSetsOver(7);
+ expect(sets['quads'], 2);
+ expect(sets['glutes'], 1);
+ });
+ });
}