27 lines
619 B
Kotlin
27 lines
619 B
Kotlin
/*
|
|
* Nextcloud - Android Client
|
|
*
|
|
* SPDX-FileCopyrightText: 2024 Alper Ozturk <alper.ozturk@nextcloud.com>
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
package com.owncloud.android.utils
|
|
|
|
import androidx.test.espresso.idling.CountingIdlingResource
|
|
|
|
object EspressoIdlingResource {
|
|
|
|
private const val RESOURCE = "GLOBAL"
|
|
|
|
@JvmField val countingIdlingResource = CountingIdlingResource(RESOURCE)
|
|
|
|
fun increment() {
|
|
countingIdlingResource.increment()
|
|
}
|
|
|
|
fun decrement() {
|
|
if (!countingIdlingResource.isIdleNow) {
|
|
countingIdlingResource.decrement()
|
|
}
|
|
}
|
|
}
|