-
- All Implemented Interfaces:
-
android.view.Choreographer.FrameCallback,androidx.test.espresso.IdlingResource,com.wix.detox.reactnative.idlingresources.DescriptiveIdlingResource
public class NetworkIdlingResource extends DetoxBaseIdlingResource implements Choreographer.FrameCallback
Created by simonracz on 09/10/2017. Idling Resource which monitors React Native's OkHttpClient.
Must call stop() on it, before removing it from Espresso.
-
-
Constructor Summary
Constructors Constructor Description NetworkIdlingResource(ReactContext reactContext)NetworkIdlingResource(Dispatcher dispatcher)
-
Method Summary
Modifier and Type Method Description static voidsetURLBlacklist(List<String> urls)Must be called on the UI thread. StringgetName()IdlingResourceDescriptiongetDescription()Returns a descriptive representation of the resource. voidregisterIdleTransitionCallback(IdlingResource.ResourceCallback callback)voiddoFrame(long frameTimeNanos)-
Methods inherited from class com.wix.detox.reactnative.idlingresources.DetoxBaseIdlingResource
isIdleNow, pause, resume -
Methods inherited from class androidx.test.espresso.IdlingResource
isIdleNow -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setURLBlacklist
static void setURLBlacklist(List<String> urls)
Must be called on the UI thread.
- Parameters:
urls- list of regexes of blacklisted urls
-
getDescription
@NotNull() IdlingResourceDescription getDescription()
Returns a descriptive representation of the resource.
-
registerIdleTransitionCallback
void registerIdleTransitionCallback(IdlingResource.ResourceCallback callback)
-
doFrame
void doFrame(long frameTimeNanos)
-
-
-
-