mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
snap
This commit is contained in:
@@ -1,20 +1,11 @@
|
||||
---
|
||||
source: tui/src/chatwidget/tests.rs
|
||||
assertion_line: 2618
|
||||
expression: terminal.backend()
|
||||
assertion_line: 2612
|
||||
expression: active_blob(&chat)
|
||||
---
|
||||
" "
|
||||
"╭───────────────────────────────────────╮ "
|
||||
"│ >_ OpenAI Codex (v0.0.0) │ "
|
||||
"│ │ "
|
||||
"│ model: loading /model to change │ "
|
||||
"│ directory: ~/code/codex/codex-rs/tui │ "
|
||||
"╰───────────────────────────────────────╯ "
|
||||
" "
|
||||
" "
|
||||
"› Ask Codex to do anything "
|
||||
" "
|
||||
" 100% context left · ? for shortcuts "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
╭───────────────────────────────────────╮
|
||||
│ >_ OpenAI Codex (v0.0.0) │
|
||||
│ │
|
||||
│ model: loading /model to change │
|
||||
│ directory: /home/user/project │
|
||||
╰───────────────────────────────────────╯
|
||||
|
||||
@@ -2602,20 +2602,14 @@ async fn ui_snapshots_small_heights_idle() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn startup_header_renders_in_active_cell_before_session_configured_snapshot() {
|
||||
use ratatui::Terminal;
|
||||
use ratatui::backend::TestBackend;
|
||||
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
|
||||
chat.active_cell = Some(Box::new(
|
||||
crate::history_cell::StartupSessionHeaderHistoryCell::new(chat.config.cwd.clone()),
|
||||
// Use a path that's not under $HOME so the rendered directory is stable across CI/dev.
|
||||
crate::history_cell::StartupSessionHeaderHistoryCell::new(PathBuf::from(
|
||||
"/home/user/project",
|
||||
)),
|
||||
));
|
||||
|
||||
let mut terminal = Terminal::new(TestBackend::new(60, 15)).expect("create terminal");
|
||||
terminal
|
||||
.draw(|f| chat.render(f.area(), f.buffer_mut()))
|
||||
.expect("draw startup header");
|
||||
|
||||
assert_snapshot!("startup_header_active_cell", terminal.backend());
|
||||
assert_snapshot!("startup_header_active_cell", active_blob(&chat));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
source: tui2/src/chatwidget/tests.rs
|
||||
assertion_line: 160
|
||||
assertion_line: 161
|
||||
expression: active_blob(&chat)
|
||||
---
|
||||
╭───────────────────────────────────────╮
|
||||
│ >_ OpenAI Codex (v0.0.0) │
|
||||
│ │
|
||||
│ model: loading /model to change │
|
||||
│ directory: ~/code/codex/codex-rs/tui2 │
|
||||
│ directory: /home/user/project │
|
||||
╰───────────────────────────────────────╯
|
||||
|
||||
@@ -153,7 +153,8 @@ async fn resumed_initial_messages_render_history() {
|
||||
#[tokio::test]
|
||||
async fn startup_header_renders_in_active_cell_before_session_configured_snapshot() {
|
||||
let (mut chat, _rx, _op_rx) = make_chatwidget_manual(None).await;
|
||||
let startup_dir = chat.config.cwd.clone();
|
||||
// Use a path that's not under $HOME so the rendered directory is stable across CI/dev.
|
||||
let startup_dir = PathBuf::from("/home/user/project");
|
||||
chat.active_cell = Some(Box::new(
|
||||
crate::history_cell::StartupSessionHeaderHistoryCell::new(startup_dir),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user