completed history list test
parent
23c4dd3263
commit
57d3b22c1b
|
@ -65,6 +65,34 @@ void main() {
|
|||
expect(emailIconFinder, findsNothing);
|
||||
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));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue