@@ -90,23 +90,19 @@ class PinSafeAreaSpec: QuickSpec {
9090 offsetView. pin. all ( ) . margin ( parent. pin. safeArea)
9191 }
9292
93- let expectedSafeAreaInsets = UIEdgeInsets ( top: 44 , left: 0 , bottom: 0 , right: 0 )
94- let expectedOffsetViewSafeAreaInsets = UIEdgeInsets . zero
95-
9693 navigationController. navigationBar. isTranslucent = true
9794 setupWindow ( with: navigationController)
9895
99- if #available( iOS 11 . 0 , tvOS 11 . 0 , * ) {
100- XCTAssertEqual ( viewController. view. safeAreaInsets, expectedSafeAreaInsets)
101- XCTAssertEqual ( mainView. offsetView. safeAreaInsets, expectedOffsetViewSafeAreaInsets)
102- }
96+ let expectedSafeAreaInsets = mainView. safeAreaInsets
97+ let expectedOffsetViewSafeAreaInsets = UIEdgeInsets . zero
98+
10399 XCTAssertEqual ( mainView. pin. safeArea, expectedSafeAreaInsets)
104100 XCTAssertEqual ( mainView. offsetView. pin. safeArea, expectedOffsetViewSafeAreaInsets)
105101 expect ( mainView. safeAreaInsetsDidChangeCalledCount) > 0
106-
102+
107103 let screenSize = mainView. frame. size
108104 XCTAssertEqual ( mainView. frame, CGRect ( x: 0 , y: 0 , width: screenSize. width, height: screenSize. height) )
109- XCTAssertEqual ( mainView. offsetView. frame, CGRect ( x: 0 , y: 44 , width: screenSize. width, height: screenSize. height - 44 ) )
105+ XCTAssertEqual ( mainView. offsetView. frame, CGRect ( x: 0 , y: expectedSafeAreaInsets . top , width: screenSize. width, height: screenSize. height - ( expectedSafeAreaInsets . top + expectedSafeAreaInsets . bottom ) ) )
110106 }
111107
112108 it ( " with OffsetView " ) {
0 commit comments