completed history list test

main
Julian Gegner 2023-03-06 21:00:05 +01:00
parent 23c4dd3263
commit 57d3b22c1b
1 changed files with 28 additions and 0 deletions

View File

@ -65,6 +65,34 @@ void main() {
expect(emailIconFinder, findsNothing); expect(emailIconFinder, findsNothing);
expect(correctIconFinder, findsNWidgets(history.length)); expect(correctIconFinder, findsNWidgets(history.length));
}); });
testWidgets(
'EntryDetails should display ExpansionTiles if entryComment is given',
(widgetTester) async {
String entryCommentSelector(String p0) => "";
await widgetTester.pumpWidget(WrappedHistoryList(
history: history,
dateSelector: dateSelector,
entryDataSelector: entryDataSelector,
entryCommentSelector: entryCommentSelector,
));
final expansionTileFinder = find.byType(ExpansionTile);
expect(expansionTileFinder, findsNWidgets(history.length));
});
testWidgets(
'EntryDetails should display ExpansionTiles if entryComment is not given',
(widgetTester) async {
String entryCommentSelector(String p0) => "";
await widgetTester.pumpWidget(WrappedHistoryList(
history: history,
dateSelector: dateSelector,
entryDataSelector: entryDataSelector,
entryCommentSelector: entryCommentSelector,
));
final listTileFinder = find.byType(ListTile);
expect(listTileFinder, findsNWidgets(history.length));
});
}); });
} }