Hi folks,
I'm getting a testing error when running my UI tests and can't figure out how to get around it.
Background: we are using a UIAlertController as a loading indicator while a network request occurs. There are no actions associated with this UIAlertController as it is closed automatically when the network activity is completed. We display this alert after the user taps the login button for our app.
When we run our tests, they fail at the point right after this with:
UI Testing Failure - Did not receive view did disappear notification within 2.0s
Per Google, I've tried to use addUIInterruptionMonitor to handle the alert, but without any success. Since there's no action that can be taken on the alert, the interruption monitor just looks like this:
addUIInterruptionMonitor(withDescription: "Loading") { handler in
return true
}
But...no dice. I get the same error.
What am I doing wrong?
Thanks,
Dan