@@ -2233,10 +2233,14 @@ Syntax: \`avg(column)\`
22332233 } )
22342234 cy . getByDataHook ( "inline-diff-container" ) . should ( "have.length" , 1 )
22352235
2236- cy . getByDataHook ( "message-action-accept" ) . should ( "be.visible" )
2236+ cy . getByDataHook ( "inline-diff-container" )
2237+ . eq ( 0 )
2238+ . getByDataHook ( "message-action-accept" )
2239+ . should ( "be.visible" )
22372240 cy . getByDataHook ( "chat-context-badge" ) . should ( "not.exist" )
22382241
22392242 // Turn 1: User sends "select 2" without accepting/rejecting turn 0
2243+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
22402244 cy . getByDataHook ( "chat-input-textarea" ) . type ( "select 2" )
22412245 cy . getByDataHook ( "chat-send-button" ) . click ( )
22422246
@@ -2248,7 +2252,12 @@ Syntax: \`avg(column)\`
22482252 cy . getByDataHook ( "inline-diff-container" ) . should ( "have.length" , 2 )
22492253
22502254 // Accept turn 1's suggestion (SELECT 2)
2251- cy . getByDataHook ( "message-action-accept" ) . click ( )
2255+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
2256+ cy . getByDataHook ( "inline-diff-container" )
2257+ . eq ( 1 )
2258+ . getByDataHook ( "message-action-accept" )
2259+ . should ( "be.visible" )
2260+ . click ( )
22522261 cy . getByDataHook ( "inline-diff-container" )
22532262 . contains ( "Accepted" )
22542263 . should ( "be.visible" )
@@ -2257,6 +2266,7 @@ Syntax: \`avg(column)\`
22572266 cy . get ( ".aiQueryHighlight" ) . should ( "exist" )
22582267
22592268 // Turn 2: User sends "select 3" - should see "User accepted" message
2269+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
22602270 cy . getByDataHook ( "chat-input-textarea" ) . type ( "select 3" , { force : true } )
22612271 cy . getByDataHook ( "chat-send-button" ) . click ( )
22622272
@@ -2275,6 +2285,7 @@ Syntax: \`avg(column)\`
22752285 . should ( "exist" )
22762286
22772287 // Turn 3: User sends "select 4"
2288+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
22782289 cy . getByDataHook ( "chat-input-textarea" ) . type ( "select 4" , { force : true } )
22792290 cy . getByDataHook ( "chat-send-button" ) . click ( )
22802291
@@ -2286,10 +2297,16 @@ Syntax: \`avg(column)\`
22862297 cy . getByDataHook ( "inline-diff-container" ) . should ( "have.length" , 4 )
22872298
22882299 // Reject turn 3's suggestion (SELECT 4)
2289- cy . getByDataHook ( "message-action-reject" ) . click ( )
2300+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
2301+ cy . getByDataHook ( "inline-diff-container" )
2302+ . eq ( 3 )
2303+ . getByDataHook ( "message-action-reject" )
2304+ . should ( "be.visible" )
2305+ . click ( )
22902306 cy . getByDataHook ( "diff-status-rejected" ) . should ( "contain" , "Rejected" )
22912307
22922308 // Turn 4: User sends "select 5" - should see "User rejected" message
2309+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
22932310 cy . getByDataHook ( "chat-input-textarea" ) . type ( "select 5" , { force : true } )
22942311 cy . getByDataHook ( "chat-send-button" ) . click ( )
22952312
@@ -2301,14 +2318,20 @@ Syntax: \`avg(column)\`
23012318 } )
23022319 cy . getByDataHook ( "inline-diff-container" ) . should ( "have.length" , 5 )
23032320 // Accept turn 4's suggestion (SELECT 5)
2304- cy . getByDataHook ( "message-action-accept" ) . click ( )
2321+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
2322+ cy . getByDataHook ( "inline-diff-container" )
2323+ . eq ( 4 )
2324+ . getByDataHook ( "message-action-accept" )
2325+ . should ( "be.visible" )
2326+ . click ( )
23052327 cy . getByDataHook ( "inline-diff-container" )
23062328 . eq ( 4 )
23072329 . contains ( "Accepted" )
23082330 . should ( "be.visible" )
23092331 cy . getByDataHook ( "chat-context-badge" ) . should ( "contain" , "SELECT 5" )
23102332
23112333 // Turn 5: Final turn - should see "User accepted" for SELECT 5
2334+ cy . getByDataHook ( "messages-end" ) . scrollIntoView ( )
23122335 cy . getByDataHook ( "chat-input-textarea" ) . type ( "select 6" , { force : true } )
23132336 cy . getByDataHook ( "chat-send-button" ) . click ( )
23142337
0 commit comments