restores Helder in all its glory

This commit is contained in:
2026-09-28 11:34:49 +02:00
parent c2b38b853c
commit 1d29d0952d
280 changed files with 29205 additions and 7 deletions
@@ -0,0 +1,27 @@
import HelderCore
import Testing
@Suite struct TerminalContextMenuTests {
private func labels(_ target: ContextTarget) -> [String] {
ContextActions.entries(for: target).compactMap { entry in
guard case let .action(_, label) = entry else { return nil }
return label
}
}
@Test func copyAppearsOnlyWithASelection() {
#expect(labels(.terminal(.agent, hasSelection: true)) == ["Copy", "Paste"])
#expect(labels(.terminal(.shell, hasSelection: false)) == ["Paste"])
}
@Test func theActionsNameTheirPane() {
#expect(ContextActions.entries(for: .terminal(.shell, hasSelection: true)) == [
.action(.copyTerminalSelection(.shell), label: "Copy"),
.action(.pasteIntoTerminal(.shell), label: "Paste"),
])
}
@Test func theMenuHasNoHeader() {
#expect(ContextActions.header(for: .terminal(.agent, hasSelection: false), projectName: "app").isEmpty)
}
}