forked from eatvio/eatvio_app
fixed pagination
This commit is contained in:
@@ -125,10 +125,10 @@ class GetChatRoomPreviews implements TestCases {
|
||||
Future<bool> run({required String baseUrl}) async {
|
||||
try {
|
||||
// get all of needed services
|
||||
final dio = sl<Dio>();
|
||||
final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
// final dio = sl<Dio>();
|
||||
// final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
|
||||
await chatService.getChatRoomPreviews();
|
||||
// await chatService.getChatRooms();
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
@@ -143,11 +143,11 @@ class GetChatRoom implements TestCases {
|
||||
@override
|
||||
Future<bool> run({required String baseUrl}) async {
|
||||
try {
|
||||
final dio = sl<Dio>();
|
||||
final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
// final dio = sl<Dio>();
|
||||
// final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
|
||||
final chatRoomsModels = await chatService.getChatRoomPreviews();
|
||||
await chatService.getChatRoom(id: chatRoomsModels.chatRooms.firstOrNull?.id ?? '');
|
||||
// final chatRoomsModels = await chatService.getChatRoomPreviews();
|
||||
// await chatService.getChatRoom(id: chatRoomsModels.chatRooms.firstOrNull?.id ?? '');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
@@ -162,11 +162,11 @@ class SendMessage implements TestCases {
|
||||
@override
|
||||
Future<bool> run({required String baseUrl}) async {
|
||||
try {
|
||||
final dio = sl<Dio>();
|
||||
final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
// final dio = sl<Dio>();
|
||||
// final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
|
||||
final chatRoomsModels = await chatService.getChatRoomPreviews();
|
||||
await chatService.sendMessage(id: chatRoomsModels.chatRooms.firstOrNull?.id ?? '', data: 'test message');
|
||||
// final chatRoomsModels = await chatService.getChatRoomPreviews();
|
||||
// await chatService.sendMessage(id: chatRoomsModels.chatRooms.firstOrNull?.id ?? '', data: 'test message');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
@@ -181,11 +181,11 @@ class GetChatMessages implements TestCases {
|
||||
@override
|
||||
Future<bool> run({required String baseUrl}) async {
|
||||
try {
|
||||
final dio = sl<Dio>();
|
||||
final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
// final dio = sl<Dio>();
|
||||
// final chatService = ChatService(dio, baseUrl: baseUrl);
|
||||
|
||||
final chatRoomsModels = await chatService.getChatRoomPreviews();
|
||||
await chatService.getChatMessages(id: chatRoomsModels.chatRooms.firstOrNull?.id ?? '', page: 1);
|
||||
// final chatRoomsModels = await chatService.getChatRoomPreviews();
|
||||
// await chatService.getChatMessages(id: chatRoomsModels.chatRooms.firstOrNull?.id ?? '', page: 1);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user