-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix external components layout * Fix external component navigationItem options resolving * f
- Loading branch information
Showing
6 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
playground/ios/NavigationTests/RNNExternalViewControllerTests.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#import <XCTest/XCTest.h> | ||
#import <OCMock/OCMock.h> | ||
#import <ReactNativeNavigation/RNNExternalViewController.h> | ||
#import <ReactNativeNavigation/RNNCustomViewController.h> | ||
|
||
@interface RNNExternalViewControllerTest : XCTestCase | ||
|
||
@property (nonatomic, strong) RNNExternalViewController* uut; | ||
@property (nonatomic, strong) RNNCustomViewController* customViewController; | ||
|
||
@end | ||
|
||
@implementation RNNExternalViewControllerTest | ||
|
||
- (void)setUp { | ||
[super setUp]; | ||
self.customViewController = [[RNNCustomViewController alloc] init]; | ||
RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init]; | ||
layoutInfo.componentId = @"externalComponentId"; | ||
RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] initWithComponentRegistry:nil defaultOptions:nil]; | ||
self.uut = [[RNNExternalViewController alloc] initWithLayoutInfo:layoutInfo eventEmitter:nil presenter:presenter options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil viewController:self.customViewController]; | ||
} | ||
|
||
- (void)testLoadView_withMainScreenBounds { | ||
XCTAssertTrue(CGRectEqualToRect(self.uut.view.bounds, UIScreen.mainScreen.bounds)); | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters