fix tests

This commit is contained in:
Salvatore Giordano
2020-11-24 13:07:48 +01:00
parent 8f4e2384f7
commit 93c324ac56
5 changed files with 26 additions and 13 deletions
+6 -3
View File
@@ -42,7 +42,8 @@ void main() {
await tester.pump(Duration(milliseconds: 1000));
expect(find.byKey(Key('MessageWidget')), findsOneWidget);
expect(find.byIcon(StreamIcons.thumbs_up_reaction), findsOneWidget);
expect(find.byKey(Key('StreamSvgIcon-Icon_thumbs_up_reaction.svg')),
findsOneWidget);
},
);
@@ -91,8 +92,10 @@ void main() {
await tester.pump(Duration(milliseconds: 1000));
expect(find.byKey(Key('MessageWidget')), findsOneWidget);
expect(find.byIcon(StreamIcons.thumbs_up_reaction), findsNWidgets(2));
expect(find.byIcon(StreamIcons.love_reaction), findsNWidgets(2));
expect(find.byKey(Key('StreamSvgIcon-Icon_thumbs_up_reaction.svg')),
findsNWidgets(2));
expect(find.byKey(Key('StreamSvgIcon-Icon_love_reaction.svg')),
findsNWidgets(2));
expect(find.text(testUserId), findsNWidgets(2));
},
);
+8 -4
View File
@@ -25,7 +25,8 @@ void main() {
),
);
expect(find.byIcon(StreamIcons.thumbs_up_reaction), findsNothing);
expect(find.byKey(Key('StreamSvgIcon-Icon_thumbs_up_reaction.svg')),
findsNothing);
},
);
@@ -61,7 +62,8 @@ void main() {
),
);
expect(find.byIcon(StreamIcons.thumbs_up_reaction), findsOneWidget);
expect(find.byKey(Key('StreamSvgIcon-Icon_thumbs_up_reaction.svg')),
findsOneWidget);
},
);
testWidgets(
@@ -100,8 +102,10 @@ void main() {
),
);
expect(find.byIcon(StreamIcons.thumbs_up_reaction), findsOneWidget);
expect(find.byIcon(StreamIcons.love_reaction), findsOneWidget);
expect(find.byKey(Key('StreamSvgIcon-Icon_thumbs_up_reaction.svg')),
findsOneWidget);
expect(find.byKey(Key('StreamSvgIcon-Icon_love_reaction.svg')),
findsOneWidget);
},
);
}