appium-webdriveragent 5.15.8 → 5.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/PrivateHeaders/XCTest/XCUIApplication.h +1 -0
- package/WebDriverAgent.xcodeproj/project.pbxproj +18 -6
- package/WebDriverAgent.xcodeproj/project.xcworkspace/xcuserdata/kazu.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/WebDriverAgent.xcodeproj/xcuserdata/kazu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +1342 -0
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.h +0 -38
- package/WebDriverAgentLib/Categories/XCUIApplication+FBHelpers.m +5 -148
- package/WebDriverAgentLib/Categories/XCUIDevice+FBHelpers.m +1 -1
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.h +1 -0
- package/WebDriverAgentLib/Categories/XCUIDevice+FBRotation.m +3 -5
- package/WebDriverAgentLib/Categories/XCUIElement+FBTVFocuse.m +2 -2
- package/WebDriverAgentLib/Commands/FBAlertViewCommands.m +4 -4
- package/WebDriverAgentLib/Commands/FBCustomCommands.m +2 -2
- package/WebDriverAgentLib/Commands/FBDebugCommands.m +3 -2
- package/WebDriverAgentLib/Commands/FBElementCommands.m +4 -2
- package/WebDriverAgentLib/Commands/FBFindElementCommands.m +1 -0
- package/WebDriverAgentLib/Commands/FBOrientationCommands.m +8 -9
- package/WebDriverAgentLib/Commands/FBSessionCommands.m +9 -7
- package/WebDriverAgentLib/Commands/FBTouchActionCommands.m +1 -0
- package/WebDriverAgentLib/FBAlert.m +3 -3
- package/WebDriverAgentLib/FBApplication.h +49 -0
- package/WebDriverAgentLib/FBApplication.m +185 -0
- package/WebDriverAgentLib/Routing/FBSession.h +14 -13
- package/WebDriverAgentLib/Routing/FBSession.m +46 -49
- package/WebDriverAgentLib/Utilities/FBAlertsMonitor.m +3 -3
- package/WebDriverAgentLib/Utilities/FBKeyboard.m +5 -6
- package/WebDriverAgentLib/Utilities/FBMjpegServer.m +1 -0
- package/WebDriverAgentLib/Utilities/FBPasteboard.m +2 -2
- package/WebDriverAgentLib/Utilities/FBScreen.m +2 -1
- package/WebDriverAgentLib/Utilities/FBTVNavigationTracker.m +2 -1
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.h +33 -0
- package/WebDriverAgentLib/Utilities/FBXCodeCompatibility.m +40 -2
- package/WebDriverAgentLib/WebDriverAgentLib.h +1 -0
- package/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m +3 -2
- package/WebDriverAgentTests/IntegrationTests/FBElementVisibilityTests.m +1 -0
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.h +3 -1
- package/WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m +5 -5
- package/WebDriverAgentTests/IntegrationTests/FBSafariAlertTests.m +2 -1
- package/WebDriverAgentTests/IntegrationTests/FBSessionIntegrationTests.m +10 -11
- package/WebDriverAgentTests/IntegrationTests/FBTapTest.m +1 -0
- package/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m +1 -0
- package/WebDriverAgentTests/IntegrationTests/XCUIApplicationHelperTests.m +8 -8
- package/WebDriverAgentTests/IntegrationTests/XCUIDeviceHelperTests.m +4 -5
- package/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m +1 -0
- package/WebDriverAgentTests/UnitTests/Doubles/{XCUIApplicationDouble.h → FBApplicationDouble.h} +1 -1
- package/WebDriverAgentTests/UnitTests/Doubles/{XCUIApplicationDouble.m → FBApplicationDouble.m} +3 -3
- package/WebDriverAgentTests/UnitTests/FBSessionTests.m +3 -3
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
12
|
#import "FBIntegrationTestCase.h"
|
|
13
|
+
#import "FBApplication.h"
|
|
13
14
|
#import "FBMacros.h"
|
|
14
15
|
#import "FBSession.h"
|
|
15
16
|
#import "FBXCodeCompatibility.h"
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
- (void)disabled_testAutoAcceptingOfAlerts
|
|
50
51
|
{
|
|
51
52
|
self.session = [FBSession
|
|
52
|
-
initWithApplication:
|
|
53
|
+
initWithApplication:FBApplication.fb_activeApplication
|
|
53
54
|
defaultAlertAction:@"accept"];
|
|
54
55
|
for (int i = 0; i < 2; i++) {
|
|
55
56
|
[self.testedApplication.buttons[FBShowAlertButtonName] tap];
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
- (void)disabled_testAutoDismissingOfAlerts
|
|
63
64
|
{
|
|
64
65
|
self.session = [FBSession
|
|
65
|
-
initWithApplication:
|
|
66
|
+
initWithApplication:FBApplication.fb_activeApplication
|
|
66
67
|
defaultAlertAction:@"dismiss"];
|
|
67
68
|
for (int i = 0; i < 2; i++) {
|
|
68
69
|
[self.testedApplication.buttons[FBShowAlertButtonName] tap];
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
|
+
#import "FBApplication.h"
|
|
13
|
+
|
|
12
14
|
extern NSString *const FBShowAlertButtonName;
|
|
13
15
|
extern NSString *const FBShowSheetAlertButtonName;
|
|
14
16
|
extern NSString *const FBShowAlertForceTouchButtonName;
|
|
@@ -20,7 +22,7 @@ extern NSString *const FBTapsCountLabelIdentifier;
|
|
|
20
22
|
*/
|
|
21
23
|
@interface FBIntegrationTestCase : XCTestCase
|
|
22
24
|
@property (nonatomic, strong, readonly) XCUIApplication *testedApplication;
|
|
23
|
-
@property (nonatomic, strong, readonly)
|
|
25
|
+
@property (nonatomic, strong, readonly) FBApplication *springboard;
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
28
|
Launches application and resets side effects of testing like orientation etc.
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
12
|
#import "FBAlert.h"
|
|
13
|
+
#import "FBApplication.h"
|
|
13
14
|
#import "FBTestMacros.h"
|
|
14
15
|
#import "FBIntegrationTestCase.h"
|
|
15
16
|
#import "FBConfiguration.h"
|
|
16
17
|
#import "FBMacros.h"
|
|
17
18
|
#import "FBRunLoopSpinner.h"
|
|
18
|
-
#import "XCUIApplication+FBHelpers.h"
|
|
19
19
|
#import "XCUIDevice+FBRotation.h"
|
|
20
20
|
#import "XCUIElement.h"
|
|
21
21
|
#import "XCUIElement+FBIsVisible.h"
|
|
@@ -30,7 +30,7 @@ NSString *const FBTapsCountLabelIdentifier = @"numberOfTapsLabel";
|
|
|
30
30
|
|
|
31
31
|
@interface FBIntegrationTestCase ()
|
|
32
32
|
@property (nonatomic, strong) XCUIApplication *testedApplication;
|
|
33
|
-
@property (nonatomic, strong)
|
|
33
|
+
@property (nonatomic, strong) FBApplication *springboard;
|
|
34
34
|
@end
|
|
35
35
|
|
|
36
36
|
@implementation FBIntegrationTestCase
|
|
@@ -46,7 +46,7 @@ NSString *const FBTapsCountLabelIdentifier = @"numberOfTapsLabel";
|
|
|
46
46
|
[FBConfiguration disableApplicationUIInterruptionsHandling];
|
|
47
47
|
[FBConfiguration disableScreenshots];
|
|
48
48
|
self.continueAfterFailure = NO;
|
|
49
|
-
self.springboard =
|
|
49
|
+
self.springboard = FBApplication.fb_systemApplication;
|
|
50
50
|
self.testedApplication = [XCUIApplication new];
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -91,10 +91,10 @@ NSString *const FBTapsCountLabelIdentifier = @"numberOfTapsLabel";
|
|
|
91
91
|
{
|
|
92
92
|
[[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome];
|
|
93
93
|
[self.testedApplication fb_waitUntilStable];
|
|
94
|
-
FBAssertWaitTillBecomesTrue(
|
|
94
|
+
FBAssertWaitTillBecomesTrue(FBApplication.fb_systemApplication.icons[@"Safari"].exists);
|
|
95
95
|
[[XCUIDevice sharedDevice] pressButton:XCUIDeviceButtonHome];
|
|
96
96
|
[self.testedApplication fb_waitUntilStable];
|
|
97
|
-
FBAssertWaitTillBecomesTrue(
|
|
97
|
+
FBAssertWaitTillBecomesTrue(FBApplication.fb_systemApplication.icons[@"Calendar"].firstMatch.fb_isVisible);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
- (void)goToSpringBoardExtras
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
12
|
#import "FBIntegrationTestCase.h"
|
|
13
|
+
#import "FBApplication.h"
|
|
13
14
|
#import "FBTestMacros.h"
|
|
14
15
|
#import "FBMacros.h"
|
|
15
16
|
#import "FBSession.h"
|
|
@@ -32,7 +33,7 @@ static NSString *const SAFARI_BUNDLE_ID = @"com.apple.mobilesafari";
|
|
|
32
33
|
- (void)setUp
|
|
33
34
|
{
|
|
34
35
|
[super setUp];
|
|
35
|
-
self.session = [FBSession initWithApplication:
|
|
36
|
+
self.session = [FBSession initWithApplication:FBApplication.fb_activeApplication];
|
|
36
37
|
[self.session launchApplicationWithBundleId:SAFARI_BUNDLE_ID
|
|
37
38
|
shouldWaitForQuiescence:nil
|
|
38
39
|
arguments:nil
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
12
|
#import "FBIntegrationTestCase.h"
|
|
13
|
+
#import "FBApplication.h"
|
|
13
14
|
#import "FBExceptions.h"
|
|
14
15
|
#import "FBMacros.h"
|
|
15
16
|
#import "FBSession.h"
|
|
16
17
|
#import "FBXCodeCompatibility.h"
|
|
17
18
|
#import "FBTestMacros.h"
|
|
18
19
|
#import "FBUnattachedAppLauncher.h"
|
|
19
|
-
#import "XCUIApplication+FBHelpers.h"
|
|
20
|
-
#import "XCUIApplication.h"
|
|
21
20
|
|
|
22
21
|
@interface FBSession (Tests)
|
|
23
22
|
|
|
@@ -36,7 +35,7 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
36
35
|
{
|
|
37
36
|
[super setUp];
|
|
38
37
|
[self launchApplication];
|
|
39
|
-
|
|
38
|
+
FBApplication *app = [[FBApplication alloc] initWithBundleIdentifier:self.testedApplication.bundleID];
|
|
40
39
|
self.session = [FBSession initWithApplication:app];
|
|
41
40
|
}
|
|
42
41
|
|
|
@@ -48,7 +47,7 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
48
47
|
|
|
49
48
|
- (void)testSettingsAppCanBeOpenedInScopeOfTheCurrentSession
|
|
50
49
|
{
|
|
51
|
-
|
|
50
|
+
FBApplication *testedApp = FBApplication.fb_activeApplication;
|
|
52
51
|
[self.session launchApplicationWithBundleId:SETTINGS_BUNDLE_ID
|
|
53
52
|
shouldWaitForQuiescence:nil
|
|
54
53
|
arguments:nil
|
|
@@ -62,7 +61,7 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
62
61
|
|
|
63
62
|
- (void)testSettingsAppCanBeReopenedInScopeOfTheCurrentSession
|
|
64
63
|
{
|
|
65
|
-
|
|
64
|
+
FBApplication *systemApp = self.springboard;
|
|
66
65
|
[self.session launchApplicationWithBundleId:SETTINGS_BUNDLE_ID
|
|
67
66
|
shouldWaitForQuiescence:nil
|
|
68
67
|
arguments:nil
|
|
@@ -79,7 +78,7 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
79
78
|
|
|
80
79
|
- (void)testMainAppCanBeReactivatedInScopeOfTheCurrentSession
|
|
81
80
|
{
|
|
82
|
-
|
|
81
|
+
FBApplication *testedApp = FBApplication.fb_activeApplication;
|
|
83
82
|
[self.session launchApplicationWithBundleId:SETTINGS_BUNDLE_ID
|
|
84
83
|
shouldWaitForQuiescence:nil
|
|
85
84
|
arguments:nil
|
|
@@ -91,8 +90,8 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
91
90
|
|
|
92
91
|
- (void)testMainAppCanBeRestartedInScopeOfTheCurrentSession
|
|
93
92
|
{
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
FBApplication *systemApp = self.springboard;
|
|
94
|
+
FBApplication *testedApp = [[FBApplication alloc] initWithBundleIdentifier:self.testedApplication.bundleID];
|
|
96
95
|
[self.session terminateApplicationWithBundleId:testedApp.bundleID];
|
|
97
96
|
FBAssertWaitTillBecomesTrue([self.session.activeApplication.bundleID isEqualToString:systemApp.bundleID]);
|
|
98
97
|
[self.session launchApplicationWithBundleId:testedApp.bundleID
|
|
@@ -106,12 +105,12 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
106
105
|
{
|
|
107
106
|
[FBUnattachedAppLauncher launchAppWithBundleId:SETTINGS_BUNDLE_ID];
|
|
108
107
|
[self.session kill];
|
|
109
|
-
XCTAssertEqualObjects(SETTINGS_BUNDLE_ID,
|
|
108
|
+
XCTAssertEqualObjects(SETTINGS_BUNDLE_ID, FBApplication.fb_activeApplication.bundleID);
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
- (void)testAppWithInvalidBundleIDCannotBeStarted
|
|
113
112
|
{
|
|
114
|
-
|
|
113
|
+
FBApplication *testedApp = [[FBApplication alloc] initWithBundleIdentifier:@"yolo"];
|
|
115
114
|
@try {
|
|
116
115
|
[testedApp launch];
|
|
117
116
|
XCTFail(@"An exception is expected to be thrown");
|
|
@@ -122,7 +121,7 @@ static NSString *const SETTINGS_BUNDLE_ID = @"com.apple.Preferences";
|
|
|
122
121
|
|
|
123
122
|
- (void)testAppWithInvalidBundleIDCannotBeActivated
|
|
124
123
|
{
|
|
125
|
-
|
|
124
|
+
FBApplication *testedApp = [[FBApplication alloc] initWithBundleIdentifier:@"yolo"];
|
|
126
125
|
@try {
|
|
127
126
|
[testedApp activate];
|
|
128
127
|
XCTFail(@"An exception is expected to be thrown");
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
#import <mach/mach_time.h>
|
|
13
13
|
|
|
14
|
+
#import "FBApplication.h"
|
|
14
15
|
#import "FBIntegrationTestCase.h"
|
|
15
16
|
#import "FBElement.h"
|
|
16
17
|
#import "FBMacros.h"
|
|
17
18
|
#import "FBTestMacros.h"
|
|
18
|
-
#import "XCUIApplication.h"
|
|
19
19
|
#import "XCUIApplication+FBHelpers.h"
|
|
20
20
|
#import "XCUIElement+FBIsVisible.h"
|
|
21
21
|
#import "FBXCodeCompatibility.h"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
- (void)testQueringSpringboard
|
|
35
35
|
{
|
|
36
36
|
[self goToSpringBoardFirstPage];
|
|
37
|
-
XCTAssertTrue(
|
|
38
|
-
XCTAssertTrue(
|
|
37
|
+
XCTAssertTrue(FBApplication.fb_systemApplication.icons[@"Safari"].exists);
|
|
38
|
+
XCTAssertTrue(FBApplication.fb_systemApplication.icons[@"Calendar"].firstMatch.exists);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
- (void)testApplicationTree
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
|
|
59
59
|
- (void)testActiveApplication
|
|
60
60
|
{
|
|
61
|
-
|
|
62
|
-
XCTAssertTrue([
|
|
61
|
+
FBApplication *systemApp = FBApplication.fb_systemApplication;
|
|
62
|
+
XCTAssertTrue([FBApplication fb_activeApplication].buttons[@"Alerts"].fb_isVisible);
|
|
63
63
|
[self goToSpringBoardFirstPage];
|
|
64
|
-
XCTAssertEqualObjects([
|
|
64
|
+
XCTAssertEqualObjects([FBApplication fb_activeApplication].bundleID, systemApp.bundleID);
|
|
65
65
|
XCTAssertTrue(systemApp.icons[@"Safari"].fb_isVisible);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -102,14 +102,14 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
NSError *error;
|
|
105
|
-
NSArray *auditIssues1 = [
|
|
105
|
+
NSArray *auditIssues1 = [FBApplication.fb_activeApplication fb_performAccessibilityAuditWithAuditTypes:~0UL
|
|
106
106
|
error:&error];
|
|
107
107
|
XCTAssertNotNil(auditIssues1);
|
|
108
108
|
XCTAssertNil(error);
|
|
109
109
|
|
|
110
110
|
NSMutableSet *set = [NSMutableSet new];
|
|
111
111
|
[set addObject:@"XCUIAccessibilityAuditTypeAll"];
|
|
112
|
-
NSArray *auditIssues2 = [
|
|
112
|
+
NSArray *auditIssues2 = [FBApplication.fb_activeApplication fb_performAccessibilityAuditWithAuditTypesSet:set.copy
|
|
113
113
|
error:&error];
|
|
114
114
|
XCTAssertEqualObjects(auditIssues1, auditIssues2);
|
|
115
115
|
XCTAssertNil(error);
|
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
|
+
#import "FBApplication.h"
|
|
12
13
|
#import "FBIntegrationTestCase.h"
|
|
13
14
|
#import "FBImageUtils.h"
|
|
14
15
|
#import "FBMacros.h"
|
|
15
16
|
#import "FBTestMacros.h"
|
|
16
|
-
#import "XCUIApplication.h"
|
|
17
|
-
#import "XCUIApplication+FBHelpers.h"
|
|
18
17
|
#import "XCUIDevice+FBHelpers.h"
|
|
19
18
|
#import "XCUIDevice+FBRotation.h"
|
|
20
19
|
#import "XCUIScreen.h"
|
|
@@ -102,7 +101,7 @@
|
|
|
102
101
|
NSError *error;
|
|
103
102
|
XCTAssertTrue([[XCUIDevice sharedDevice] fb_goToHomescreenWithError:&error]);
|
|
104
103
|
XCTAssertNil(error);
|
|
105
|
-
XCTAssertTrue([
|
|
104
|
+
XCTAssertTrue([FBApplication fb_activeApplication].icons[@"Safari"].exists);
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
- (void)testLockUnlockScreen
|
|
@@ -125,7 +124,7 @@
|
|
|
125
124
|
|
|
126
125
|
NSError *error;
|
|
127
126
|
XCTAssertTrue([XCUIDevice.sharedDevice fb_openUrl:@"https://apple.com" error:&error]);
|
|
128
|
-
FBAssertWaitTillBecomesTrue([
|
|
127
|
+
FBAssertWaitTillBecomesTrue([FBApplication.fb_activeApplication.bundleID isEqualToString:@"com.apple.mobilesafari"]);
|
|
129
128
|
XCTAssertNil(error);
|
|
130
129
|
}
|
|
131
130
|
|
|
@@ -139,7 +138,7 @@
|
|
|
139
138
|
XCTAssertTrue([XCUIDevice.sharedDevice fb_openUrl:@"https://apple.com"
|
|
140
139
|
withApplication:@"com.apple.mobilesafari"
|
|
141
140
|
error:&error]);
|
|
142
|
-
FBAssertWaitTillBecomesTrue([
|
|
141
|
+
FBAssertWaitTillBecomesTrue([FBApplication.fb_activeApplication.bundleID isEqualToString:@"com.apple.mobilesafari"]);
|
|
143
142
|
XCTAssertNil(error);
|
|
144
143
|
}
|
|
145
144
|
|
package/WebDriverAgentTests/UnitTests/Doubles/{XCUIApplicationDouble.h → FBApplicationDouble.h}
RENAMED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
11
|
|
|
12
|
-
@interface
|
|
12
|
+
@interface FBApplicationDouble : NSObject
|
|
13
13
|
@property (nonatomic, assign, readonly) BOOL didTerminate;
|
|
14
14
|
@property (nonatomic, strong) NSString* bundleID;
|
|
15
15
|
@property (nonatomic) BOOL fb_shouldWaitForQuiescence;
|
package/WebDriverAgentTests/UnitTests/Doubles/{XCUIApplicationDouble.m → FBApplicationDouble.m}
RENAMED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "FBApplicationDouble.h"
|
|
11
11
|
|
|
12
|
-
@interface
|
|
12
|
+
@interface FBApplicationDouble ()
|
|
13
13
|
@property (nonatomic, assign, readwrite) BOOL didTerminate;
|
|
14
14
|
@end
|
|
15
15
|
|
|
16
|
-
@implementation
|
|
16
|
+
@implementation FBApplicationDouble
|
|
17
17
|
|
|
18
18
|
- (instancetype)init
|
|
19
19
|
{
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
#import <XCTest/XCTest.h>
|
|
11
11
|
|
|
12
|
+
#import "FBApplicationDouble.h"
|
|
12
13
|
#import "FBSession.h"
|
|
13
14
|
#import "FBConfiguration.h"
|
|
14
|
-
#import "XCUIApplicationDouble.h"
|
|
15
15
|
|
|
16
16
|
@interface FBSessionTests : XCTestCase
|
|
17
17
|
@property (nonatomic, strong) FBSession *session;
|
|
18
|
-
@property (nonatomic, strong)
|
|
18
|
+
@property (nonatomic, strong) FBApplication *testedApplication;
|
|
19
19
|
@property (nonatomic) BOOL shouldTerminateAppValue;
|
|
20
20
|
@end
|
|
21
21
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
- (void)setUp
|
|
25
25
|
{
|
|
26
26
|
[super setUp];
|
|
27
|
-
self.testedApplication = (id)
|
|
27
|
+
self.testedApplication = (id)FBApplicationDouble.new;
|
|
28
28
|
self.shouldTerminateAppValue = FBConfiguration.shouldTerminateApp;
|
|
29
29
|
[FBConfiguration setShouldTerminateApp:NO];
|
|
30
30
|
self.session = [FBSession initWithApplication:self.testedApplication];
|