19 lines
621 B
Swift
19 lines
621 B
Swift
import AppKit
|
|
import Testing
|
|
@testable import Conjure
|
|
|
|
@Test @MainActor
|
|
func favoriteSpacingLeavesApplicationContentAtNormalHeightAndResetsOnReuse() {
|
|
_ = NSApplication.shared
|
|
let row = LauncherRowView(frame: NSRect(x: 0, y: 0, width: 650, height: 50))
|
|
let cell = ApplicationCell(frame: row.bounds)
|
|
row.addSubview(cell)
|
|
row.topSpacing = 12
|
|
row.layoutSubtreeIfNeeded()
|
|
#expect(cell.frame == NSRect(x: 0, y: 12, width: 650, height: 38))
|
|
row.frame.size.height = 38
|
|
row.topSpacing = 0
|
|
row.layoutSubtreeIfNeeded()
|
|
#expect(cell.frame == NSRect(x: 0, y: 0, width: 650, height: 38))
|
|
}
|