test(pty): cover add-note stack and deletion rows#348
Conversation
Greptile SummaryThis PR adds PTY integration test coverage for two previously untested
Confidence Score: 4/5Safe to merge — changes are test-only and add new coverage without touching production code. The stack-mode test discards the waitForText result and re-reads the terminal snapshot with a separate text() call, creating a small race window not present in the deletion-only test. This inconsistency could cause intermittent CI failures if a redraw fires between the two calls. test/pty/ui-integration.test.ts — the stack-mode test snapshot-acquisition pattern is worth aligning with the deletion-only test. Important Files Changed
Sequence DiagramsequenceDiagram
participant Test
participant harness
participant PTY as PTY Session
Note over Test,PTY: stack-mode add-note flow
Test->>harness: createLongWrapFilePair()
Test->>PTY: launchHunk(--mode stack)
PTY-->>Test: waitForText(nav bar)
Test->>Test: lineIndexOf(initial, "this is a very long")
Test->>PTY: revealAddNoteNear(session, targetRow)
loop probe 3x3 grid
Test->>PTY: moveMouse(x, y)
PTY-->>Test: waitForText([+]) 200ms
end
Test->>PTY: click([+])
PTY-->>Test: waitForText("Draft note")
Test->>PTY: type("Save this stack draft.")
Test->>PTY: press(ctrl+s)
PTY-->>Test: waitForText("Your note")
Note over Test,PTY: deletion-only add-note flow
Test->>harness: createDeletionOnlyFilePair()
Test->>PTY: launchHunk(--mode split)
PTY-->>Test: waitForText("removeMe")
Test->>Test: lineIndexOf(initial, "removeMe")
Test->>PTY: revealAddNoteNear(session, targetRow)
Test->>PTY: click([+])
PTY-->>Test: waitForText("Draft note")
Test->>PTY: type("Save this deletion draft.")
Test->>PTY: press(ctrl+s)
PTY-->>Test: waitForText("Your note")
|
3eb3ff1 to
a1b0b77
Compare
Summary
[+]notes in stack layout[+]notes on deletion-only rowsTests