initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:manager/core/theme/app_theme.dart';
|
||||
import 'package:manager/core/widgets/sparkline.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('paints without error for multiple points, one point, and empty data', (tester) async {
|
||||
for (final values in [
|
||||
[12.4, 16.0, 4.1, 19.8, 9.2],
|
||||
[12.4],
|
||||
<double>[],
|
||||
]) {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: AppTheme.light(),
|
||||
home: Scaffold(body: Center(child: Sparkline(values: values))),
|
||||
),
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(find.byType(CustomPaint), findsWidgets);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user