Protocols
The following protocols are available globally.
-
MARK: - pretty RawRepresentable as a keypath string of object
NOTE: the priority level
DefineRawValue > FollowPrettyProtocolButNotDefineRawValue > NoProtocolAndNoDefine
check the result as follow case:
See morestruct AccessibilityID { enum Home1: String { case setting = "HomeSetting1" } enum Home2: String, PrettyRawRepresentable { case setting } enum Home3: String, PrettyRawRepresentable { case setting = "HomeSetting3" } } let path1 = AccessibilityID.Home1.setting.rawValue // "HomeSetting1" let path2_1 = AccessibilityID.Home2.setting.rawValue // "setting" let path2_2 = AccessibilityID.Home2.setting.prettyRawValue // "AccessibilityID_Home2_setting" let path3 = AccessibilityID.Home3.setting.prettyRawValue // "HomeSetting3"
Declaration
Swift
public protocol PrettyRawRepresentable : RawRepresentable where Self.RawValue == String
-
Use generic protocols to better extend functionality in both engineering and testing projects
See more// for project extension XCUIElement: PredicateBaseExtensionProtocol { public typealias T = XCUIElement } // for test extension EasyPredicateTestItem: PredicateBaseExtensionProtocol { typealias T = EasyPredicateTestItem }
Declaration
Swift
public protocol PredicateBaseExtensionProtocol