@@ -162,24 +162,23 @@ void main() {
|
|||||||
|
|
||||||
final mockWSChannel = MockWSChannel();
|
final mockWSChannel = MockWSChannel();
|
||||||
|
|
||||||
final StreamController<String> streamController =
|
final streamController = StreamController<String>.broadcast();
|
||||||
StreamController<String>.broadcast();
|
|
||||||
|
|
||||||
final computedUrl =
|
const computedUrl =
|
||||||
'wss://baseurl/connect?test=true&json=%7B%22payload%22%3A%22test%22%2C%22user_details%22%3A%7B%22id%22%3A%22testid%22%7D%7D';
|
'wss://baseurl/connect?test=true&json=%7B%22payload%22%3A%22test%22%2C%22user_details%22%3A%7B%22id%22%3A%22testid%22%7D%7D';
|
||||||
|
|
||||||
when(connectFunc(computedUrl)).thenAnswer((_) => mockWSChannel);
|
when(() => connectFunc(computedUrl)).thenAnswer((_) => mockWSChannel);
|
||||||
when(mockWSChannel.sink).thenAnswer((_) => MockWSSink());
|
when(() => mockWSChannel.sink).thenAnswer((_) => MockWSSink());
|
||||||
when(mockWSChannel.stream).thenAnswer((_) {
|
when(() => mockWSChannel.stream).thenAnswer((_) => streamController.stream);
|
||||||
return streamController.stream;
|
|
||||||
});
|
|
||||||
|
|
||||||
ws.connect();
|
ws.connect();
|
||||||
await ws.disconnect();
|
await ws.disconnect();
|
||||||
streamController.add('{}');
|
streamController.add('{}');
|
||||||
|
|
||||||
verify(connectFunc(computedUrl)).called(1);
|
verify(() => connectFunc(computedUrl)).called(1);
|
||||||
verifyNever(handleFunc(any));
|
verifyNever(() => handleFunc(any()));
|
||||||
|
|
||||||
|
addTearDown(streamController.close);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should run correctly health check', () async {
|
test('should run correctly health check', () async {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/Users/salvatoregiordano/fvm/versions/beta
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"flutterSdkVersion": "beta"
|
|
||||||
}
|
|
||||||
@@ -25,11 +25,6 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
stream_chat_flutter:
|
stream_chat_flutter:
|
||||||
path: ../
|
path: ../
|
||||||
stream_chat_persistence:
|
|
||||||
git:
|
|
||||||
url: https://github.com/GetStream/stream-chat-flutter.git
|
|
||||||
ref: develop
|
|
||||||
path: packages/stream_chat_persistence
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ environment:
|
|||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
stream_chat_flutter_core:
|
stream_chat_flutter_core: ^1.5.0
|
||||||
path: ../stream_chat_flutter_core
|
|
||||||
photo_view: ^0.11.0
|
photo_view: ^0.11.0
|
||||||
rxdart: ^0.26.0
|
rxdart: ^0.26.0
|
||||||
scrollable_positioned_list: ^0.1.8
|
scrollable_positioned_list: ^0.1.8
|
||||||
@@ -50,6 +49,8 @@ dependencies:
|
|||||||
|
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
|
stream_chat:
|
||||||
|
path: ../stream_chat
|
||||||
stream_chat_flutter_core:
|
stream_chat_flutter_core:
|
||||||
path: ../stream_chat_flutter_core
|
path: ../stream_chat_flutter_core
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ dependencies:
|
|||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.0
|
cupertino_icons: ^1.0.0
|
||||||
|
|
||||||
|
dependency_overrides:
|
||||||
|
stream_chat:
|
||||||
|
path: ../../stream_chat
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final errorMessage = 'Error! Error! Error!';
|
final errorMessage = 'Error! Error! Error!';
|
||||||
final error = DioError(type: DioErrorType.RESPONSE, error: errorMessage);
|
final error = DioError(type: DioErrorType.response, error: errorMessage);
|
||||||
when(mockChannel.initialized).thenAnswer((_) => Future.error(error));
|
when(mockChannel.initialized).thenAnswer((_) => Future.error(error));
|
||||||
|
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
|
|||||||
@@ -11,13 +11,16 @@ dependencies:
|
|||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
cupertino_icons: ^1.0.0
|
cupertino_icons: ^1.0.0
|
||||||
stream_chat:
|
|
||||||
path: ../../stream_chat
|
|
||||||
stream_chat_persistence:
|
stream_chat_persistence:
|
||||||
path: ../
|
path: ../
|
||||||
|
|
||||||
|
dependency_overrides:
|
||||||
|
stream_chat:
|
||||||
|
path: ../../stream_chat
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
@@ -20,8 +20,7 @@ dependencies:
|
|||||||
path: ^1.8.0
|
path: ^1.8.0
|
||||||
path_provider: ^2.0.0
|
path_provider: ^2.0.0
|
||||||
sqlite3_flutter_libs: ^0.4.0+1
|
sqlite3_flutter_libs: ^0.4.0+1
|
||||||
stream_chat:
|
stream_chat: ^1.5.0
|
||||||
path: ../stream_chat
|
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
stream_chat:
|
stream_chat:
|
||||||
|
|||||||
Reference in New Issue
Block a user