@@ -3,7 +3,7 @@ use std::time::Duration;
33use std:: time:: Instant ;
44use tui_pty_e2e:: SessionConfig ;
55use tui_pty_e2e:: TIMEOUT ;
6- use tui_pty_e2e:: TIMEOUT_INPUT ;
6+ use tui_pty_e2e:: TIMEOUT_PRESNAPSHOT ;
77use tui_pty_e2e:: TuiSession ;
88use tui_pty_e2e:: normalize_for_input_snapshot;
99
@@ -23,13 +23,14 @@ fn test_startup_shows_banner() {
2323 session
2424 . wait_for_text ( "Welcome to Codex" , TIMEOUT )
2525 . expect ( "Prompt did not appear" ) ;
26- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
26+
27+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
2728
2829 let contents = session. screen_contents ( ) ;
2930 assert ! ( contents. contains( "Welcome to Codex" ) ) ;
3031 assert_snapshot ! (
3132 "startup_shows_welcome" ,
32- normalize_for_input_snapshot( session . screen_contents ( ) )
33+ normalize_for_input_snapshot( contents )
3334 ) ;
3435}
3536
@@ -48,14 +49,16 @@ fn test_startup_welcome_with_dimensions() {
4849 session
4950 . wait_for_text ( "OpenAI Codex" , TIMEOUT )
5051 . expect ( "Prompt did not appear" ) ;
51- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
52+
53+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
5254
5355 // Verify terminal size is respected
5456 let contents = session. screen_contents ( ) ;
5557 assert ! ( contents. lines( ) . count( ) <= 40 ) ;
58+
5659 assert_snapshot ! (
5760 "startup_welcome_dimensions_40x120" ,
58- normalize_for_input_snapshot( session . screen_contents ( ) )
61+ normalize_for_input_snapshot( contents )
5962 ) ;
6063}
6164
@@ -74,7 +77,8 @@ fn test_runs_in_temp_directory_by_default() {
7477 session
7578 . wait_for_text ( "To get started" , TIMEOUT )
7679 . expect ( "Prompt did not appear" ) ;
77- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
80+
81+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
7882
7983 let contents = session. screen_contents ( ) ;
8084
@@ -93,7 +97,7 @@ fn test_runs_in_temp_directory_by_default() {
9397 ) ;
9498 assert_snapshot ! (
9599 "runs_in_temp_directory" ,
96- normalize_for_input_snapshot( session . screen_contents ( ) )
100+ normalize_for_input_snapshot( contents )
97101 ) ;
98102}
99103
@@ -105,7 +109,7 @@ fn test_trust_screen_is_skipped_with_default_config() {
105109 session
106110 . wait_for_text ( "›" , TIMEOUT )
107111 . expect ( "Prompt did not appear" ) ;
108- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
112+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
109113
110114 let contents = session. screen_contents ( ) ;
111115
@@ -124,7 +128,7 @@ fn test_trust_screen_is_skipped_with_default_config() {
124128 ) ;
125129 assert_snapshot ! (
126130 "trust_screen_skipped" ,
127- normalize_for_input_snapshot( session . screen_contents ( ) )
131+ normalize_for_input_snapshot( contents )
128132 ) ;
129133}
130134
0 commit comments