feat: Add new widgets and enhance configuration validation
- Introduced "nutrition_detail_charts", "recovery_charts_panel", and "progress_photos" widgets to the dashboard. - Updated widget configuration validation to support new widgets, including chart days for nutrition and recovery charts. - Enhanced the widget catalog and dashboard layout to include the new features. - Bumped app_dashboard version to 1.7.0 to reflect these additions and improvements.
This commit is contained in:
1 parent
7f833b2cb1
commit
bc91396885
9 files changed
+226
-4
No files matched your search
@@ -71,6 +71,20 @@ def test_quick_capture_visibility():
|
||||
validate_widget_entry_config("quick_capture", {"extra": 1})
|
||||
|
||||
|
||||
def test_nutrition_detail_charts_days():
|
||||
assert validate_widget_entry_config("nutrition_detail_charts", {}) == {}
|
||||
assert validate_widget_entry_config("nutrition_detail_charts", {"chart_days": 60}) == {"chart_days": 60}
|
||||
with pytest.raises(ValueError):
|
||||
validate_widget_entry_config("nutrition_detail_charts", {"chart_days": 3})
|
||||
|
||||
|
||||
def test_recovery_charts_panel_days():
|
||||
assert validate_widget_entry_config("recovery_charts_panel", {}) == {}
|
||||
assert validate_widget_entry_config("recovery_charts_panel", {"chart_days": 28}) == {"chart_days": 28}
|
||||
with pytest.raises(ValueError):
|
||||
validate_widget_entry_config("recovery_charts_panel", {"chart_days": 99})
|
||||
|
||||
|
||||
def test_trend_kcal_weight_chart_days():
|
||||
assert validate_widget_entry_config("trend_kcal_weight", {}) == {}
|
||||
assert validate_widget_entry_config("trend_kcal_weight", {"chart_days": 30}) == {"chart_days": 30}
|
||||
|
||||
Reference in new issue
Block a user