Is it possible at all? I would like to test some properties on this controller after user perform some actions on UIView
.
How to get access to the current UIViewController within UITest in Xcode?
Asked Answered
You shouldn't be using UI Tests to test properties within your view controller. That is the Unit Test's job.
Within your unit tests you can always mock your controls or perform actions manually.
button.sendActionsForControlEvents(UIControlEvents.TouchUpInside)
Then you can do your asserts to make sure the property changed to the correct value.
UI Tests are mainly for checking if the "button is pushing the right controller", "turning the switch to off disabled another button" etc.
Good link here for UI Test
Good link for Unit Test
© 2022 - 2024 — McMap. All rights reserved.