Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable recursive description #141

Merged
merged 6 commits into from
Dec 16, 2018
Merged

Configurable recursive description #141

merged 6 commits into from
Dec 16, 2018

Conversation

stephencelis
Copy link
Member

Fixes #124.

@@ -33,6 +33,7 @@ If you'd like to submit your own custom strategy, see [Contributing](../CONTRIBU
- [`.image`](#image-7)
- [`.recursiveDescription`](#recursivedescription-2)
- [`UIViewController`](#uiviewcontroller)
- [`.hierarchy`](#hierarchy)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding your .hierarchy strategy to the documentation.

@@ -472,6 +472,40 @@ private final class NavigationDelegate: NSObject, WKNavigationDelegate {
#endif

#if os(iOS) || os(tvOS)
func prepareView(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we can prepare views for text-based snapshots, as well.

@@ -0,0 +1,53 @@
<UITableView; frame = (0 0; 320 568); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray>; layer = <CALayer>; contentOffset: {0, -20}; contentSize: {320, 440}; adjustedContentInset: {20, 0, 0, 0}>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This snapshot is now on a specific device override.

| <UINavigationController>, state: disappeared, view: <UILayoutContainerView> not in the window
| | <UIPageViewController>, state: disappeared, view: (view not loaded)
| | | <UIViewController>, state: disappeared, view: <UIView> not in the window
<UITabBarController>, state: appeared, view: <UILayoutContainerView>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we add the view controller to a window it can show what's "appeared".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!

Copy link
Member

@mbrandonw mbrandonw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@stephencelis stephencelis merged commit deed033 into master Dec 16, 2018
@stephencelis stephencelis deleted the recursive-traits branch December 16, 2018 05:53
szotyi pushed a commit to szotyi/swift-snapshot-testing that referenced this pull request Jan 3, 2019
* Configurable recursive description

* Make private again

* Fix comment

* Remove stale snap

* Change tests

* Update Available-Snapshot-Strategies.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants