test: fix integration test (#2906)

* test: fix calendar integration test

* test: add comment for workaround
This commit is contained in:
Richard Shiue 2023-06-28 22:11:50 +08:00 committed by GitHub
parent 18ed553296
commit a17d6b7eec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,7 +294,17 @@ extension AppFlowyDatabaseTest on WidgetTester {
matching: findDay, matching: findDay,
); );
await tapButton(finder); // if the day is very near the beginning or the end of the month,
// it may overlap with the same day in the next or previous month,
// respectively because it was spilling over. This will lead to 2
// widgets being found and thus cannot be tapped correctly.
if (content < 15) {
// e.g., Jan 2 instead of Feb 2
await tapButton(finder.first);
} else {
// e.g. Jun 28 instead of May 28
await tapButton(finder.last);
}
} }
Future<void> toggleIncludeTime() async { Future<void> toggleIncludeTime() async {