59 lines
1.6 KiB
Objective-C
59 lines
1.6 KiB
Objective-C
/**
|
|
* The examples provided by Facebook are for non-commercial testing and
|
|
* evaluation purposes only.
|
|
*
|
|
* Facebook reserves all rights not expressly granted.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
|
|
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <XCTest/XCTest.h>
|
|
|
|
#import <RCTTest/RCTTestRunner.h>
|
|
|
|
@interface UIExplorerSnapshotTests : XCTestCase
|
|
{
|
|
RCTTestRunner *_runner;
|
|
}
|
|
|
|
@end
|
|
|
|
@implementation UIExplorerSnapshotTests
|
|
|
|
- (void)setUp
|
|
{
|
|
_runner = RCTInitRunnerForApp(@"Examples/UIExplorer/js/UIExplorerApp.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]; \
|
|
}
|
|
|
|
#if !TARGET_OS_TV // None of these will run in tvOS due to StatusBar not existing
|
|
RCT_TEST(ViewExample)
|
|
RCT_TEST(LayoutExample)
|
|
RCT_TEST(TextExample)
|
|
RCT_TEST(SwitchExample)
|
|
RCT_TEST(SliderExample)
|
|
RCT_TEST(TabBarExample)
|
|
#endif
|
|
|
|
- (void)testZZZNotInRecordMode
|
|
{
|
|
XCTAssertFalse(_runner.recordMode, @"Don't forget to turn record mode back to off");
|
|
}
|
|
|
|
@end
|