cpd_2022_zi/test/widget_tests/widget_todo_icon_test.dart

22 lines
550 B
Dart

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:smoke_cess_app/widgets/todo_icon.dart';
void main() {
testWidgets('MyToDoIcon has a red dot', (WidgetTester tester) async {
// Build the widget tree
await tester.pumpWidget(
const MaterialApp(
home: Scaffold(
body: MyToDoIcon(
Icon(Icons.check),
),
),
),
);
// Verify that the red dot is present
expect(find.byIcon(Icons.brightness_1), findsOneWidget);
});
}