Add missing test for LogoutView
This commit is contained in:
parent
2bdf2c0bbd
commit
5e42368965
2 changed files with 26 additions and 0 deletions
|
|
@ -18,8 +18,10 @@ package io.element.android.tests.testutils
|
|||
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.ui.test.SemanticsNodeInteractionsProvider
|
||||
import androidx.compose.ui.test.hasClickAction
|
||||
import androidx.compose.ui.test.hasContentDescription
|
||||
import androidx.compose.ui.test.hasTestTag
|
||||
import androidx.compose.ui.test.hasText
|
||||
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
||||
import androidx.compose.ui.test.performClick
|
||||
|
|
@ -36,3 +38,7 @@ fun <R : TestRule> AndroidComposeTestRule<R, ComponentActivity>.pressBack() {
|
|||
val text = activity.getString(CommonStrings.action_back)
|
||||
onNode(hasContentDescription(text)).performClick()
|
||||
}
|
||||
|
||||
fun SemanticsNodeInteractionsProvider.pressTag(tag: String) {
|
||||
onNode(hasTestTag(tag)).performClick()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue