test EntryDetailTitle
parent
bf749fdeb5
commit
bb833f4bfe
|
@ -0,0 +1,24 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:intl/date_symbol_data_local.dart';
|
||||||
|
|
||||||
|
import 'package:smoke_cess_app/widgets/entry_detail_title.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
group('EntryDetailTitle', () {
|
||||||
|
DateTime date = DateTime.now();
|
||||||
|
String entryData = "TestEntryData";
|
||||||
|
initializeDateFormatting('de');
|
||||||
|
|
||||||
|
testWidgets('EntryDetailTitle has formatted date and entrydata',
|
||||||
|
(widgetTester) async {
|
||||||
|
await widgetTester.pumpWidget(MaterialApp(
|
||||||
|
home: EntryDetailTitle(date: date, entryData: entryData)));
|
||||||
|
final formattedDateFinder = find.text(DateFormat.MMMd('de').format(date));
|
||||||
|
final entryDataFinder = find.text(entryData);
|
||||||
|
expect(formattedDateFinder, findsOneWidget);
|
||||||
|
expect(entryDataFinder, findsOneWidget);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue