|
|
@ -17,6 +17,9 @@ import androidx.compose.ui.test.onNodeWithTag
|
|
|
|
import androidx.compose.ui.test.onNodeWithText
|
|
|
|
import androidx.compose.ui.test.onNodeWithText
|
|
|
|
import androidx.compose.ui.test.performClick
|
|
|
|
import androidx.compose.ui.test.performClick
|
|
|
|
import androidx.compose.ui.test.performScrollTo
|
|
|
|
import androidx.compose.ui.test.performScrollTo
|
|
|
|
|
|
|
|
import androidx.compose.ui.test.performTouchInput
|
|
|
|
|
|
|
|
import androidx.compose.ui.test.swipeLeft
|
|
|
|
|
|
|
|
import androidx.compose.ui.test.swipeRight
|
|
|
|
import androidx.test.espresso.Espresso
|
|
|
|
import androidx.test.espresso.Espresso
|
|
|
|
import androidx.test.espresso.UiController
|
|
|
|
import androidx.test.espresso.UiController
|
|
|
|
import androidx.test.espresso.ViewAction
|
|
|
|
import androidx.test.espresso.ViewAction
|
|
|
@ -162,6 +165,20 @@ class ComposeTabDrawerRobot(private val composeTestRule: HomeActivityComposeTest
|
|
|
|
composeTestRule.closeTabButton().performClick()
|
|
|
|
composeTestRule.closeTabButton().performClick()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Swipes a tab with [title] left.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
fun swipeTabLeft(title: String) {
|
|
|
|
|
|
|
|
composeTestRule.tabItem(title).performTouchInput { swipeLeft() }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Swipes a tab with [title] right.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
fun swipeTabRight(title: String) {
|
|
|
|
|
|
|
|
composeTestRule.tabItem(title).performTouchInput { swipeRight() }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class Transition(private val composeTestRule: HomeActivityComposeTestRule) {
|
|
|
|
class Transition(private val composeTestRule: HomeActivityComposeTestRule) {
|
|
|
|
|
|
|
|
|
|
|
|
fun openNewTab(interact: SearchRobot.() -> Unit): SearchRobot.Transition {
|
|
|
|
fun openNewTab(interact: SearchRobot.() -> Unit): SearchRobot.Transition {
|
|
|
|