restores Helder in all its glory
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user