How to mock locations for UI Tests in Swift with KIF?

154 Views Asked by At

I'm writing UI tests with KIF and I want to test clicking on a GPS button and autofilling with text. My issue is that I don't know how to get a faked location.

Preferably, I would like to do this without changing my actual (non-testing) code. Is there a way I can do this without having my real code call an extension behind a protocol for the CLLocationManager?

0

There are 0 best solutions below