Commit Graph

560 Commits

Author SHA1 Message Date
Roland Geider
02a0f89807 update goldens 2025-11-16 18:34:13 +00:00
Roland Geider
8818bf3a5f Simplify test and add tag 2025-11-16 18:48:02 +01:00
Roland Geider
8aa0dea540 Fix tests 2025-11-16 17:17:14 +01:00
Roland Geider
e7c233e613 Add test for recalculateIndices 2025-11-16 14:38:36 +01:00
Roland Geider
a072692ddd Add smoke and golden test for gym progression tab 2025-11-15 18:40:43 +01:00
Roland Geider
a4909bd99c Rename some tests 2025-11-15 18:20:22 +01:00
Roland Geider
3273415cbd Fix test and move the files around a bit
The tests should mirror the structure of the regular application
2025-11-15 17:38:22 +01:00
Roland Geider
ec8578d43d Add some tests and fix a small bug in uuid handling 2025-11-15 15:59:24 +01:00
Roland Geider
f1f37d3e03 Allow swapping exercises in the gym mode 2025-11-15 01:32:59 +01:00
Roland Geider
66b18b6b3c Further refactoring the gym mode 2025-11-14 14:41:25 +01:00
Roland Geider
9ea6674849 Add test for calculatePages 2025-11-11 23:56:19 +01:00
Roland Geider
ae6db6ee07 Move to riverpod three
Needed to downgrade build_runner and mockito for now
2025-11-11 13:22:18 +01:00
Roland Geider
079017efac Regenerate contribute_exercise_test.mocks.dart 2025-10-09 18:15:41 +02:00
Roland Geider
39b503e03a Format files as in master 2025-10-09 17:54:24 +02:00
Roland Geider
85ba00b654 Merge branch 'master' into feature/day-type
# Conflicts:
#	lib/models/workouts/day.g.dart
#	lib/models/workouts/day_data.g.dart
#	lib/models/workouts/set_config_data.g.dart
#	lib/models/workouts/slot_data.g.dart
#	lib/models/workouts/slot_entry.g.dart
#	lib/models/workouts/weight_unit.g.dart
#	test/auth/auth_screen_test.mocks.dart
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/gallery/gallery_form_test.mocks.dart
#	test/gallery/gallery_screen_test.mocks.dart
#	test/measurements/measurement_categories_screen_test.mocks.dart
#	test/measurements/measurement_provider_test.mocks.dart
#	test/nutrition/nutritional_meal_form_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
#	test/nutrition/nutritional_plan_screen_test.mocks.dart
#	test/nutrition/nutritional_plans_screen_test.mocks.dart
#	test/other/base_provider_test.mocks.dart
#	test/routine/day_form_test.mocks.dart
#	test/routine/gym_mode_screen_test.mocks.dart
#	test/routine/gym_mode_session_screen_test.mocks.dart
#	test/routine/repetition_unit_form_widget_test.mocks.dart
#	test/routine/routine_edit_screen_test.mocks.dart
#	test/routine/routine_edit_test.mocks.dart
#	test/routine/routine_form_test.mocks.dart
#	test/routine/routine_logs_screen_test.mocks.dart
#	test/routine/routine_screen_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/routine/routines_screen_test.mocks.dart
#	test/routine/slot_entry_form_test.mocks.dart
#	test/routine/weight_unit_form_widget_test.mocks.dart
#	test/user/provider_test.mocks.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
2025-10-09 17:39:39 +02:00
Roland Geider
93a11a16e4 Recreate generated files and reformat the repo
Seems the default dart formatting rules changed recently, and this was causing
huge diffs in branches
2025-10-09 17:39:02 +02:00
Roland Geider
6146201531 Allow setting the slot entry type as well 2025-10-09 17:28:23 +02:00
Roland Geider
8199205b02 Don't dump all the debug info to the error reporting 2025-10-08 14:42:58 +02:00
Roland Geider
c63057fe35 Reuse AddExerciseTextArea in the image form 2025-10-08 14:05:50 +02:00
Roland Geider
0add2a6bd1 Extract url validator to its own file 2025-10-08 14:03:25 +02:00
Roland Geider
1a78011a7d Refactor image handling in the exercise submission process
Now the images are kept in a single list, instead of having two for
the files themselves and the metadata.
2025-10-08 12:45:37 +02:00
Roland Geider
136d0e0825 Extract some logic to their own widgets 2025-10-06 12:43:05 +02:00
Roland Geider
fa7f670e9f Some light cleanup 2025-10-06 12:31:12 +02:00
Roland Geider
39be6a3edf Allow setting the day type in the edit form 2025-10-06 11:36:27 +02:00
Branislav Nohaj
7bc8463406 dar format was performed 2025-10-04 11:13:10 +02:00
Branislav Nohaj
e9ab11c8bb added better comments 2025-10-04 10:58:36 +02:00
Branislav Nohaj
ed8e9ec744 Added option in mobile app to add more info about image 2025-10-04 10:22:01 +02:00
Roland Geider
a10b7eb9f7 Pass parameter to create new variation and link exercises 2025-09-28 15:03:28 +02:00
Roland Geider
960abc9bec Merge branch 'master' into feature/exercise-submission 2025-09-28 14:38:22 +02:00
Roland Geider
ccbaf0b42a Allow multiple weight entries per day 2025-09-26 12:21:50 +02:00
Roland Geider
d90fe670f1 Remove debug output 2025-09-24 13:45:54 +02:00
Roland Geider
530efd366e Some renaming 2025-09-24 12:31:28 +02:00
Roland Geider
84c29eb209 Use the regular ingredient endpoint, instead of the special search one 2025-09-24 01:35:03 +02:00
Roland Geider
a7ee4ff5b3 Merge pull request #855 from wger-project/nutrition-plan-stats
Nutrition plan stats
2025-09-22 16:19:04 +02:00
Roland Geider
ba34570a3d Add image upload methods
We use the "manual" way as it was before, since there were some problems
making this work and most of the errors were happening during the exercise
creation itself.
2025-09-19 22:27:04 +02:00
Roland Geider
9ea8362d20 Show an overview with the new exercise data before saving
Also, correctly parse all validation errors that might be returned by the server
2025-09-19 16:59:18 +02:00
Roland Geider
711d7c0aba Update exercise submission model and related files
This now uses the combined endpoint, which creates the different objects
itself within a transaction, ensuring that no orphans can be created.
2025-09-18 21:57:27 +02:00
Roland Geider
4c34f91028 Merge pull request #905 from wger-project/feature/better-logging
Save the application logs locally
2025-09-16 15:21:51 +02:00
Roland Geider
798406eaa9 Make routineId nullable in session and related files
Sessions can be added ad-hoc, without needing to be part of any specific
routine.
2025-09-16 14:47:47 +02:00
Roland Geider
9b3957fe35 Use "clock" for mocking dates and datetimes
This should make the tests a bit more robust, specially in CI since these
tended to fail depending on how long and when the tests run. Also, rework
a bit the way the start and end dates in sessions were being handled and
initialised
2025-09-16 14:45:16 +02:00
Roland Geider
dbd3fa915d Refactor PlanForm
* Date values are now localized
* Remove text controllers since we were setting the values in the plan
  object directly as well as setting them in the controllers anyway. Note
  that this is still not an ideal solution since if we change something
  in the form and close it, the changes are still reflected in the UI, just
  not preserved to the server.
 * Move basic date sanity cheks to the model
2025-09-12 16:24:56 +02:00
Roland Geider
d9b4d66c0f Add tests for interpolation logic 2025-09-12 15:03:33 +02:00
Roland Geider
6cc96310c5 Simplify currentPlan 2025-09-12 14:37:32 +02:00
Roland Geider
0fd2af030d Merge branch 'refs/heads/master' into nutrition-plan-stats 2025-09-12 14:05:38 +02:00
Roland Geider
5a4357d27d Fix gym_mode_screen_test.dart, set correct mocks 2025-09-08 16:00:05 +02:00
Roland Geider
5a4d4c7208 Save the application logs
This allows us to show the logs to the user and also send them along with any
bug reports. This is a simple system that just keeps the last entries in memory
and nothing is stored permanently, but that's ok for our use case and can be
changed in the future if the need arises.
2025-09-06 22:08:35 +02:00
Roland Geider
d85ee13ed9 Give users more control over the exercise cache
This allows users to manually refresh the cache and load all exercises
from the server.
2025-09-06 15:05:52 +02:00
Roland Geider
c89ccb630c Use max pagination size when loading data
This is a workaround for #867, but not a real solution
2025-09-06 00:50:00 +02:00
Roland Geider
4330e51f86 Retrieve the current routine dynamically
This behaviour is now the same as the nutritional plans.
2025-09-05 22:47:27 +02:00
Roland Geider
ac043baa68 Merge branch 'master' into nutrition-plan-stats
# Conflicts:
#	lib/models/nutrition/nutritional_plan.g.dart
#	lib/widgets/measurements/charts.dart
#	lib/widgets/measurements/entries.dart
#	lib/widgets/weight/weight_overview.dart
2025-09-03 15:25:17 +02:00