Tests/OrgEditorAppKitTests/AppStoreCommandsTests.swift

2b4bbb38252d0a3d7b97adde900413f734f0506b
orgstar/Tests/OrgEditorAppKitTests/AppStoreCommandsTests.swift

20 lines · 680 bytes

 1import Foundation
 2import OrgEditorAppKit
 3import Testing
 4import OrgApp
 5
 6struct AppStoreCommandsTests {
 7    @Test func hiddenCommandsExist() {
 8        let ids = Set(EditorCommands.all.map(\.id))
 9        #expect(AppStoreCommands.hidden.isSubset(of: ids))
10    }
11
12    @Test func pdfKeysExportThroughWebKit() throws {
13        let replacement = try #require(AppStoreCommands.replacement(for: "app.export.pdf"))
14        #expect(replacement == "app.export.print-pdf")
15        #expect(!AppStoreCommands.hidden.contains(replacement))
16        for id in AppStoreCommands.hidden where id != "app.export.pdf" {
17            #expect(AppStoreCommands.replacement(for: id) == nil)
18        }
19    }
20}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form