adds nice git interface
This commit is contained in:
@@ -7,26 +7,24 @@ import Testing
|
||||
@Test func addingActionsAreTeal() {
|
||||
#expect(ContextMenuOverlay.tint(for: .newFile(inDirectory: "")) == .add)
|
||||
#expect(ContextMenuOverlay.tint(for: .newFolder(inDirectory: "src")) == .add)
|
||||
#expect(ContextMenuOverlay.tint(for: .stage("a.php")) == .add)
|
||||
}
|
||||
|
||||
@Test func finderUnstageAndCopyFileNameAreAmberSoft() {
|
||||
@Test func finderAndCopyFileNameAreAmberSoft() {
|
||||
#expect(ContextMenuOverlay.tint(for: .revealInFinder("a.php")) == .modify)
|
||||
#expect(ContextMenuOverlay.tint(for: .unstage("a.php")) == .modify)
|
||||
#expect(ContextMenuOverlay.tint(for: .copyFileName("a.php")) == .modify)
|
||||
}
|
||||
|
||||
@Test func passOnOpenDiffAndRenameAreGrey() {
|
||||
@Test func passOnShowDiffAndRenameAreGrey() {
|
||||
#expect(ContextMenuOverlay.tint(for: .passOnReference("a.php", code: nil)) == .rename)
|
||||
#expect(ContextMenuOverlay.tint(for: .passOnFileName("a.php")) == .rename)
|
||||
#expect(ContextMenuOverlay.tint(for: .bouwen("x")) == .rename)
|
||||
#expect(ContextMenuOverlay.tint(for: .openDiff("a.php")) == .rename)
|
||||
#expect(ContextMenuOverlay.tint(for: .showDiff("a.php", line: 3)) == .rename)
|
||||
#expect(ContextMenuOverlay.tint(for: .rename("a.php", isDirectory: false)) == .rename)
|
||||
}
|
||||
|
||||
@Test func showDiffWearsTheOpenDiffIcon() {
|
||||
#expect(ContextMenuOverlay.symbol(for: .showDiff("a.php", line: 3)) == ContextMenuOverlay.symbol(for: .openDiff("a.php")))
|
||||
@Test func theGitViewItemsKeepThePlainIcon() {
|
||||
#expect(ContextMenuOverlay.tint(for: .openFile("a.php")) == .plain)
|
||||
#expect(ContextMenuOverlay.tint(for: .commit(andPush: true)) == .plain)
|
||||
}
|
||||
|
||||
@Test func copyReferenceKeepsThePlainIconThatTurnsAmberOnHighlight() {
|
||||
@@ -35,7 +33,7 @@ import Testing
|
||||
}
|
||||
|
||||
@Test func destructiveActionsAreAmberDeep() {
|
||||
#expect(ContextMenuOverlay.tint(for: .discard("a.php")) == .danger)
|
||||
#expect(ContextMenuOverlay.tint(for: .gitDiscard(["a.php"])) == .danger)
|
||||
#expect(ContextMenuOverlay.tint(for: .delete("a", isDirectory: true)) == .danger)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user