diff --git a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0096a70..8b2ef9e 100644 --- a/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/cashapp/AccessibilitySnapshot.git", "state" : { - "revision" : "482db2fd4251cce237d8106073a53ad5289ce739", - "version" : "0.6.0" + "revision" : "ef2cf6015ad00c791fe3ff60f836b1fcc50f970c", + "version" : "0.7.0" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/playbook-ui/playbook-ios.git", "state" : { - "revision" : "0e7c312abdb4f7afeaf24369bab114cf475f573c", - "version" : "0.3.5" + "revision" : "da86a1a533e7ab5b1203908dfbb33aa38b782421", + "version" : "0.4.1" } }, { diff --git a/Example/README.md b/Example/README.md index 4d39678..6e90a84 100644 --- a/Example/README.md +++ b/Example/README.md @@ -1,5 +1,5 @@ # How to Run 1. Open `Example.xcodeproj` via Xcode -1. Run (⌘+R) `Sample` scheme -1. Run test (⌘+U) `Sample` sceme to generate snapshot images +1. Run (⌘+R) `SampleApp` scheme +1. Run test (⌘+U) `SampleApp` sceme to generate snapshot images diff --git a/Example/SampleApp/AccessibilityExamples/RepresentableExample_iOS.swift b/Example/SampleApp/AccessibilityExamples/RepresentableExample_iOS.swift index 0ff4318..f078112 100644 --- a/Example/SampleApp/AccessibilityExamples/RepresentableExample_iOS.swift +++ b/Example/SampleApp/AccessibilityExamples/RepresentableExample_iOS.swift @@ -12,10 +12,11 @@ import UIKit public final class RepresentableUIView: UIView { public var color: UIColor - public init(_ color: UIColor) { + public init(_ color: UIColor, accessibilityUserInputLabels: [String]) { self.color = color super.init(frame: .zero) self.isAccessibilityElement = true + self.accessibilityUserInputLabels = accessibilityUserInputLabels layer.backgroundColor = color.cgColor layer.cornerRadius = defaultCornerRadius layer.borderColor = UIColor.black.cgColor @@ -29,7 +30,7 @@ public final class RepresentableUIView: UIView { public struct RepresentableView: UIViewRepresentable { public func makeUIView(context: UIViewRepresentableContext) -> RepresentableUIView { - return RepresentableUIView(.red) + return RepresentableUIView(.red, accessibilityUserInputLabels: ["Red", "Rectangular"]) } public func updateUIView(_ nsView: RepresentableUIView, context: UIViewRepresentableContext) { @@ -40,7 +41,7 @@ public struct RepresentableView: UIViewRepresentable { public final class RepresentableUIViewController: UIViewController { public override func loadView() { - self.view = RepresentableUIView(.blue) + self.view = RepresentableUIView(.blue, accessibilityUserInputLabels: ["Blue", "Rectangular"]) } } diff --git a/Package.resolved b/Package.resolved index 14fab0f..ca5b349 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/cashapp/AccessibilitySnapshot.git", "state" : { - "revision" : "482db2fd4251cce237d8106073a53ad5289ce739", - "version" : "0.6.0" + "revision" : "ef2cf6015ad00c791fe3ff60f836b1fcc50f970c", + "version" : "0.7.0" } }, { @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/playbook-ui/playbook-ios.git", "state" : { - "revision" : "0e7c312abdb4f7afeaf24369bab114cf475f573c", - "version" : "0.3.5" + "revision" : "da86a1a533e7ab5b1203908dfbb33aa38b782421", + "version" : "0.4.1" } }, { @@ -86,8 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { - "revision" : "c8ed701b513cf5177118a175d85fbbbcd707ab41", - "version" : "1.3.0" + "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", + "version" : "1.4.0" } }, { @@ -95,8 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-cmark.git", "state" : { - "revision" : "f218e5d7691f78b55bfa39b367763f4612486c35", - "version" : "0.3.0" + "revision" : "3bc2f3e25df0cecc5dc269f7ccae65d0f386f06a", + "version" : "0.4.0" } }, { @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-markdown.git", "state" : { - "revision" : "e4f95e2dc23097a1a9a1dfdfe3fe3ee44de77378", - "version" : "0.3.0" + "revision" : "4aae40bf6fff5286e0e1672329d17824ce16e081", + "version" : "0.4.0" } }, { @@ -176,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/jpsim/Yams.git", "state" : { - "revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", - "version" : "5.0.6" + "revision" : "3036ba9d69cf1fd04d433527bc339dc0dc75433d", + "version" : "5.1.3" } } ], diff --git a/Package.swift b/Package.swift index ec7b455..24c9a6d 100644 --- a/Package.swift +++ b/Package.swift @@ -15,11 +15,11 @@ let package = Package( dependencies: [ .package( url: "https://github.com/playbook-ui/playbook-ios.git", - .upToNextMinor(from: "0.3.5") + .upToNextMinor(from: "0.4.1") ), .package( url: "https://github.com/cashapp/AccessibilitySnapshot.git", - .upToNextMinor(from: "0.6.0") + .upToNextMinor(from: "0.7.0") ), ], targets: [ @@ -39,7 +39,5 @@ if ProcessInfo.processInfo.environment["PLAYBOOK_DEVELOPMENT"] != nil { package.dependencies.append(contentsOf: [ .package(url: "https://github.com/apple/swift-format.git", exact: "509.0.0"), .package(url: "https://github.com/yonaskolb/XcodeGen.git", exact: "2.38.0"), - // XcodeGen fails to build with newer version of XcodeProj - .package(url: "https://github.com/tuist/XcodeProj.git", exact: "8.15.0"), ]) } diff --git a/Sources/AccessibilitySnapshot.swift b/Sources/AccessibilitySnapshot.swift index a04086a..1735a0e 100644 --- a/Sources/AccessibilitySnapshot.swift +++ b/Sources/AccessibilitySnapshot.swift @@ -43,7 +43,8 @@ public struct AccessibilitySnapshot: TestTool { let accessibilityView = AccessibilitySnapshotView( containedView: view.superview ?? view, viewRenderingMode: .renderLayerInContext, - activationPointDisplayMode: .always + activationPointDisplayMode: .always, + showUserInputLabels: true ) // Ignoring the error thrown by the parse function. It will be handled correctly