FlexLayout
SnapshotTesting
FlexLayout | SnapshotTesting | |
---|---|---|
1 | 8 | |
1,915 | 3,603 | |
0.8% | 0.6% | |
8.6 | 7.4 | |
2 months ago | 4 days ago | |
Swift | Swift | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
FlexLayout
-
Building Reddit’s Design System on iOS
We still wanted to leverage a layout engine that could be performant and easy-to-use. After doing some performance testing with native UIKit, Autolayout, and a few other third-party options, we ended up bringing FlexLayout into the mix, which is a Swift implementation of Facebook’s Yoga layout engine. All RPL components utilize FlexLayout in order to lay out content fast and efficiently. While we’ve enjoyed using it, we’ve found a few touch points to be mindful of. There are some rough edges we’ve found, such as utilizing stack views with subviews that use FlexLayout, that often come at odds with both UIKit and FlexLayout’s layout engines.
SnapshotTesting
- XCTest different behavior locally vs Xcode Cloud
-
Building Reddit’s Design System on iOS
Testing is an integral part of our framework. As we build out components, we leverage unit and snapshot tests to ensure our components look and feel great in any kind of situation. The underlying framework we use is the SnapshotTesting framework. Our components can leverage different themes on top of various appearances, and they can be configured even further with configuration properties. As such, it’s important that we test these various permutations to ensure that our components look great no matter what environment or settings are applied.
- SwiftUI has so many awesome features!! And none of them seem to play well with unit tests :( Am I missing something?
-
Do you use visual regression tests in your projects?
I use https://github.com/pointfreeco/swift-snapshot-testing
-
Visual tests
Common libraries include https://github.com/uber/ios-snapshot-test-case/ and https://github.com/pointfreeco/swift-snapshot-testing.
-
iOSSnapshotTestCase or SnapshotTesting?
iOSSnapshotTestCase (previously FBSnapshotTestCase) mainly written in objective C or pointfreeco/swift-snapshot-testing in Swift. What is your opinion in 2022?
-
How do I know if I made auto-layout right to fit every device?
Try this library, I use it at work and can recommend. Good luck!
- Snapshot Testing in Swift
What are some alternatives?
SnapKit - A Swift Autolayout DSL for iOS & OS X
iOS Snapshot Test Case - Snapshot view unit tests for iOS
PinLayout - Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
ios-snapshot-test-case - Snapshot view unit tests for iOS
LayoutKit - LayoutKit is a fast view layout library for iOS, macOS, and tvOS.
Mockingbird - Simplify software testing, by easily mocking any system using HTTP/HTTPS, allowing a team to test and develop against a service that is not complete or is unstable or just to reproduce planned/edge cases.
Cassowary - A Swift port of the Cassowary linear constraint solver
second_curtain - Upload failing iOS snapshot tests cases to S3
SwiftBox - Flexbox in Swift, using Facebook's css-layout.
DVR - Network testing for Swift
Masonry - Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout
Buildasaur - Automatic testing of your Pull Requests on GitHub and BitBucket using Xcode Server. Keep your team productive and safe. Get up and running in minutes. @buildasaur