@@ -118,8 +118,9 @@ void main() {
|
||||
final clientState = MockClientState();
|
||||
|
||||
when(() => client.state).thenReturn(clientState);
|
||||
when(() => clientState.totalUnreadCount).thenAnswer((_) => 0);
|
||||
when(() => clientState.totalUnreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(0));
|
||||
.thenAnswer((_) => Stream.value(0));
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
|
||||
@@ -34,6 +34,7 @@ void main() {
|
||||
.thenAnswer((_) => Stream.value(ConnectionStatus.connected));
|
||||
when(() => channelState.unreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(1));
|
||||
when(() => clientState.totalUnreadCount).thenAnswer((i) => 1);
|
||||
when(() => clientState.totalUnreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(1));
|
||||
when(() => channelState.membersStream).thenAnswer((i) => Stream.value([
|
||||
@@ -109,6 +110,7 @@ void main() {
|
||||
.thenAnswer((_) => Stream.value(ConnectionStatus.disconnected));
|
||||
when(() => client.wsConnectionStatus)
|
||||
.thenReturn(ConnectionStatus.disconnected);
|
||||
when(() => clientState.totalUnreadCount).thenAnswer((i) => 1);
|
||||
when(() => clientState.totalUnreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(1));
|
||||
|
||||
@@ -171,6 +173,7 @@ void main() {
|
||||
]);
|
||||
when(() => client.wsConnectionStatusStream)
|
||||
.thenAnswer((_) => Stream.value(ConnectionStatus.connecting));
|
||||
when(() => clientState.totalUnreadCount).thenAnswer((i) => 1);
|
||||
when(() => clientState.totalUnreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(1));
|
||||
|
||||
@@ -375,6 +378,7 @@ void main() {
|
||||
]);
|
||||
when(() => client.wsConnectionStatusStream)
|
||||
.thenAnswer((_) => Stream.value(ConnectionStatus.connecting));
|
||||
when(() => clientState.totalUnreadCount).thenAnswer((i) => 1);
|
||||
when(() => clientState.totalUnreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(1));
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -552,10 +552,8 @@ void main() {
|
||||
|
||||
when(() => client.state).thenReturn(clientState);
|
||||
when(() => clientState.user).thenReturn(OwnUser(id: 'user-id'));
|
||||
when(() => client.flagMessage(any())).thenThrow(ApiError(
|
||||
'{}',
|
||||
500,
|
||||
));
|
||||
when(() => client.flagMessage(any()))
|
||||
.thenThrow(StreamChatNetworkError(ChatErrorCode.internalSystemError));
|
||||
|
||||
final themeData = ThemeData();
|
||||
final streamTheme = StreamChatThemeData.fromTheme(themeData);
|
||||
@@ -609,10 +607,8 @@ void main() {
|
||||
|
||||
when(() => client.state).thenReturn(clientState);
|
||||
when(() => clientState.user).thenReturn(OwnUser(id: 'user-id'));
|
||||
when(() => client.flagMessage(any())).thenThrow(ApiError(
|
||||
'{"code":4}',
|
||||
400,
|
||||
));
|
||||
when(() => client.flagMessage(any()))
|
||||
.thenThrow(StreamChatNetworkError(ChatErrorCode.inputError));
|
||||
|
||||
final themeData = ThemeData();
|
||||
final streamTheme = StreamChatThemeData.fromTheme(themeData);
|
||||
@@ -719,10 +715,8 @@ void main() {
|
||||
|
||||
when(() => client.state).thenReturn(clientState);
|
||||
when(() => clientState.user).thenReturn(OwnUser(id: 'user-id'));
|
||||
when(() => channel.deleteMessage(any())).thenThrow(ApiError(
|
||||
'{}',
|
||||
500,
|
||||
));
|
||||
when(() => channel.deleteMessage(any()))
|
||||
.thenThrow(StreamChatNetworkError(ChatErrorCode.internalSystemError));
|
||||
|
||||
final themeData = ThemeData();
|
||||
final streamTheme = StreamChatThemeData.fromTheme(themeData);
|
||||
|
||||
@@ -45,6 +45,7 @@ void main() {
|
||||
]);
|
||||
when(() => client.wsConnectionStatusStream)
|
||||
.thenAnswer((_) => Stream.value(ConnectionStatus.connecting));
|
||||
when(() => clientState.totalUnreadCount).thenAnswer((i) => 1);
|
||||
when(() => clientState.totalUnreadCountStream)
|
||||
.thenAnswer((i) => Stream.value(1));
|
||||
|
||||
|
||||