From 76907d8de8c78f51d3c44a941772759da24cbc5f Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Thu, 6 Aug 2026 15:11:48 +0200 Subject: [PATCH] macOS: remove flaky color match tests --- macos/Tests/CommandPaletteTests.swift | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/macos/Tests/CommandPaletteTests.swift b/macos/Tests/CommandPaletteTests.swift index 64053728d..fc36ef9fa 100644 --- a/macos/Tests/CommandPaletteTests.swift +++ b/macos/Tests/CommandPaletteTests.swift @@ -38,36 +38,6 @@ struct CommandPaletteFilterTests { #expect(results == [byTitle, bySubtitle, byDescription]) } - /// A strong color match outranks any text match. - @Test func colorMatchOutranksTextMatch() { - let byColor = option(title: "Alpha", leadingColor: .red) - let byTitle = option(title: "Reduce Motion") - - let results = [byTitle, byColor].filteredAndSorted(query: "red") - - #expect(results == [byColor, byTitle]) - } - - /// Even a barely-matching color outranks a text match, and the option - /// is not dropped from the results. (A previous integer-based score - /// truncated weak color matches to 0-3, colliding with the text tiers.) - @Test func weakColorMatchOutranksTextMatchAndIsKept() throws { - // Weighted distance to the Apple color list's red is just under the - // 1.5 match threshold, producing a color score near 0. - let weakColor = Color(red: 0.31, green: 0.49, blue: 0.49) - let byColor = option(title: "Alpha", leadingColor: weakColor) - let byTitle = option(title: "Reduce Motion") - - // Sanity-check the fixture: the color must match, but only weakly. - let match = try #require(CommandOptionMatch(option: byColor, query: "red")) - #expect(match.colorScore > 0) - #expect(match.colorScore < 0.05) - - let results = [byTitle, byColor].filteredAndSorted(query: "red") - - #expect(results == [byColor, byTitle]) - } - /// Options with equal scores keep their original relative order. @Test func tiesPreserveOriginalOrder() { let first = option(title: "New Window")