Add Race workout kind with Garmin eventType auto-detection, sync-time running filter, and pill-based review queue filter
Race is the 8th fixed workout kind, seeded with a real (not placeholder) rule since Garmin Connect's eventType.typeKey reports "race" for manually-tagged race activities. Non-running activity types (padel, cycling, strength training, ...) are now dropped at sync time instead of being stored. The Review Queue's type filter is now clickable exclusive pill buttons instead of a dropdown.
This commit is contained in:
@@ -58,7 +58,7 @@ func TestHealth(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWorkoutKindList_ReturnsSevenSeededTypesWithPaceFields(t *testing.T) {
|
||||
func TestWorkoutKindList_ReturnsEightSeededTypesWithPaceFields(t *testing.T) {
|
||||
s, _ := newTestServer(t)
|
||||
rec := doJSON(t, s.Router(), http.MethodGet, "/api/workout-kinds/", nil)
|
||||
if rec.Code != http.StatusOK {
|
||||
@@ -68,8 +68,8 @@ func TestWorkoutKindList_ReturnsSevenSeededTypesWithPaceFields(t *testing.T) {
|
||||
if err := json.Unmarshal(rec.Body.Bytes(), &kinds); err != nil {
|
||||
t.Fatalf("unmarshal: %v", err)
|
||||
}
|
||||
if len(kinds) != 7 {
|
||||
t.Fatalf("expected 7 seeded kinds, got %d", len(kinds))
|
||||
if len(kinds) != 8 {
|
||||
t.Fatalf("expected 8 seeded kinds, got %d", len(kinds))
|
||||
}
|
||||
for _, k := range kinds {
|
||||
if k.PaceMinSecPerKm != nil || k.PaceMaxSecPerKm != nil || k.ExpectedHRZone != nil {
|
||||
|
||||
Reference in New Issue
Block a user