swifter
swifter copied to clipboard
Feature Request: Delay
I am using swifter for iOS UI testing. My tests setup swifter and with the help of JSON mocked responses I test the UI.
Swifter has been working great but I am missing some kind of delay setup for responses. The use case is: I want to test that a loading screen is shown while we wait for the response.
Right now I am using:
let response: ((HttpRequest) -> HttpResponse) = { req in
return HttpResponse.ok(.custom("", {_ -> String in
sleep(100000)
return ""
}))
}
server.GET["path"] = response
What do you think?
+1 for this feature request. Right now we are using the above suggestion by @Macarse 👍🏽