mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
Remove timer chatwidget tests
This commit is contained in:
@@ -266,7 +266,6 @@ mod review_mode;
|
||||
mod slash_commands;
|
||||
mod status_and_layout;
|
||||
mod status_command_tests;
|
||||
mod timers;
|
||||
|
||||
pub(crate) use helpers::make_chatwidget_manual_with_sender;
|
||||
pub(crate) use helpers::set_chatgpt_auth;
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
use super::*;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
use codex_protocol::protocol::InjectedMessageEvent;
|
||||
use codex_protocol::protocol::UserMessageEvent;
|
||||
use insta::assert_snapshot;
|
||||
|
||||
#[tokio::test]
|
||||
async fn injected_message_renders_content_history() {
|
||||
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
|
||||
chat.handle_codex_event_replay(Event {
|
||||
id: "event-1".to_string(),
|
||||
msg: EventMsg::InjectedMessage(InjectedMessageEvent {
|
||||
content: "Give me a random animal name.".to_string(),
|
||||
source: "timer timer-1".to_string(),
|
||||
}),
|
||||
});
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
let rendered = lines_to_single_string(&cells[0]);
|
||||
assert_snapshot!(rendered, @"› Give me a random animal name.
|
||||
");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn user_message_xml_renders_literally() {
|
||||
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
|
||||
chat.handle_codex_event_replay(Event {
|
||||
id: "event-1".to_string(),
|
||||
msg: EventMsg::UserMessage(UserMessageEvent {
|
||||
message: "<codex_message>not hidden</codex_message>".to_string(),
|
||||
images: None,
|
||||
local_images: Vec::new(),
|
||||
text_elements: Vec::new(),
|
||||
}),
|
||||
});
|
||||
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
let rendered = lines_to_single_string(&cells[0]);
|
||||
assert_snapshot!(rendered, @"› <codex_message>not hidden</codex_message>
|
||||
");
|
||||
}
|
||||
Reference in New Issue
Block a user