test: add more cover integration tests (#2922)

This commit is contained in:
Richard Shiue
2023-07-01 23:13:09 +08:00
committed by GitHub
parent 3acd36e580
commit c870dbeac4
6 changed files with 83 additions and 55 deletions

View File

@ -85,12 +85,9 @@ extension Expectation on WidgetTester {
expect(iconWidget, findsOneWidget);
}
void expectToSeeDocumentCover(CoverType type, String details) {
void expectToSeeDocumentCover(CoverType type) {
final findCover = find.byWidgetPredicate(
(widget) =>
widget is DocumentCover &&
widget.coverType == type &&
widget.coverDetails == details,
(widget) => widget is DocumentCover && widget.coverType == type,
);
expect(findCover, findsOneWidget);
}