Commit e9c0024
Changed files (2)
app
lib
features
statistics
test
screens
app/lib/features/statistics/value_graph.dart
@@ -197,7 +197,7 @@ class _ValueGraphPainter extends CustomPainter {
double maxY,
double? warnValue,
) {
- if (data.isEmpty) return;
+ if (data.length < 2) return;
Path? path;
Path? warnPath = warnValue == null ? null : Path();
@@ -228,6 +228,7 @@ class _ValueGraphPainter extends CustomPainter {
warnPath = subPath(warnPath!, progress);
warnPath.relativeLineTo(0, size.height);
+ warnPath.lineTo(_kLeftLegendWidth, size.height);
final y = _transformY(size, warnValue, minY, maxY);
app/test/screens/home_screen_test.dart
@@ -45,8 +45,10 @@ void main() {
await tester.pumpAndSettle();
expect(find.byType(BloodPressureValueGraph), findsOneWidget);
+ expect(find.byType(SafeArea), findsAtLeast(1));
+ expect(find.byType(Scaffold), findsAtLeast(1));
expect(find.byType(NavigationActionButtons), findsNothing);
- expect(find.byType(IntervalPicker), findsNothing);
+ expect(find.byType(IntervalPicker), findsOneWidget);
expect(find.byType(MeasurementList), findsNothing);
});