feat(video_calls): fixed online indicator and in app notifications for video call

This commit is contained in:
misha
2026-06-24 08:26:16 +03:00
parent 8ff826fa3e
commit c5bf5acfe7
22 changed files with 569 additions and 51 deletions

View File

@@ -28,12 +28,14 @@ void main() {
expect(model.profilePhotoUrl, isNull);
});
test('fromJson создает ChatUserModel из JSON', () {
test('fromJson creates ChatUserModel from JSON', () {
final json = {
'id': 1,
'name': 'User Name',
'slug': 'user-slug',
'profile_photo_url': 'https://example.com/photo.jpg',
'is_online': true,
'last_seen_text': 'был(а) недавно',
};
final model = ChatUserModel.fromJson(json);
@@ -42,6 +44,8 @@ void main() {
expect(model.name, 'User Name');
expect(model.slug, 'user-slug');
expect(model.profilePhotoUrl, 'https://example.com/photo.jpg');
expect(model.isOnline, isTrue);
expect(model.lastSeenText, 'был(а) недавно');
});
test('fromJson создает ChatUserModel из JSON без фото', () {

View File

@@ -220,7 +220,7 @@ void main() {
expect(cubit.state.callStageEntered, isTrue);
});
test('outgoing call keeps lobby until callee joins', () async {
test('outgoing call stays on connecting lobby until callee joins', () async {
when(
mockManager.startCall(
conversationUuid: anyNamed('conversationUuid'),