Mussel
Mussel copied to clipboard
Wait for server request to complete so UI test breakpoints work as expected
The problem I experienced is:
- Set a breakpoint in your UI test right after a call to e.g.
MusselUniversalLinkTester.open(link)
- UI test runs until breakpoint is reached
- Mussel Server never receives the request
This is caused by the fact that URLRequest
does work in another queue once the task is resumed, and by setting a breakpoint directly after resuming the task, the other queue never performs the work. The fix is to have Mussel wait until the URLRequest
task completes before returning. I did this using a DispatchGroup
.
I also added some debugPrint
calls so that when the request is complete, there's some evidence of it in the debug logs.