|
|
@ -12,14 +12,12 @@ import android.net.Uri
|
|
|
|
import androidx.test.espresso.Espresso.onView
|
|
|
|
import androidx.test.espresso.Espresso.onView
|
|
|
|
import androidx.test.espresso.Espresso.pressBack
|
|
|
|
import androidx.test.espresso.Espresso.pressBack
|
|
|
|
import androidx.test.espresso.action.ViewActions
|
|
|
|
import androidx.test.espresso.action.ViewActions
|
|
|
|
import androidx.test.espresso.action.ViewActions.click
|
|
|
|
|
|
|
|
import androidx.test.espresso.assertion.ViewAssertions.matches
|
|
|
|
import androidx.test.espresso.assertion.ViewAssertions.matches
|
|
|
|
import androidx.test.espresso.intent.Intents
|
|
|
|
import androidx.test.espresso.intent.Intents
|
|
|
|
import androidx.test.espresso.intent.matcher.BundleMatchers
|
|
|
|
import androidx.test.espresso.intent.matcher.BundleMatchers
|
|
|
|
import androidx.test.espresso.intent.matcher.IntentMatchers
|
|
|
|
import androidx.test.espresso.intent.matcher.IntentMatchers
|
|
|
|
import androidx.test.espresso.matcher.RootMatchers.isDialog
|
|
|
|
import androidx.test.espresso.matcher.RootMatchers.isDialog
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
|
|
|
|
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.Visibility
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.Visibility
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
|
|
|
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
|
|
|
@ -33,7 +31,6 @@ import androidx.test.uiautomator.By.text
|
|
|
|
import androidx.test.uiautomator.UiDevice
|
|
|
|
import androidx.test.uiautomator.UiDevice
|
|
|
|
import androidx.test.uiautomator.UiSelector
|
|
|
|
import androidx.test.uiautomator.UiSelector
|
|
|
|
import androidx.test.uiautomator.Until
|
|
|
|
import androidx.test.uiautomator.Until
|
|
|
|
import androidx.test.uiautomator.Until.hasObject
|
|
|
|
|
|
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
|
|
import org.hamcrest.CoreMatchers.allOf
|
|
|
|
import org.hamcrest.CoreMatchers.containsString
|
|
|
|
import org.hamcrest.CoreMatchers.containsString
|
|
|
|
import org.junit.Assert.assertTrue
|
|
|
|
import org.junit.Assert.assertTrue
|
|
|
@ -328,14 +325,7 @@ class BrowserRobot {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fun clickMediaPlayerPlayButton() {
|
|
|
|
fun clickMediaPlayerPlayButton() {
|
|
|
|
mDevice.waitNotNull(
|
|
|
|
mediaPlayerPlayButton().waitForExists(waitingTime)
|
|
|
|
hasObject(
|
|
|
|
|
|
|
|
By
|
|
|
|
|
|
|
|
.clazz("android.widget.Button")
|
|
|
|
|
|
|
|
.textContains("Play")
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
waitingTime
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
mediaPlayerPlayButton().click()
|
|
|
|
mediaPlayerPlayButton().click()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -459,9 +449,9 @@ private fun tabsCounter() = onView(withId(R.id.counter_box))
|
|
|
|
|
|
|
|
|
|
|
|
private fun mediaPlayerPlayButton() =
|
|
|
|
private fun mediaPlayerPlayButton() =
|
|
|
|
mDevice.findObject(
|
|
|
|
mDevice.findObject(
|
|
|
|
By
|
|
|
|
UiSelector()
|
|
|
|
.clazz("android.widget.Button")
|
|
|
|
.className("android.widget.Button")
|
|
|
|
.textContains("Play")
|
|
|
|
.text("Play")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
private fun assertBlueDot() {
|
|
|
|
private fun assertBlueDot() {
|
|
|
|