Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ list(APPEND FLUTTER_PLUGIN_LIST
gal
media_kit_video
record_windows
screen_brightness_windows
share_plus
sqlite3_flutter_libs
thumblr_windows
url_launcher_windows
volume_controller
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('example.pdf'), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byType(CachedNetworkImage), findsNWidgets(2));
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.text('GIPHY'), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byType(CachedNetworkImage), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('Flutter'), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byType(StreamUserAvatar), findsNWidgets(2));
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('test'), findsOneWidget);
expect(find.byType(StreamChannelAvatar), findsOneWidget);
expect(find.byType(StreamBackButton), findsOneWidget);
Expand Down Expand Up @@ -140,6 +143,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(
tester
.widget<StreamInfoTile>(find.byType(StreamInfoTile))
Expand Down Expand Up @@ -294,6 +300,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('test'), findsNothing);
expect(find.byType(StreamBackButton), findsNothing);
expect(find.byType(StreamChannelAvatar), findsNothing);
Expand Down Expand Up @@ -368,6 +377,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byType(StreamBackButton), findsNothing);
expect(
tester
Expand Down Expand Up @@ -452,6 +464,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

await tester.tap(find.byType(StreamBackButton));
await tester.tap(find.byType(StreamChannelAvatar));
await tester.tap(find.byType(StreamChannelName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

final image =
tester.widget<CachedNetworkImage>(find.byType(CachedNetworkImage));
expect(image.imageUrl, 'https://bit.ly/321RmWb');
Expand Down Expand Up @@ -115,6 +118,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

final image =
tester.widget<CachedNetworkImage>(find.byType(CachedNetworkImage));
expect(image.imageUrl, 'testimage');
Expand Down Expand Up @@ -178,6 +184,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

final image =
tester.widget<StreamGroupAvatar>(find.byType(StreamGroupAvatar));
final otherMembers = members.where((it) => it.userId != currentUser.id);
Expand Down Expand Up @@ -223,6 +232,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byKey(const Key('selectedImage')), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('test'), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ void main() {
),
]);
when(() => channel.name).thenReturn('test-channel');
when(() => channel.id).thenReturn('123456789');
when(() => channel.isDistinct).thenReturn(true);
when(() => channel.memberCount).thenReturn(2);
when(() => channelState.membersStream).thenAnswer(
Expand Down Expand Up @@ -72,6 +71,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byType(SimpleDialog), findsOneWidget);
expect(find.byType(StreamChannelInfo), findsOneWidget);
expect(find.byType(StreamUserAvatar), findsOneWidget);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byType(PhotoView), findsOneWidget);
expect(find.byType(StreamSvgIcon), findsNWidgets(4));
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byType(StreamSvgIcon), findsNWidgets(2));
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byType(StreamSvgIcon), findsNWidgets(2));
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byKey(typingKey), findsOneWidget);
expect(find.byType(Flexible), findsOneWidget);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('10'), findsOneWidget);
},
);
Expand All @@ -56,7 +59,6 @@ void main() {
final clientState = MockClientState();
final channel = MockChannel();
final channelState = MockChannelState();
when(() => channel.cid).thenReturn('cid');
final lastMessageAt = DateTime.parse('2020-06-22 12:00:00');

when(() => client.state).thenReturn(clientState);
Expand Down Expand Up @@ -85,6 +87,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('0'), findsNothing);
},
);
Expand All @@ -95,7 +100,6 @@ void main() {
final client = MockClient();
final clientState = MockClientState();
final channel = MockChannel();
when(() => channel.cid).thenReturn('cid');
final channelState = MockChannelState();
final lastMessageAt = DateTime.parse('2020-06-22 12:00:00');

Expand Down Expand Up @@ -125,6 +129,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('99+'), findsOneWidget);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byType(TextField), findsOneWidget);
expect(find.byKey(const Key('messageInputText')), findsOneWidget);
},
Expand Down Expand Up @@ -145,7 +148,8 @@ void main() {
),
);

await tester.pump(Duration.zero);
// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('Slow mode ON'), findsOneWidget);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

await tester.tap(find.byType(GestureDetector));
await tester.pumpAndSettle();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.byType(MarkdownBody), findsOneWidget);
},
);
Expand Down Expand Up @@ -133,6 +136,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byType(MarkdownBody), findsOneWidget);

final widgets = tester.allWidgets;
Expand Down Expand Up @@ -169,6 +175,9 @@ void main() {
),
);

// wait for the initial state to be rendered.
await tester.pump(Duration.zero);

expect(find.byType(MarkdownBody), findsOneWidget);

final widgets = tester.allWidgets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ void main() {
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

await tester.tap(find.byType(StreamSystemMessage));

expect(find.text('demo message'), findsOneWidget);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ void main() {

when(() => client.state).thenReturn(clientState);
when(() => clientState.currentUser).thenReturn(OwnUser(id: 'user-id'));
when(() => clientState.channels).thenReturn({channel.cid!: channel});
when(() => channel.lastMessageAt).thenReturn(lastMessageAt);
when(() => channel.state).thenReturn(channelState);
when(() => channel.client).thenReturn(client);
Expand Down Expand Up @@ -61,11 +62,14 @@ void main() {
),
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('with '), findsOneWidget);
expect(find.byType(StreamChannelName), findsOneWidget);
expect(find.byType(StreamBackButton), findsOneWidget);
expect(find.text('1'), findsOneWidget);
expect(find.text('Thread Reply'), findsOneWidget);
},
);
Expand Down Expand Up @@ -135,6 +139,8 @@ void main() {
),
),
));

// wait for the initial state to be rendered.
await tester.pumpAndSettle();

expect(find.text('title'), findsOneWidget);
Expand Down
Loading