Skip to content

Commit e667988

Browse files
committed
integration_test: fix failures
1 parent c6d918c commit e667988

File tree

5 files changed

+48
-19
lines changed

5 files changed

+48
-19
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ updates:
44
- package-ecosystem: "pub"
55
directory: "/"
66
schedule:
7-
interval: "weekly"
7+
interval: "monthly"

.github/workflows/test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ jobs:
1717
with:
1818
channel: 'stable'
1919

20-
- run: flutter --version
21-
- run: flutter pub get
22-
- run: dart format --output=none --set-exit-if-changed .
23-
- run: dart analyze --fatal-infos
24-
- run: flutter test
20+
- run: ./check.sh
2521

2622
test-ios:
2723
name: Test iOS
@@ -41,4 +37,4 @@ jobs:
4137
with:
4238
channel: stable
4339

44-
- run: flutter test integration_test
40+
- run: flutter test integration_test --timeout 2x

check.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
flutter --version
2+
flutter pub get
3+
dart format --version
4+
dart format --fix --set-exit-if-changed .
5+
dart analyze --fatal-infos
6+
flutter test

integration_test/app_test.dart

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -458,14 +458,19 @@ void main() async {
458458
await tester.pumpAndSettle();
459459

460460
expect(find.byType(Badge), findsNothing);
461-
expect(find.byType(Divider), findsNWidgets(2));
462-
expect(find.byKey(const Key('current-day')), findsOneWidget);
463461
expect(find.byKey(const Key('target-day')), findsOneWidget);
464462
expect(
465463
(tester.firstWidget(find.byKey(const Key('target-day'))) as Divider)
466464
.color,
467465
Colors.green);
468466

467+
await tester.scrollUntilVisible(find.byKey(const Key('current-day')), 50.0);
468+
await tester.pumpAndSettle();
469+
470+
expect(find.byKey(const Key('current-day')), findsOneWidget);
471+
472+
await tester.scrollUntilVisible(find.byKey(const Key('day-81')), -50.0);
473+
await tester.pumpAndSettle();
469474
await tester.tap(find
470475
.descendant(
471476
of: find.byKey(const Key('day-82')),
@@ -626,11 +631,8 @@ void main() async {
626631

627632
await tester.tap(find.byType(PlanCard).first);
628633
await tester.pumpAndSettle();
629-
await tester.scrollUntilVisible(
630-
find.byKey(const Key('day-365')),
631-
500.0,
632-
maxScrolls: 200,
633-
);
634+
await tester.scrollUntilVisible(find.byKey(const Key('day-365')), 500.0,
635+
maxScrolls: 300);
634636
await tester.pumpAndSettle();
635637
await Future<void>.delayed(Duration(seconds: 2));
636638
await tester.tap(find
@@ -882,12 +884,18 @@ void main() async {
882884

883885
await tester.tap(find.byIcon(Icons.edit));
884886
await tester.pumpAndSettle();
887+
await tester.scrollUntilVisible(find.byKey(const Key('show-events')), 50.0,
888+
scrollable: find.byType(Scrollable).last);
889+
await tester.pumpAndSettle();
885890
await tester.tap(find.byKey(const Key('show-events')));
886891
await tester.pumpAndSettle();
887892

888893
var plan = providerContainer.read(plansProvider).plans.first;
889894
expect(plan.showEvents, true);
890895

896+
await tester.scrollUntilVisible(find.byIcon(Icons.done), -50.0,
897+
scrollable: find.byType(Scrollable).last);
898+
await tester.pumpAndSettle();
891899
await tester.tap(find.byIcon(Icons.done));
892900
await tester.pumpAndSettle();
893901

@@ -897,9 +905,15 @@ void main() async {
897905

898906
await tester.tap(find.byIcon(Icons.edit));
899907
await tester.pumpAndSettle();
908+
await tester.scrollUntilVisible(find.byKey(const Key('show-events')), 50.0,
909+
scrollable: find.byType(Scrollable).last);
910+
await tester.pumpAndSettle();
900911
await tester.tap(find.byKey(const Key('show-events')));
901912
await tester.pumpAndSettle();
902913

914+
await tester.scrollUntilVisible(find.byIcon(Icons.done), -50.0,
915+
scrollable: find.byType(Scrollable).last);
916+
await tester.pumpAndSettle();
903917
await tester.tap(find.byIcon(Icons.done));
904918
await tester.pumpAndSettle();
905919

@@ -917,12 +931,19 @@ void main() async {
917931

918932
await tester.tap(find.byIcon(Icons.edit));
919933
await tester.pumpAndSettle();
934+
await tester.scrollUntilVisible(
935+
find.byKey(const Key('show-locations')), 50.0,
936+
scrollable: find.byType(Scrollable).last);
937+
await tester.pumpAndSettle();
920938
await tester.tap(find.byKey(const Key('show-locations')));
921939
await tester.pumpAndSettle();
922940

923941
var plan = providerContainer.read(plansProvider).plans.first;
924942
expect(plan.showLocations, true);
925943

944+
await tester.scrollUntilVisible(find.byIcon(Icons.done), -50.0,
945+
scrollable: find.byType(Scrollable).last);
946+
await tester.pumpAndSettle();
926947
await tester.tap(find.byIcon(Icons.done));
927948
await tester.pumpAndSettle();
928949

@@ -932,9 +953,16 @@ void main() async {
932953

933954
await tester.tap(find.byIcon(Icons.edit));
934955
await tester.pumpAndSettle();
956+
await tester.scrollUntilVisible(
957+
find.byKey(const Key('show-locations')), 50.0,
958+
scrollable: find.byType(Scrollable).last);
959+
await tester.pumpAndSettle();
935960
await tester.tap(find.byKey(const Key('show-locations')));
936961
await tester.pumpAndSettle();
937962

963+
await tester.scrollUntilVisible(find.byIcon(Icons.done), -50.0,
964+
scrollable: find.byType(Scrollable).last);
965+
await tester.pumpAndSettle();
938966
await tester.tap(find.byIcon(Icons.done));
939967
await tester.pumpAndSettle();
940968

@@ -996,6 +1024,9 @@ void main() async {
9961024
matching: find.byType(Text))
9971025
.first);
9981026
await tester.pumpAndSettle();
1027+
await tester.scrollUntilVisible(find.byIcon(Icons.delete).first, 50.0,
1028+
scrollable: find.byType(Scrollable).last);
1029+
await tester.pumpAndSettle();
9991030
await tester.tap(find.byIcon(Icons.delete));
10001031
await tester.pumpAndSettle();
10011032

local_build.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
flutter --version
2-
flutter pub get
3-
dart format .
4-
dart analyze --fatal-infos
5-
flutter test
1+
./check.sh
62

73
if [[ $(uname) == 'Darwin' ]]; then
84
flutter test integration_test -d macos

0 commit comments

Comments
 (0)