Douglas Lowder 9e8a39ce2c Add ART library to UIExplorer for iOS, with sample and snapshot test
Summary:
**Motivation**

The ART library is part of the react-native repo, but is not included in UIExplorer and has no native testing.  This PR adds the ART library to UIExplorer, adds an example tab for it, and adds a snapshot test.

**Test plan**

New snapshot test.
Closes https://github.com/facebook/react-native/pull/13621

Differential Revision: D4954082

Pulled By: javache

fbshipit-source-id: 83e21c5df1b766ff6ca9f8914eb3382f7323627d
2017-05-25 08:45:47 -07:00

59 lines
1.3 KiB
Objective-C

/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
#import <RCTTest/RCTTestRunner.h>
@interface RNTesterSnapshotTests : XCTestCase
{
RCTTestRunner *_runner;
}
@end
@implementation RNTesterSnapshotTests
- (void)setUp
{
_runner = RCTInitRunnerForApp(@"RNTester/js/RNTesterApp.ios", nil);
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10) {
_runner.testSuffix = @"-iOS10";
}
_runner.recordMode = NO;
}
#define RCT_TEST(name) \
- (void)test##name \
{ \
[_runner runTest:_cmd module:@#name]; \
}
RCT_TEST(ViewExample)
RCT_TEST(LayoutExample)
RCT_TEST(ARTExample)
RCT_TEST(ScrollViewExample)
RCT_TEST(TextExample)
#if !TARGET_OS_TV
// No switch or slider available on tvOS
RCT_TEST(SwitchExample)
RCT_TEST(SliderExample)
// TabBarExample on tvOS passes locally but not on Travis
RCT_TEST(TabBarExample)
#endif
- (void)testZZZNotInRecordMode
{
XCTAssertFalse(_runner.recordMode, @"Don't forget to turn record mode back to off");
}
@end