Skip to content

Commit 49f1d0d

Browse files
fix: remove custom actions delimiter configuration
1 parent f9518ed commit 49f1d0d

File tree

7 files changed

+2
-29
lines changed

7 files changed

+2
-29
lines changed

WebDriverAgentLib/Categories/XCUIElement+FBCustomActions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ - (NSString *)fb_stringAttribute:(NSString *)attributeName
8989
NSLog(@"[FBCustomActions] Custom action title: %@", title);
9090
}
9191

92-
NSString *joined = [stringified componentsJoinedByString:[FBConfiguration customActionsDelimiter]];
92+
NSString *joined = [stringified componentsJoinedByString:@","];
9393
NSMutableDictionary *updated =
9494
(self.additionalAttributes ?: @{}).mutableCopy;
9595
updated[symbol] = joined;

WebDriverAgentLib/Commands/FBSessionCommands.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ + (NSArray *)routes
356356
FB_SETTING_INCLUDE_NATIVE_FRAME_IN_PAGE_SOURCE: @([FBConfiguration includeNativeFrameInPageSource]),
357357
FB_SETTING_INCLUDE_MIN_MAX_VALUE_IN_PAGE_SOURCE: @([FBConfiguration includeMinMaxValueInPageSource]),
358358
FB_SETTING_INCLUDE_CUSTOM_ACTIONS_IN_PAGE_SOURCE: @([FBConfiguration includeCustomActionsInPageSource]),
359-
FB_SETTING_CUSTOM_ACTIONS_DELIMITER: [FBConfiguration customActionsDelimiter],
360359
FB_SETTING_ENFORCE_CUSTOM_SNAPSHOTS: @([FBConfiguration enforceCustomSnapshots]),
361360
FB_SETTING_LIMIT_XPATH_CONTEXT_SCOPE: @([FBConfiguration limitXpathContextScope]),
362361
#if !TARGET_OS_TV
@@ -472,9 +471,6 @@ + (NSArray *)routes
472471
if (nil != [settings objectForKey:FB_SETTING_INCLUDE_CUSTOM_ACTIONS_IN_PAGE_SOURCE]) {
473472
[FBConfiguration setIncludeCustomActionsInPageSource:[[settings objectForKey:FB_SETTING_INCLUDE_CUSTOM_ACTIONS_IN_PAGE_SOURCE] boolValue]];
474473
}
475-
if (nil != [settings objectForKey:FB_SETTING_CUSTOM_ACTIONS_DELIMITER]) {
476-
[FBConfiguration setCustomActionsDelimiter:(NSString *)[settings objectForKey:FB_SETTING_CUSTOM_ACTIONS_DELIMITER]];
477-
}
478474
if (nil != [settings objectForKey:FB_SETTING_ENFORCE_CUSTOM_SNAPSHOTS]) {
479475
[FBConfiguration setEnforceCustomSnapshots:[[settings objectForKey:FB_SETTING_ENFORCE_CUSTOM_SNAPSHOTS] boolValue]];
480476
}

WebDriverAgentLib/Utilities/FBConfiguration.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,6 @@ typedef NS_ENUM(NSInteger, FBConfigurationKeyboardPreference) {
387387
+ (void)setIncludeCustomActionsInPageSource:(BOOL)enabled;
388388
+ (BOOL)includeCustomActionsInPageSource;
389389

390-
/**
391-
* Sets the delimiter string used when joining custom action names.
392-
* Defaults to ", " (comma followed by space).
393-
*
394-
* @param delimiter The delimiter string to use when joining custom actions
395-
*/
396-
+ (void)setCustomActionsDelimiter:(NSString *)delimiter;
397-
+ (NSString *)customActionsDelimiter;
398-
399390
/**
400391
* Whether to enforce the use of custom snapshots instead of standard snapshots.
401392
* When enabled, fb_customSnapshot is always invoked instead of fb_standardSnapshot

WebDriverAgentLib/Utilities/FBConfiguration.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
static BOOL FBShouldIncludeMinMaxValueInPageSource = NO;
6666
static BOOL FBShouldIncludeCustomActionsInPageSource = NO;
6767
static BOOL FBShouldEnforceCustomSnapshots = NO;
68-
static NSString *FBCustomActionsDelimiter;
6968

7069
@implementation FBConfiguration
7170

@@ -544,7 +543,6 @@ + (void)resetSessionSettings
544543
FBSetCustomParameterForElementSnapshot(FBSnapshotMaxDepthKey, @50);
545544
FBUseClearTextShortcut = YES;
546545
FBLimitXpathContextScope = YES;
547-
FBCustomActionsDelimiter = @", ";
548546
#if !TARGET_OS_TV
549547
FBScreenshotOrientation = UIInterfaceOrientationUnknown;
550548
#endif
@@ -700,16 +698,6 @@ + (BOOL)includeCustomActionsInPageSource
700698
return FBShouldIncludeCustomActionsInPageSource;
701699
}
702700

703-
+ (void)setCustomActionsDelimiter:(NSString *)delimiter
704-
{
705-
FBCustomActionsDelimiter = delimiter ?: @", ";
706-
}
707-
708-
+ (NSString *)customActionsDelimiter
709-
{
710-
return FBCustomActionsDelimiter ?: @", ";
711-
}
712-
713701
+ (void)setEnforceCustomSnapshots:(BOOL)enabled
714702
{
715703
FBShouldEnforceCustomSnapshots = enabled;

WebDriverAgentLib/Utilities/FBSettings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ extern NSString *const FB_SETTING_INCLUDE_HITTABLE_IN_PAGE_SOURCE;
4343
extern NSString *const FB_SETTING_INCLUDE_NATIVE_FRAME_IN_PAGE_SOURCE;
4444
extern NSString *const FB_SETTING_INCLUDE_MIN_MAX_VALUE_IN_PAGE_SOURCE;
4545
extern NSString *const FB_SETTING_INCLUDE_CUSTOM_ACTIONS_IN_PAGE_SOURCE;
46-
extern NSString *const FB_SETTING_CUSTOM_ACTIONS_DELIMITER;
4746
extern NSString *const FB_SETTING_ENFORCE_CUSTOM_SNAPSHOTS;
4847

4948
NS_ASSUME_NONNULL_END

WebDriverAgentLib/Utilities/FBSettings.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@
3939
NSString* const FB_SETTING_INCLUDE_NATIVE_FRAME_IN_PAGE_SOURCE = @"includeNativeFrameInPageSource";
4040
NSString* const FB_SETTING_INCLUDE_MIN_MAX_VALUE_IN_PAGE_SOURCE = @"includeMinMaxValueInPageSource";
4141
NSString* const FB_SETTING_INCLUDE_CUSTOM_ACTIONS_IN_PAGE_SOURCE = @"includeCustomActionsInPageSource";
42-
NSString* const FB_SETTING_CUSTOM_ACTIONS_DELIMITER = @"customActionsDelimiter";
4342
NSString* const FB_SETTING_ENFORCE_CUSTOM_SNAPSHOTS = @"enforceCustomSnapshots";

WebDriverAgentTests/IntegrationTests/FBElementAttributeTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ - (void)testCustomActionsAttributes
258258
XCTAssertTrue(buttonElement.exists);
259259
NSString *customActions = buttonElement.wdCustomActions;
260260
XCTAssertNotNil(customActions, @"Button should have custom actions");
261-
XCTAssertEqualObjects(customActions, @"Custom Action 1, Custom Action 2");
261+
XCTAssertEqualObjects(customActions, @"Custom Action 1,Custom Action 2");
262262
}
263263

264264
@end

0 commit comments

Comments
 (0)