Commit Graph

461 Commits

Author SHA1 Message Date
Roland Geider
42d4489060 Remove file, color tests are in test/helpers/colors_test.dart 2025-05-09 14:20:53 +02:00
Roland Geider
9ebaf58fea Refactor routine handling for the dashboard widgets
This makes sure that edits to the routine (such as changing the order
of the days, etc.) are properly reflected in the dashboard.
2025-05-03 15:39:46 +02:00
Roland Geider
1ecbfa88d1 Correctly set the start and end time to null, if this is what comes from the API 2025-04-18 00:40:05 +02:00
Roland Geider
bc0672d81b Correctly initialize the data in form from existing session
Also, add some simple tests for this
2025-04-17 17:30:01 +02:00
Roland Geider
8acde9adaa Add startTime to GymState and update GymMode to use it
This keeps the start time, even if the user leaves the gym mode and returns
later, which is what we want anyway.
2025-04-17 16:34:42 +02:00
Roland Geider
9d05c9e297 Update goldens 2025-04-17 15:20:34 +02:00
Roland Geider
c673fa0ea6 Add test for the workout log deletion dialog 2025-04-17 15:18:49 +02:00
Roland Geider
4d0936706c Update goldens 2025-04-17 10:35:31 +02:00
Roland Geider
88d66b336c Properly update the UI when deleting workout logs
The problem was that we were passing the exercises and session from the
calendar events, which wasn't being reloaded when the logs were deleted. Now
we only pass the selected date and fetch the logs from the routine.
2025-04-17 10:26:44 +02:00
Roland Geider
686c3857a1 Update goldens 2025-04-12 20:30:07 +02:00
Roland Geider
67ee79b54b Seems the rendering is not that equal after all...
Also add a constant device size for all goldens
2025-04-12 18:16:07 +02:00
Roland Geider
4920c2a091 Fix overflow bug in meal.dart
This should also fix the problem when generating the goldens. The loadAppFonts
and the check for Linux was removed as well, if the pseudo-font helps with a
constant rendering among all platforms we don't need those.
2025-04-12 17:57:24 +02:00
Roland Geider
a62ef074db Merge branch 'master' into fork/yashas-hm/yhm/issue-732
# Conflicts:
#	AUTHORS.md
#	pubspec.yaml
#	test/workout/goldens/routine_logs_screen_detail.png
#	test/workout/routine_logs_screen_test.dart
2025-04-12 16:54:07 +02:00
Roland Geider
6742c8091a Return the actions enum directly, no need for a dict here 2025-04-01 21:39:45 +02:00
Roland Geider
61f61a64c5 Merge branch 'master' into feature/improve-min-app-version
# Conflicts:
#	lib/providers/auth.dart
2025-03-31 09:44:43 +02:00
Roland Geider
b0e6b3d1a9 Load app fonts 2025-03-30 12:26:13 +02:00
Roland Geider
db6687010d Mock the current day in the routine logs test
The calendar marks the current day, so the goldens were constantly changing
and would always fail.
2025-03-30 12:17:15 +02:00
Roland Geider
df06cef398 await for all setExercisesAndUnits calls
Not setting the "await" was causing the method to be run asynchronously which means
that sometimes these would get called several times for the same exercise, which in
turn would cause exercises to be written several times to the local db, polluting the
exercise list, etc. etc.

We increase the schemaVersion of the database because this causes all the cache tables
to be dropped and re-created
2025-03-29 16:37:11 +01:00
Roland Geider
301f48a966 More renaming of exercise base to just exercise 2025-03-29 15:50:13 +01:00
Roland Geider
804624c384 update goldens 2025-03-29 14:51:44 +01:00
Roland Geider
c28ec70fb6 Fix borked imports? 2025-03-29 14:50:41 +01:00
Roland Geider
47f6aa36d3 Formatting 2025-03-29 14:32:58 +01:00
Yashas H Majmudar
3d89027ed2 Merge remote-tracking branch 'origin/yhm/issue-731' into yhm/issue-731 2025-03-28 22:38:02 -04:00
Yashas H Majmudar
7786416ed3 fix: auth screen test issue 2025-03-28 22:37:00 -04:00
Roland Geider
e4b550ab52 Refactor app version handling and update authentication flow
Previously, this was only triggered when logging in to the application. If a user
just opened the app, it would just stop working. We also now always check this min
version and have removed the option from the android manifest file since disabling
this doesn't make much sense and we have many other platforms as well (iOS, flatpak)
2025-03-28 17:22:36 +01:00
Roland Geider
cde9d64a2c Merge branch 'master' into yhm/issue-731 2025-03-28 16:15:52 +01:00
Roland Geider
94cef0278c update goldens 2025-03-28 16:08:44 +01:00
Roland Geider
ae64c2377d update goldens 2025-03-26 18:28:55 +01:00
Roland Geider
d2097bf319 Show full exercise info in gym mode
This makes the ExerciseOverview smaller and more consistent

See #301
2025-03-26 16:31:27 +01:00
Roland Geider
74752505eb Change rir and rirTarget types from String to num
This is more consistent with the other fields and is now the same as the backend
2025-03-26 15:03:15 +01:00
Yashas H Majmudar
657428e6aa update: platform linux check for goldens 2025-03-24 12:21:27 -04:00
Yashas H Majmudar
db735ed70d migration: golden_toolkit to flutter_tests 2025-03-23 15:44:09 -04:00
Yashas H Majmudar
e363a4152f add: documentation 2025-03-23 14:40:17 -04:00
Yashas H Majmudar
d31dc16bcf migration: migrated all instances of sharedPreferences to sharedPreferencesAsync for tests 2025-03-23 14:26:28 -04:00
Roland Geider
4fe4d488b2 Update goldens 2025-03-19 22:55:37 +01:00
Roland Geider
90681fadd9 Split up the gym mode widgets 2025-03-19 10:33:06 +01:00
Roland Geider
fea9d89621 Refactor widget so it's easier to test 2025-03-18 21:13:28 +01:00
Roland Geider
bf8e0b6af8 Remove test
This is already available in gallery_form_test.dart
2025-03-18 20:26:49 +01:00
Roland Geider
f3152aa0f4 Update goldens 2025-03-18 20:25:14 +01:00
Roland Geider
d071d143df Update flutter to 3.29
The translations are not stored in a synthetic package anymore, but the
files are just copied to a specific folder so it can be more easily imported

Also, flutter_barcode_scanner was replaced by simple_barcode_scanner since
the first hasn't been updated in 3 years and was already causing problems
for some time
2025-03-18 17:28:19 +01:00
Roland Geider
80d59e729b Fix test 2025-03-18 16:01:15 +01:00
Roland Geider
f987de1b4d Handle case where an exercise has no variations 2025-03-18 14:59:33 +01:00
Roland Geider
58a641d298 Also put the list tile to add exercises in a card
This makes it look the same as the one to add new days and makes for
a more consistent behaviour
2025-03-17 19:44:58 +01:00
Roland Geider
5fdcb63207 Remove the optional refresh parameter
We always want to refresh the data since we don't update manually the
dayData lists
2025-03-17 19:27:43 +01:00
Roland Geider
b868911a3f update goldens 2025-03-17 13:29:29 +01:00
Roland Geider
9f13e371ba Fix test 2025-03-15 14:54:39 +01:00
Roland Geider
715ad1865b Update goldens 2025-03-14 15:45:15 +01:00
Roland Geider
fee27ac75d Remove debug output 2025-03-11 21:46:16 +01:00
Roland Geider
68585bf22f Update goldens 2025-03-11 21:46:00 +01:00
Roland Geider
6039f51b2a If there is a rest time, show a countdown timer in the gym mode 2025-03-11 21:42:41 +01:00