Skip to content

Commit f79ae49

Browse files
committed
Fix failing tests on tvOS
1 parent a21050c commit f79ae49

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<key>Demo (macOS).xcscheme_^#shared#^_</key>
1313
<dict>
1414
<key>orderHint</key>
15-
<integer>2</integer>
15+
<integer>1</integer>
1616
</dict>
1717
</dict>
1818
<key>SuppressBuildableAutocreation</key>

Tests/RichTextKitTests/RichTextViewRepresentable+FontSizeTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ final class RichTextViewComponent_FontSizeTests: XCTestCase {
7373
XCTAssertEqual(textView.currentFontSize, size)
7474
assertEqualFontSize(textView.currentRichTextAttribute(.font))
7575
assertEqualFontSize(textView.richTextAttributes(at: selectedRange)[.font])
76-
assertEqualFontSize(textView.typingAttributes[.font])
76+
assertEqualFontSize(textView.typingAttributes[.font], expected: nil)
7777
}
7878

7979
func testCurrentFontSizeWorksForNoSelectedRange() {
@@ -93,8 +93,8 @@ private extension RichTextViewComponent_FontSizeTests {
9393
XCTAssertEqual(attr as? FontRepresentable, font)
9494
}
9595

96-
func assertEqualFontSize(_ attr: Any?) {
97-
XCTAssertEqual((attr as? FontRepresentable)?.pointSize, size)
96+
func assertEqualFontSize(_ attr: Any?, expected: CGFloat? = 666) {
97+
XCTAssertEqual((attr as? FontRepresentable)?.pointSize, expected)
9898
}
9999

100100
func assertNonEqualFont(_ attr: Any?) {

Tests/RichTextKitTests/RichTextViewRepresentableTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ final class RichTextViewComponentTests: XCTestCase {
7373
XCTAssertEqual(view.contentCompressionResistancePriority(for: .horizontal), .defaultLow)
7474
#if iOS || os(tvOS)
7575
XCTAssertEqual(view.spellCheckingType, .no)
76-
XCTAssertEqual(view.textColor, nil)
76+
XCTAssertEqual(view.textColor, .label)
7777
#elseif os(macOS)
7878
XCTAssertEqual(view.textColor, nil)
7979
#endif

0 commit comments

Comments
 (0)