playbook-ui / playbook-ios

📘A library for isolated developing UI components and automatically taking snapshots of them.
https://playbook-ui.github.io/playbook-ios/documentation/playbooksnapshot/
Apache License 2.0
1.18k stars 55 forks source link

Add `TestTool` for compare snapshot diffs without dependency #15

Open ra1028 opened 4 years ago

ra1028 commented 4 years ago

Checklist

Description

Add a new TestTool compare snapshot diffs without dependency like pointfreeco/swift-snapshot-testing and uber/ios-snapshot-test-case.

Motivation and Context

Visual regression tests using third-party tools such as reg-suit are powerful, but a framework that can be used more simply on unit tests is needed.

Proposed Solution

Playbook.default.run(
    SnapshotCompare(devices: [.iPhone11Pro(.portrait)])
)
hufkens commented 2 years ago

I was also expecting that the current snapshot would fail of the new snapshots were different then the originals. This would be a big plus of the Scenarios could be used as actual SnapShot Tests.

Another nice feature would be to have a device profile that just ignores the height so that a scrollable Scenario can be captures completely.