-
- All Implemented Interfaces:
-
android.view.Choreographer.FrameCallback
,androidx.test.espresso.IdlingResource
,com.wix.detox.espresso.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 void
setURLBlacklist(List<String> urls)
Must be called on the UI thread. String
getName()
String
getDebugName()
synchronized Map<String, Object>
getBusyHint()
void
registerIdleTransitionCallback(IdlingResource.ResourceCallback callback)
void
doFrame(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
-
getDebugName
@NonNull() String getDebugName()
-
getBusyHint
@Nullable() synchronized Map<String, Object> getBusyHint()
-
registerIdleTransitionCallback
void registerIdleTransitionCallback(IdlingResource.ResourceCallback callback)
-
doFrame
void doFrame(long frameTimeNanos)
-
-
-
-