Files
ichmagmaus111andClaude Opus 5.5 0622057a4f Ghostgram: open-source release
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:57:09 +01:00

31 lines
895 B
Swift

#if canImport(UIKit)
import XCTest
import UIKit
@testable import RichTextEditorUIKit
final class TransientCaretViewTests: XCTestCase {
func test_startsHidden() {
let v = TransientCaretView(frame: .zero)
XCTAssertTrue(v.isHidden)
XCTAssertEqual(v.alpha, 0, accuracy: 0.001)
XCTAssertFalse(v.isUserInteractionEnabled)
}
func test_accentColorSetsBackground() {
let v = TransientCaretView(frame: .zero)
v.accentColor = .red
XCTAssertEqual(v.backgroundColor, .red)
}
func test_showUnhidesAndOpaque_hideHidesAndClear() {
let v = TransientCaretView(frame: .zero)
v.show(animated: false)
XCTAssertFalse(v.isHidden)
XCTAssertEqual(v.alpha, 1, accuracy: 0.001)
v.hide(animated: false)
XCTAssertTrue(v.isHidden)
XCTAssertEqual(v.alpha, 0, accuracy: 0.001)
}
}
#endif