1*2a38a11eSExponent GitHub Bot// Copyright 2015-present 650 Industries. All rights reserved. 2*2a38a11eSExponent GitHub Bot 3*2a38a11eSExponent GitHub Bot#import "EXKernelModuleProvider.h" 4*2a38a11eSExponent GitHub Bot 5*2a38a11eSExponent GitHub Bot#import "RCTTestRunner.h" 6*2a38a11eSExponent GitHub Bot#import "RCTAssert.h" 7*2a38a11eSExponent GitHub Bot 8*2a38a11eSExponent GitHub Bot#import <XCTest/XCTest.h> 9*2a38a11eSExponent GitHub Bot 10*2a38a11eSExponent GitHub Bot@interface ExponentIntegrationTests : XCTestCase 11*2a38a11eSExponent GitHub Bot 12*2a38a11eSExponent GitHub Bot@end 13*2a38a11eSExponent GitHub Bot 14*2a38a11eSExponent GitHub Bot@implementation ExponentIntegrationTests 15*2a38a11eSExponent GitHub Bot{ 16*2a38a11eSExponent GitHub Bot RCTTestRunner *_runner; 17*2a38a11eSExponent GitHub Bot} 18*2a38a11eSExponent GitHub Bot 19*2a38a11eSExponent GitHub Bot- (void)setUp 20*2a38a11eSExponent GitHub Bot{ 21*2a38a11eSExponent GitHub Bot [super setUp]; 22*2a38a11eSExponent GitHub Bot 23*2a38a11eSExponent GitHub Bot#if __LP64__ 24*2a38a11eSExponent GitHub Bot RCTAssert(NO, @"Tests should be run on 32-bit device simulators (e.g. iPhone 5)"); 25*2a38a11eSExponent GitHub Bot#endif 26*2a38a11eSExponent GitHub Bot 27*2a38a11eSExponent GitHub Bot NSOperatingSystemVersion version = [NSProcessInfo processInfo].operatingSystemVersion; 28*2a38a11eSExponent GitHub Bot RCTAssert((version.majorVersion == 8 && version.minorVersion >= 3) || version.majorVersion >= 9, @"Tests should be run on iOS 8.3+, found %zd.%zd.%zd", version.majorVersion, version.minorVersion, version.patchVersion); 29*2a38a11eSExponent GitHub Bot 30*2a38a11eSExponent GitHub Bot NSArray<id<RCTBridgeModule>> *(^testModuleProvider)(void) = ^NSArray<id<RCTBridgeModule>> *(void) { 31*2a38a11eSExponent GitHub Bot return EXKernelModuleProvider(nil); 32*2a38a11eSExponent GitHub Bot }; 33*2a38a11eSExponent GitHub Bot _runner = RCTInitRunnerForApp(@"ExponentTestsApp", testModuleProvider); 34*2a38a11eSExponent GitHub Bot} 35*2a38a11eSExponent GitHub Bot 36*2a38a11eSExponent GitHub Bot- (void)testFrameLoadCuriousPeople 37*2a38a11eSExponent GitHub Bot{ 38*2a38a11eSExponent GitHub Bot [_runner runTest:_cmd 39*2a38a11eSExponent GitHub Bot module:@"FrameTests" 40*2a38a11eSExponent GitHub Bot initialProps:@{@"manifestUrl": @"exp://exp.host/@exponent/react-native-for-curious-people"} 41*2a38a11eSExponent GitHub BotconfigurationBlock:nil]; 42*2a38a11eSExponent GitHub Bot} 43*2a38a11eSExponent GitHub Bot 44*2a38a11eSExponent GitHub Bot- (void)testFrameLoadFeaturedExperience 45*2a38a11eSExponent GitHub Bot{ 46*2a38a11eSExponent GitHub Bot [_runner runTest:_cmd 47*2a38a11eSExponent GitHub Bot module:@"FrameTests" 48*2a38a11eSExponent GitHub Bot initialProps:@{@"loadFeaturedExperience": @YES} 49*2a38a11eSExponent GitHub BotconfigurationBlock:nil]; 50*2a38a11eSExponent GitHub Bot} 51*2a38a11eSExponent GitHub Bot 52*2a38a11eSExponent GitHub Bot@end 53