You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ AccessibilitySnapshots makes it simple to add regression tests for accessibility
9
9
10
10
## Getting Started
11
11
12
-
By default, AccessibilitySnapshot uses [iOSSnapshotTestCase](https://github.com/uber/ios-snapshot-test-case) to record snapshots and perform comparisons. Before setting up accessibility snapshot tests, make sure your project is set up for standard snapshot testing. Accessibility snapshot tests require that the test target has a host application. See the [Extensions](#extensions) section below for a list of other available snapshotting options.
12
+
By default, AccessibilitySnapshot uses [SnapshotTesting](https://github.com/pointfreeco/swift-snapshot-testing) to record snapshots and perform comparisons. The framework also includes support for using [iOSSnapshotTestCase](https://github.com/uber/ios-snapshot-test-case) as the snapshotting engine instead. Before setting up accessibility snapshot tests, make sure your project is set up for standard snapshot testing. Accessibility snapshot tests require that the test target has a host application. See the [Extensions](#extensions) section below for a list of other available snapshotting options.
13
13
14
14
### CocoaPods
15
15
@@ -19,20 +19,52 @@ Install with [CocoaPods](https://cocoapods.org) by adding the following to your
19
19
pod 'AccessibilitySnapshot'
20
20
```
21
21
22
-
To use only the core accessibility parser, add a dependency on the Core subspec alone.
22
+
To use only the core accessibility parser, add a dependency on the Core subspec alone:
23
23
24
24
```ruby
25
25
pod 'AccessibilitySnapshot/Core'
26
26
```
27
27
28
-
Alternatively, if you wish to use Pointfree's SnapshotTesting library to perform image comparisons, then you should use the following subspec instead.
28
+
Alternatively, if you wish to use [iOSSnapshotTestCase](https://github.com/uber/ios-snapshot-test-case)to perform image comparisons, you can add a dependency on the `iOSSnapshotTestCase` subspec instead (or in addition - you can use both in the same project):
29
29
30
30
```ruby
31
-
pod 'AccessibilitySnapshot/SnapshotTesting'
31
+
pod 'AccessibilitySnapshot/iOSSnapshotTestCase'
32
32
```
33
33
34
34
## Usage
35
35
36
+
AccessibilitySnapshot builds on top of existing snapshot frameworks to add support for snapshotting your app's accessibility. By default it uses the [SnapshotTesting](https://github.com/pointfreeco/swift-snapshot-testing) framework for snapshotting, but can be switched over to [iOSSnapshotTestCase](https://github.com/uber/ios-snapshot-test-case) as well.
37
+
38
+
### Getting Started with SnapshotTesting
39
+
40
+
AccessibilitySnapshot provides an `.accessibilityImage` snapshotting strategy that can be used with SnapshotTesting's snapshot assertions.
Snapshots can also be customized in a few ways, for example controlling when to include indicators for the accessibility activation point of each element. By default, these indicators are shown when the activation point is different than the default activation point for that view. You can override this behavior for each snapshot:
0 commit comments