FIx UI Tests
This commit is contained in:
parent
d75d7a3695
commit
6f5d8d6ece
|
@ -89,7 +89,7 @@ fun getString(@StringRes id: Int): String {
|
|||
return EspressoHelper.getCurrentActivity()!!.resources.getString(id)
|
||||
}
|
||||
|
||||
fun waitForView(viewMatcher: Matcher<View>, timeout: Long = 10_000, waitForDisplayed: Boolean = true): ViewAction {
|
||||
fun waitForView(viewMatcher: Matcher<View>, timeout: Long = 20_000, waitForDisplayed: Boolean = true): ViewAction {
|
||||
return object : ViewAction {
|
||||
private val clock = DefaultClock()
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ import im.vector.app.espresso.tools.ScreenshotFailureRule
|
|||
import im.vector.app.features.MainActivity
|
||||
import im.vector.app.getString
|
||||
import im.vector.app.ui.robot.ElementRobot
|
||||
import im.vector.app.ui.robot.settings.labs.LabFeature
|
||||
import im.vector.app.ui.robot.settings.labs.LabFeaturesPreferences
|
||||
import im.vector.app.ui.robot.withDeveloperMode
|
||||
import org.junit.Rule
|
||||
|
@ -130,6 +129,9 @@ class UiAllScreensSanityTest {
|
|||
addSpace().also { openMenu(publicSpaceName) }
|
||||
|
||||
leaveSpace()
|
||||
// Some instability with the bottomsheet
|
||||
// not sure what's the source, maybe the expanded state?
|
||||
Thread.sleep(10_000)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,7 +177,7 @@ class UiAllScreensSanityTest {
|
|||
* Testing multiple threads screens
|
||||
*/
|
||||
private fun testThreadScreens() {
|
||||
elementRobot.toggleLabFeature(LabFeature.THREAD_MESSAGES)
|
||||
// elementRobot.toggleLabFeature(LabFeature.THREAD_MESSAGES)
|
||||
elementRobot.newRoom {
|
||||
createNewRoom {
|
||||
crawl()
|
||||
|
@ -189,6 +191,6 @@ class UiAllScreensSanityTest {
|
|||
}
|
||||
}
|
||||
}
|
||||
elementRobot.toggleLabFeature(LabFeature.THREAD_MESSAGES)
|
||||
// elementRobot.toggleLabFeature(LabFeature.THREAD_MESSAGES)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ import androidx.test.espresso.matcher.ViewMatchers.withText
|
|||
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn
|
||||
import im.vector.app.R
|
||||
import im.vector.app.espresso.tools.waitUntilActivityVisible
|
||||
import im.vector.app.espresso.tools.waitUntilDialogVisible
|
||||
import im.vector.app.espresso.tools.waitUntilViewVisible
|
||||
import im.vector.app.features.home.HomeActivity
|
||||
import im.vector.app.features.home.room.detail.RoomDetailActivity
|
||||
|
@ -86,14 +85,17 @@ class SpaceCreateRobot {
|
|||
clickOn(R.id.nextButton)
|
||||
waitUntilViewVisible(withId(R.id.recyclerView))
|
||||
clickOn(R.id.nextButton)
|
||||
// waitUntilActivityVisible<RoomDetailActivity> {
|
||||
// waitUntilDialogVisible(withId(R.id.inviteByMxidButton))
|
||||
// }
|
||||
// // close invite dialog
|
||||
// pressBack()
|
||||
waitUntilActivityVisible<RoomDetailActivity> {
|
||||
waitUntilDialogVisible(withId(R.id.inviteByMxidButton))
|
||||
pressBack()
|
||||
}
|
||||
// close invite dialog
|
||||
pressBack()
|
||||
waitUntilViewVisible(withId(R.id.timelineRecyclerView))
|
||||
// waitUntilViewVisible(withId(R.id.timelineRecyclerView))
|
||||
// close room
|
||||
pressBack()
|
||||
// pressBack()
|
||||
waitUntilViewVisible(withId(R.id.roomListContainer))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,9 +89,8 @@ class SpaceMenuRobot {
|
|||
clickOnSheet(R.id.leaveSpace)
|
||||
waitUntilActivityVisible<SpaceLeaveAdvancedActivity> {
|
||||
waitUntilViewVisible(ViewMatchers.withId(R.id.roomList))
|
||||
clickOn(R.id.spaceLeaveSelectAll)
|
||||
clickOn(R.id.spaceLeaveButton)
|
||||
}
|
||||
clickOn(R.id.spaceLeaveSelectAll)
|
||||
clickOn(R.id.spaceLeaveButton)
|
||||
waitUntilViewVisible(ViewMatchers.withId(R.id.groupListView))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue