#if os(macOS) import XCTest @testable import DocsKit /// The Format inspector's style pop-up (Fable on #169, finding 5): a /// selection in Heading 4–6 shows that level, not the last style shown. final class DocsInspectorStyleTests: XCTestCase { @MainActor func testHeadingsFourToSixShowTheirOwnLevel() { let en = DocsStrings(locale: Locale(identifier: "en")) XCTAssertEqual(DocsFormatInspector.styleEntries(selected: "paragraph", strings: en).map(\.id), ["paragraph", "heading1", "heading2", "heading3"]) let five = DocsFormatInspector.styleEntries(selected: "heading5", strings: en) XCTAssertEqual(five.last?.id, "heading5", "the pop-up can select it") XCTAssertEqual(five.last?.title, "Heading 5") let ru = DocsFormatInspector.styleEntries(selected: "heading4", strings: DocsStrings(locale: Locale(identifier: "ru"))) XCTAssertEqual(ru.last?.title, "Заголовок 4") } } #endif