style: use emoji icons for Notes and Translate
This commit is contained in:
@@ -2,13 +2,14 @@ import AppKit
|
||||
import Testing
|
||||
@testable import Conjure
|
||||
|
||||
@Test @MainActor func emojiCommandArtworkHasBalancedVisiblePadding() throws {
|
||||
@Test(arguments: ["emoji", "notes", "translate"])
|
||||
@MainActor func commandArtworkHasBalancedVisiblePadding(query: String) throws {
|
||||
_ = NSApplication.shared
|
||||
let launcher = LauncherWindowController()
|
||||
func descendants(_ view: NSView) -> [NSView] { [view] + view.subviews.flatMap(descendants) }
|
||||
let views = descendants(try #require(launcher.window?.contentView))
|
||||
let search = try #require(views.compactMap { $0 as? NSSearchField }.first)
|
||||
search.stringValue = "emoji"
|
||||
search.stringValue = query
|
||||
launcher.controlTextDidChange(Notification(name: NSControl.textDidChangeNotification, object: search))
|
||||
let table = try #require(views.compactMap { $0 as? NSTableView }.first)
|
||||
let cell = try #require(launcher.tableView(table, viewFor: nil, row: 0) as? ApplicationCell)
|
||||
|
||||
Reference in New Issue
Block a user