cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make SnapshotTesting Accessibility Functions for ContentSizeCategory public

fbernutz opened this issue · comments

The two extending functions on Snapshotting for UIView and UIViewController in SnapshotTesting+Accessibility.swift which make it possible to modify the content size category for the snapshot should be public, so they can be used outside the target.

Issue exists in Version 0.4.0 of AccessibilitySnapshot

Just saw that this functionality is available from the original SnapshotLibrary (#4 (comment)). So feel free to close this issue and the PR.

This was the change I needed to make to get the same functionality, if others are having the same issue.

-            as: .image(at: .accessibilityLarge)
+            as: .image(traits: .init(preferredContentSizeCategory: .accessibilityLarge))

Closing this issue as a duplicate since it's already tracked by #4. Thanks for the reminder though! I'll try to carve out some time to verify whether there's anything additional we need to do for the SnapshotTesting subspec, and if not then remove the methods. We definitely still need to do work for the iOSSnapshotTestCase subspec.