File tree Expand file tree Collapse file tree 4 files changed +17
-31
lines changed
Expand file tree Collapse file tree 4 files changed +17
-31
lines changed Original file line number Diff line number Diff line change 11-- -
22source : tui / src / chatwidget / tests .rs
3- assertion_line : 2618
4- expression : terminal . backend ( )
3+ assertion_line : 2612
4+ expression : active_blob ( & chat )
55-- -
6- " "
7- " ╭───────────────────────────────────────╮ "
8- " │ >_ OpenAI Codex (v0.0.0) │ "
9- " │ │ "
10- " │ model: loading /model to change │ "
11- " │ directory: ~/code/codex/codex-rs/tui │ "
12- " ╰───────────────────────────────────────╯ "
13- " "
14- " "
15- " › Ask Codex to do anything "
16- " "
17- " 100% context left · ? for shortcuts "
18- " "
19- " "
20- " "
6+ ╭───────────────────────────────────────╮
7+ │ > _ OpenAI Codex (v0 .0.0 ) │
8+ │ │
9+ │ model : loading / model to change │
10+ │ directory : / home / user / project │
11+ ╰───────────────────────────────────────╯
Original file line number Diff line number Diff line change @@ -2602,20 +2602,14 @@ async fn ui_snapshots_small_heights_idle() {
26022602
26032603#[ tokio:: test]
26042604async fn startup_header_renders_in_active_cell_before_session_configured_snapshot ( ) {
2605- use ratatui:: Terminal ;
2606- use ratatui:: backend:: TestBackend ;
2607-
26082605 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
26092606 chat. active_cell = Some ( Box :: new (
2610- crate :: history_cell:: StartupSessionHeaderHistoryCell :: new ( chat. config . cwd . clone ( ) ) ,
2607+ // Use a path that's not under $HOME so the rendered directory is stable across CI/dev.
2608+ crate :: history_cell:: StartupSessionHeaderHistoryCell :: new ( PathBuf :: from (
2609+ "/home/user/project" ,
2610+ ) ) ,
26112611 ) ) ;
2612-
2613- let mut terminal = Terminal :: new ( TestBackend :: new ( 60 , 15 ) ) . expect ( "create terminal" ) ;
2614- terminal
2615- . draw ( |f| chat. render ( f. area ( ) , f. buffer_mut ( ) ) )
2616- . expect ( "draw startup header" ) ;
2617-
2618- assert_snapshot ! ( "startup_header_active_cell" , terminal. backend( ) ) ;
2612+ assert_snapshot ! ( "startup_header_active_cell" , active_blob( & chat) ) ;
26192613}
26202614
26212615#[ tokio:: test]
Original file line number Diff line number Diff line change 11-- -
22source : tui2 / src / chatwidget / tests .rs
3- assertion_line : 160
3+ assertion_line : 161
44expression : active_blob (& chat )
55-- -
66╭───────────────────────────────────────╮
77│ > _ OpenAI Codex (v0 .0.0 ) │
88│ │
99│ model : loading / model to change │
10- │ directory : ~ / code / codex / codex - rs / tui2 │
10+ │ directory : / home / user / project │
1111╰───────────────────────────────────────╯
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ async fn resumed_initial_messages_render_history() {
153153#[ tokio:: test]
154154async fn startup_header_renders_in_active_cell_before_session_configured_snapshot ( ) {
155155 let ( mut chat, _rx, _op_rx) = make_chatwidget_manual ( None ) . await ;
156- let startup_dir = chat. config . cwd . clone ( ) ;
156+ // Use a path that's not under $HOME so the rendered directory is stable across CI/dev.
157+ let startup_dir = PathBuf :: from ( "/home/user/project" ) ;
157158 chat. active_cell = Some ( Box :: new (
158159 crate :: history_cell:: StartupSessionHeaderHistoryCell :: new ( startup_dir) ,
159160 ) ) ;
You can’t perform that action at this time.
0 commit comments