cpd_2022_zi/test/widget_missing_config_popup...

18 lines
588 B
Dart
Raw Normal View History

2023-03-06 15:50:36 +01:00
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:smoke_cess_app/widgets/missing_config_popup.dart';
void main() {
testWidgets('MissingConfigPopup displays title and text', (WidgetTester tester) async {
final String title = 'Missing Configuration';
final String text = 'Please configure the app before using it.';
await tester.pumpWidget(MaterialApp(
home: MissingConfigPopup(title: title, text: text),
));
expect(find.text(title), findsOneWidget);
expect(find.text(text), findsOneWidget);
});
}