This commit is contained in:
Mikhail Kilin
2026-01-31 03:48:50 +03:00
parent 1bf9b3d703
commit 644e36597d
37 changed files with 1070 additions and 600 deletions

View File

@@ -6,6 +6,7 @@ use helpers::app_builder::TestAppBuilder;
use helpers::snapshot_utils::{buffer_to_string, render_to_buffer};
use helpers::test_data::{create_test_chat, TestChatBuilder, TestMessageBuilder};
use insta::assert_snapshot;
use tele_tui::types::{ChatId, MessageId};
#[test]
fn snapshot_empty_chat() {
@@ -154,8 +155,8 @@ fn snapshot_outgoing_read() {
.build();
// Set last_read_outbox to simulate message being read
if let Some(chat) = app.chats.iter_mut().find(|c| c.id == 123) {
chat.last_read_outbox_message_id = 2;
if let Some(chat) = app.chats.iter_mut().find(|c| c.id == ChatId::new(123)) {
chat.last_read_outbox_message_id = MessageId::new(2);
}
let buffer = render_to_buffer(80, 24, |f| {