1
0
mirror of git://jb55.com/damus synced 2024-09-16 02:03:45 +00:00
damus/damus.xcodeproj/project.xcworkspace
Daniel D’Aquino 7bed47c919 test: Setup Snapshot testing library and add a snapshot test (testTextWrapperViewWillWrapText)
This change adds `https://github.com/pointfreeco/swift-snapshot-testing` as a package dependency and links it to the `damusTests` target.
It also adds one snapshot test to demonstrate its usefulness, by adding coverage to one particular aspect that we have never been able to test before: Whether or not the post text editor will wrap the text once the text gets long.

Testing of the test
-------------------

PASS

iOS: 17.0
Device: Simulator
Damus: This commit
Test steps:

1. Run `testTextWrapperViewWillWrapText`. PASS
2. Change TextViewWrapper.swift and remove this line:
```
textView.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
```
3. Rerun. It fails. PASS (This is expected)

Closes: https://github.com/damus-io/damus/issues/1562
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: William Casarin <jb55@jb55.com>
2023-10-10 22:05:45 -07:00
..
xcshareddata test: Setup Snapshot testing library and add a snapshot test (testTextWrapperViewWillWrapText) 2023-10-10 22:05:45 -07:00
contents.xcworkspacedata initial commit 2022-04-02 16:57:42 -07:00