11use insta:: assert_snapshot;
2- use tui_pty_e2e:: normalize_for_input_snapshot;
32use tui_pty_e2e:: Key ;
43use tui_pty_e2e:: SessionConfig ;
5- use tui_pty_e2e:: TuiSession ;
64use tui_pty_e2e:: TIMEOUT ;
75use tui_pty_e2e:: TIMEOUT_INPUT ;
6+ use tui_pty_e2e:: TIMEOUT_PRESNAPSHOT ;
7+ use tui_pty_e2e:: TuiSession ;
8+ use tui_pty_e2e:: normalize_for_input_snapshot;
89
910#[ test]
1011fn test_submit_prompt_default_response ( ) {
@@ -30,7 +31,7 @@ fn test_submit_prompt_default_response() {
3031 . wait_for_text ( "Test message 2" , TIMEOUT )
3132 . expect ( "Did not receive second mock response" ) ;
3233
33- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
34+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
3435 assert_snapshot ! (
3536 "prompt_submitted" ,
3637 normalize_for_input_snapshot( session. screen_contents( ) )
@@ -67,7 +68,7 @@ fn test_submit_prompt_missing_model() {
6768 )
6869 . unwrap ( ) ;
6970
70- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
71+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
7172 assert_snapshot ! (
7273 "missing_model" ,
7374 normalize_for_input_snapshot( session. screen_contents( ) )
@@ -92,7 +93,7 @@ fn test_submit_prompt_custom_response() {
9293 . wait_for_text ( "This is a custom test response" , TIMEOUT )
9394 . expect ( "Did not receive custom response" ) ;
9495
95- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
96+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
9697 assert_snapshot ! (
9798 "custom_response" ,
9899 normalize_for_input_snapshot( session. screen_contents( ) )
@@ -112,7 +113,7 @@ fn test_multiline_input() {
112113 session. wait_for_text ( "Line 2" , TIMEOUT ) . unwrap ( ) ;
113114 session. wait_for_text ( "Line 3" , TIMEOUT ) . unwrap ( ) ;
114115
115- std:: thread:: sleep ( TIMEOUT_INPUT ) ;
116+ std:: thread:: sleep ( TIMEOUT_PRESNAPSHOT ) ;
116117 assert_snapshot ! (
117118 "multiline_input" ,
118119 normalize_for_input_snapshot( session. screen_contents( ) )
0 commit comments