Files
AlexKucera 997607b9d3 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
2026-10-08 21:30:59 +02:00

26 lines
748 B
Swift

//
// MuseionTests.swift
// MuseionTests
//
// Created by Alexander Kucera on 26.08.26.
//
import AppKit
@testable import Museion
import Testing
@Test func `metadata names the app`() {
#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" })
}