mirror of
https://github.com/openai/codex.git
synced 2026-09-05 15:18:41 +00:00
Pin terminal title project root tests
This commit is contained in:
@@ -3,9 +3,17 @@
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
fn cache_missing_project_root(chat: &mut ChatWidget) {
|
||||
chat.status_line_project_root_name_cache = Some(CachedProjectRootName {
|
||||
cwd: chat.config.cwd.to_path_buf(),
|
||||
root_name: None,
|
||||
});
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn terminal_title_shows_action_required_while_exec_approval_is_pending() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
cache_missing_project_root(&mut chat);
|
||||
chat.bottom_pane.set_task_running(/*running*/ true);
|
||||
chat.refresh_terminal_title();
|
||||
|
||||
@@ -75,6 +83,7 @@ async fn terminal_title_action_required_respects_spinner_setting() {
|
||||
#[tokio::test]
|
||||
async fn terminal_title_action_required_blinks_when_animations_are_enabled() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
cache_missing_project_root(&mut chat);
|
||||
chat.bottom_pane.set_task_running(/*running*/ true);
|
||||
chat.terminal_title_animation_origin = Instant::now() - std::time::Duration::from_millis(1500);
|
||||
chat.refresh_terminal_title();
|
||||
@@ -106,6 +115,7 @@ async fn terminal_title_action_required_blinks_when_animations_are_enabled() {
|
||||
#[tokio::test]
|
||||
async fn terminal_title_activity_indicators_do_not_animate_when_animations_are_disabled() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
cache_missing_project_root(&mut chat);
|
||||
chat.config.animations = false;
|
||||
chat.bottom_pane.set_task_running(/*running*/ true);
|
||||
chat.terminal_title_animation_origin = Instant::now() - std::time::Duration::from_millis(1500);
|
||||
|
||||
Reference in New Issue
Block a user