Merge remote-tracking branch 'upstream/main' into feat/notifications-3054-payment-feed

# Conflicts:
#	test/features/notifications/models/notification_model_test.dart
This commit is contained in:
2026-11-24 11:27:13 +03:00
844 changed files with 30440 additions and 7009 deletions

View File

@@ -1455,6 +1455,42 @@ void main() {
expect(result, isNotNull);
expect(result!['notifications'], isA<List>());
expect(result['notifications'].length, 1);
expect(result['notifications'].first, isA<PersonalDietIsDefinedToCustomerNotification>());
});
test('getNotifications - обрабатывает PersonalDietIsDefinedToAuthor', () async {
const page = 1;
final response = Response(
data: {
'data': [
{
'type': 'personal-diet-is-defined-to-author',
'data': {
'diet_name': 'Test Diet',
'diet_id': 1,
'user_name': 'Client',
},
'read_at': null,
'created_at': '2024-01-01T12:00:00Z',
},
],
'current_page': 1,
'last_page': 1,
'per_page': 10,
'total': 1,
},
statusCode: 200,
requestOptions: RequestOptions(path: '/api/profile/notifications'),
);
when(mockDio.get(any)).thenAnswer((_) async => response);
final result = await notificationsService.getNotifications(page: page);
expect(result, isNotNull);
expect(result!['notifications'], isA<List>());
expect(result['notifications'].length, 1);
expect(result['notifications'].first, isA<PersonalDietIsDefinedToAuthorNotification>());
});
test('getNotifications - обрабатывает UserDailyReportCompleted', () async {