mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Trying out testTag for QA
This commit is contained in:
parent
eea54d1a17
commit
dc0b782f99
@ -118,6 +118,24 @@ fun <T> OptionsCard(card: OptionsCardData<T>, callbacks: Callbacks<T>) {
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun PreviewOptionsCard() {
|
||||
PreviewTheme {
|
||||
OptionsCard(
|
||||
card = OptionsCardData(
|
||||
title = GetString.FromString("My Options"),
|
||||
options = listOf(
|
||||
RadioOption<Int>(1, GetString("Option 1")),
|
||||
RadioOption<Int>(2, GetString("Option 2")),
|
||||
RadioOption<Int>(3, GetString("Option 3")),
|
||||
)
|
||||
),
|
||||
callbacks = NoOpCallbacks
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun LargeItemButtonWithDrawable(
|
||||
@StringRes textId: Int,
|
||||
|
@ -27,6 +27,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.RectangleShape
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -34,7 +35,6 @@ import network.loki.messenger.libsession_util.util.ExpiryMode
|
||||
import org.thoughtcrime.securesms.conversation.disappearingmessages.ExpiryType
|
||||
import org.thoughtcrime.securesms.ui.GetString
|
||||
import org.thoughtcrime.securesms.ui.RadioOption
|
||||
import org.thoughtcrime.securesms.ui.contentDescription
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalColors
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalType
|
||||
@ -44,8 +44,8 @@ import kotlin.time.Duration.Companion.days
|
||||
|
||||
@Composable
|
||||
fun RadioButton(
|
||||
onClick: () -> Unit = {},
|
||||
modifier: Modifier = Modifier,
|
||||
onClick: () -> Unit = {},
|
||||
selected: Boolean = false,
|
||||
enabled: Boolean = true,
|
||||
contentPadding: PaddingValues = PaddingValues(),
|
||||
@ -120,8 +120,9 @@ fun <T> TitledRadioButton(
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
RadioButton(
|
||||
modifier = modifier.heightIn(min = 60.dp)
|
||||
.contentDescription(option.contentDescription),
|
||||
modifier = modifier
|
||||
.heightIn(min = 60.dp)
|
||||
.testTag(option.contentDescription.string()),
|
||||
onClick = onClick,
|
||||
selected = option.selected,
|
||||
enabled = option.enabled,
|
||||
|
Loading…
Reference in New Issue
Block a user