test(pty): cover add-note keyboard actions#336
Conversation
Greptile SummaryAdds a PTY integration test that verifies keyboard shortcut behaviour (
Confidence Score: 5/5Test-only change that adds keyboard-shortcut coverage for an existing UI flow; no production code is touched. The new test faithfully mirrors the established mouse-click test pattern, uses the same waitForSnapshot-throws-on-timeout guarantee for the cancel branch, and properly asserts note content for the save branch. No logic gaps or false-positive paths were found. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant T as Test
participant S as Session (PTY)
participant H as Harness
Note over T,H: Cancel flow (Escape)
T->>S: moveMouse(8, 5)
S-->>T: waitForText([+])
T->>S: click([+])
S-->>T: waitForText("Draft note")
T->>S: type("Cancel this shortcut draft.")
T->>S: press("escape")
T->>H: waitForSnapshot
H-->>T: cancelled snapshot
T->>T: expect not "Your note"
Note over T,H: Save flow (Ctrl+S)
T->>S: moveMouse(8, 5)
S-->>T: waitForText([+])
T->>S: click([+])
S-->>T: waitForText("Draft note")
T->>S: type("Save this shortcut draft.")
T->>S: press ctrl+s
S-->>T: waitForText("Your note")
T->>T: expect note content
Reviews (1): Last reviewed commit: "test(pty): cover add-note keyboard actio..." | Re-trigger Greptile |
Summary
[+]draft notesEsccancels a clicked draftCtrl-Ssaves a clicked draftTests