We have a iPad app which includes a two-column news reader. The left view contains the list of news of which some link directly to a news and some push another view controller with another list of news. This will also cause a UIButton
to be set as the leftBarButtonItem
of the navigation bar. If we are on first level, a simple image that cannot be tapped will be the leftBarButtonItem
.
My goal is now to have a test that taps every news on the first level. If a news leads to a second level list, it should tap the UIButton
in the navigation bar.
How can I check, if the leftBarButtonItem
is "tappable"? Since it can be either an image or a button, just calling navigationBar().leftButton().tap()
will lead to an error if it's an image.
I'm also using the tuneup library if that's any help.