I am a total beginner in both Swift and UI/Unit testing.
The goal is to test if a label is visible when a view is tapped on. Yes, a view. The problem is that my 'button' is a UIView class and my label is an @IBInspectable computed property inside of this UIView class. So, I am kind of perplexed about how I test.
Would appreciate any recommendations on where I can find nice explanations about UI/Unit Testing in general. :) Thanks!
Hi the thing is you need to test the function which is called on tapping the button right.
Im assuming you are not using Swift only.
So some basic steps can be
button.sendActions(for: .touchUpInside)
Some Usefull links -
https://useyourloaf.com/blog/ui-testing-quick-guide/
https://www.raywenderlich.com/960290-ios-unit-testing-and-ui-testing-tutorial
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.