This commit is contained in:
Mikhail Kilin
2026-01-30 23:55:01 +03:00
parent 433233d766
commit bba5cbd22d
25 changed files with 5896 additions and 1469 deletions

View File

@@ -4,7 +4,7 @@ use ratatui::widgets::ListState;
use std::collections::HashMap;
use tele_tui::app::{App, AppScreen, ChatState};
use tele_tui::config::Config;
use tele_tui::tdlib::client::AuthState;
use tele_tui::tdlib::AuthState;
use tele_tui::tdlib::{ChatInfo, MessageInfo};
/// Builder для создания тестового App
@@ -239,7 +239,7 @@ impl TestAppBuilder {
// Применяем auth state
if let Some(auth_state) = self.auth_state {
app.td_client.auth_state = auth_state;
app.td_client.auth.state = auth_state;
}
// Применяем auth inputs
@@ -263,8 +263,8 @@ impl TestAppBuilder {
// Применяем сообщения к текущему открытому чату
if let Some(chat_id) = self.selected_chat_id {
if let Some(messages) = self.messages.get(&chat_id) {
app.td_client.current_chat_messages = messages.clone();
app.td_client.current_chat_id = Some(chat_id);
app.td_client.message_manager.current_chat_messages = messages.clone();
app.td_client.set_current_chat_id(Some(chat_id));
}
}

View File

@@ -134,7 +134,7 @@ fn snapshot_pinned_message() {
.build();
// Устанавливаем закреплённое сообщение
app.td_client.current_pinned_message = Some(pinned_msg);
app.td_client.set_current_pinned_message(Some(pinned_msg));
let buffer = render_to_buffer(80, 24, |f| {
tele_tui::ui::messages::render(f, f.area(), &app);

View File

@@ -7,7 +7,7 @@ use helpers::snapshot_utils::{buffer_to_string, render_to_buffer};
use helpers::test_data::create_test_chat;
use insta::assert_snapshot;
use tele_tui::app::AppScreen;
use tele_tui::tdlib::client::AuthState;
use tele_tui::tdlib::AuthState;
#[test]
fn snapshot_loading_screen_default() {