| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /**
- * 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 <XCTest/XCTest.h>
- #import <WebDriverAgentLib/FBDebugLogDelegateDecorator.h>
- #import <WebDriverAgentLib/FBConfiguration.h>
- #import <WebDriverAgentLib/FBFailureProofTestCase.h>
- #import <WebDriverAgentLib/FBWebServer.h>
- #import <WebDriverAgentLib/XCTestCase.h>
- @interface UITestingUITests : FBFailureProofTestCase <FBWebServerDelegate>
- @end
- @implementation UITestingUITests
- + (void)setUp
- {
- [FBDebugLogDelegateDecorator decorateXCTestLogger];
- [FBConfiguration disableRemoteQueryEvaluation];
- [FBConfiguration configureDefaultKeyboardPreferences];
- [FBConfiguration disableApplicationUIInterruptionsHandling];
- if (NSProcessInfo.processInfo.environment[@"ENABLE_AUTOMATIC_SCREEN_RECORDINGS"]) {
- [FBConfiguration enableScreenRecordings];
- } else {
- [FBConfiguration disableScreenRecordings];
- }
- if (NSProcessInfo.processInfo.environment[@"ENABLE_AUTOMATIC_SCREENSHOTS"]) {
- [FBConfiguration enableScreenshots];
- } else {
- [FBConfiguration disableScreenshots];
- }
- [super setUp];
- }
- /**
- Never ending test used to start WebDriverAgent
- */
- - (void)testRunner
- {
- FBWebServer *webServer = [[FBWebServer alloc] init];
- webServer.delegate = self;
- [webServer startServing];
- }
- #pragma mark - FBWebServerDelegate
- - (void)webServerDidRequestShutdown:(FBWebServer *)webServer
- {
- [webServer stopServing];
- }
- @end
|