Skip to content

Commit 23091ef

Browse files
Marek Cirkosfacebook-github-bot
authored andcommitted
Disable XCTest's attribute key path analysis
Summary: For some type of queries this flag will trash all received snapshots, causing `/source` endpoint to not list all elements Reviewed By: antiarchit Differential Revision: D6458580 fbshipit-source-id: 5bbb4a6742c8b3e6ad0da25e69761c9e4a2bc1d0
1 parent d5f3bae commit 23091ef

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

WebDriverAgentLib/Utilities/FBConfiguration.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ NS_ASSUME_NONNULL_BEGIN
2727
/*! Disables remote query evaluation making Xcode 9.x tests behave same as Xcode 8.x test */
2828
+ (void)disableRemoteQueryEvaluation;
2929

30+
/*! Disables attribute key path analysis, which will cause XCTest on Xcode 9.x to ignore some elements */
31+
+ (void)disableAttributeKeyPathAnalysis;
32+
3033
/* The maximum typing frequency for all typing activities */
3134
+ (void)setMaxTypingFrequency:(NSUInteger)value;
3235
+ (NSUInteger)maxTypingFrequency;

WebDriverAgentLib/Utilities/FBConfiguration.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ + (void)disableRemoteQueryEvaluation
3030
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"XCTDisableRemoteQueryEvaluation"];
3131
}
3232

33+
+ (void)disableAttributeKeyPathAnalysis
34+
{
35+
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"XCTDisableAttributeKeyPathAnalysis"];
36+
}
37+
3338
+ (NSRange)bindingPortRange
3439
{
3540
// 'WebDriverAgent --port 8080' can be passed via the arguments to the process

WebDriverAgentTests/IntegrationTests/FBIntegrationTestCase.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ - (void)setUp
3333
{
3434
[super setUp];
3535
[FBConfiguration disableRemoteQueryEvaluation];
36+
[FBConfiguration disableAttributeKeyPathAnalysis];
3637
self.continueAfterFailure = NO;
3738
self.springboard = [FBSpringboardApplication fb_springboard];
3839
self.testedApplication = [XCUIApplication new];

0 commit comments

Comments
 (0)