@@ -28,11 +28,10 @@ - (void)setUp
2828{
2929 [super setUp ];
3030
31- self.parentView = [self _shadowViewWithConfig: ^(YGNodeRef node) {
32- YGNodeStyleSetFlexDirection (node, YGFlexDirectionColumn);
33- YGNodeStyleSetWidth (node, 440 );
34- YGNodeStyleSetHeight (node, 440 );
35- }];
31+ self.parentView = [RCTRootShadowView new ];
32+ YGNodeStyleSetFlexDirection (self.parentView .cssNode , YGFlexDirectionColumn);
33+ YGNodeStyleSetWidth (self.parentView .cssNode , 440 );
34+ YGNodeStyleSetHeight (self.parentView .cssNode , 440 );
3635 self.parentView .reactTag = @1 ; // must be valid rootView tag
3736}
3837
@@ -132,6 +131,7 @@ - (void)testAncestorCheck
132131- (void )testAssignsSuggestedWidthDimension
133132{
134133 [self _withShadowViewWithStyle: ^(YGNodeRef node) {
134+ YGNodeStyleSetPositionType (node, YGPositionTypeAbsolute);
135135 YGNodeStyleSetPosition (node, YGEdgeLeft, 0 );
136136 YGNodeStyleSetPosition (node, YGEdgeTop, 0 );
137137 YGNodeStyleSetHeight (node, 10 );
@@ -143,6 +143,7 @@ - (void)testAssignsSuggestedWidthDimension
143143- (void )testAssignsSuggestedHeightDimension
144144{
145145 [self _withShadowViewWithStyle: ^(YGNodeRef node) {
146+ YGNodeStyleSetPositionType (node, YGPositionTypeAbsolute);
146147 YGNodeStyleSetPosition (node, YGEdgeLeft, 0 );
147148 YGNodeStyleSetPosition (node, YGEdgeTop, 0 );
148149 YGNodeStyleSetWidth (node, 10 );
@@ -154,6 +155,7 @@ - (void)testAssignsSuggestedHeightDimension
154155- (void )testDoesNotOverrideDimensionStyleWithSuggestedDimensions
155156{
156157 [self _withShadowViewWithStyle: ^(YGNodeRef node) {
158+ YGNodeStyleSetPositionType (node, YGPositionTypeAbsolute);
157159 YGNodeStyleSetPosition (node, YGEdgeLeft, 0 );
158160 YGNodeStyleSetPosition (node, YGEdgeTop, 0 );
159161 YGNodeStyleSetWidth (node, 10 );
@@ -189,11 +191,12 @@ - (void)_withShadowViewWithStyle:(void(^)(YGNodeRef node))configBlock
189191 NSStringFromCGRect(actualRect));
190192}
191193
192- - (RCTRootShadowView *)_shadowViewWithConfig : (void (^)(YGNodeRef node))configBlock
194+ - (RCTShadowView *)_shadowViewWithConfig : (void (^)(YGNodeRef node))configBlock
193195{
194- RCTRootShadowView *shadowView = [RCTRootShadowView new ];
196+ RCTShadowView *shadowView = [RCTShadowView new ];
195197 configBlock (shadowView.cssNode );
196198 return shadowView;
197199}
198200
201+
199202@end
0 commit comments