fix(app): fold reading toggle into the system View menu (#84)
CommandMenu("View") created a second View menu beside the system
one. CommandGroup(after: .toolbar) puts Toggle Reading Mode into
the system View menu; ⌘R and the .toggleReadingMode notification
are unchanged. Hosted test pins exactly one View-titled menu.
Closes #84
This commit is contained in:
1 parent
4e8865e660
commit
997607b9d3
3 files changed
+14
-2
No files matched your search
@@ -5,6 +5,7 @@
|
||||
// Created by Alexander Kucera on 26.08.26.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
@testable import Museion
|
||||
import Testing
|
||||
|
||||
@@ -12,3 +13,13 @@ import Testing
|
||||
#expect(AppMetadata.name == "Museion")
|
||||
#expect(AppMetadata.tagline == "The Agentic Writing Environment")
|
||||
}
|
||||
|
||||
/// #84: pins one View menu carrying the reading toggle. View items are
|
||||
/// context-lazy, so the View-titled menu count is the discriminator.
|
||||
@MainActor
|
||||
@Test func `single View menu hosts the reading toggle`() throws {
|
||||
let main = try #require(NSApp.mainMenu)
|
||||
let viewMenus = main.items.filter { $0.title == "View" }
|
||||
#expect(viewMenus.count == 1)
|
||||
#expect((viewMenus.first?.submenu?.items ?? []).contains { $0.title == "Toggle Reading Mode" })
|
||||
}
|
||||
Reference in new issue
Block a user