Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.progressive.kherkin.common.steps.actions

import android.os.SystemClock
import com.progressive.kherkin.common.testcore.Gherkin
import com.progressive.kherkin.common.testcore.TimeoutConstants.EXTRA_LONG_TIMEOUT

/**
* Waits for [timeoutInMillis] or a default of [EXTRA_LONG_TIMEOUT] milliseconds. Recommended to
* only use for debugging purposes.
*/
fun Gherkin.IWaitLong(timeoutInMillis: Long = EXTRA_LONG_TIMEOUT) {
SystemClock.sleep(timeoutInMillis)
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ fun Gherkin.IWaitToSeeAlert(timeoutInMillis: Long = EXTRA_LONG_TIMEOUT) {
IShouldSeeAlert()
}

/**
* Waits for [timeoutInMillis] or a default of [EXTRA_LONG_TIMEOUT] milliseconds. Recommended to
* only use for debugging purposes.
*/
fun Gherkin.IWaitLong(timeoutInMillis: Long = EXTRA_LONG_TIMEOUT) {
SystemClock.sleep(timeoutInMillis)
}

/**
* Waits to see a view outside the context of the current activity with text containing
* [expectedText] for [timeoutInMillis] or a default of [LONG_TIMEOUT] milliseconds and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.progressive.sampleapp.tests.espresso

import androidx.test.espresso.matcher.ViewMatchers.withId
import com.progressive.kherkin.common.steps.actions.IWaitLong
import com.progressive.kherkin.sampleapp.R
import com.progressive.kherkin.espresso.steps.actions.ITouchButton
import com.progressive.kherkin.espresso.steps.actions.IWaitLong
import com.progressive.kherkin.espresso.steps.actions.IWaitToDismissSharesheetContainingText
import com.progressive.kherkin.espresso.steps.actions.IWaitToSeeTextOnCurrentScreen
import com.progressive.kherkin.espresso.steps.actions.IWaitToSeeViewContainingTextOnCurrentScreen
Expand Down