Merge pull request #2413 from element-hq/feature/bma/unitTests
Add more unit tests
This commit is contained in:
commit
354e82d489
18 changed files with 463 additions and 92 deletions
|
|
@ -33,6 +33,8 @@ import androidx.compose.ui.unit.dp
|
|||
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||
import io.element.android.libraries.testtags.TestTags
|
||||
import io.element.android.libraries.testtags.testTag
|
||||
|
||||
@Composable
|
||||
fun FloatingActionButton(
|
||||
|
|
@ -48,7 +50,7 @@ fun FloatingActionButton(
|
|||
) {
|
||||
androidx.compose.material3.FloatingActionButton(
|
||||
onClick = onClick,
|
||||
modifier = modifier,
|
||||
modifier = modifier.testTag(TestTags.floatingActionButton),
|
||||
shape = shape,
|
||||
containerColor = containerColor,
|
||||
contentColor = contentColor,
|
||||
|
|
|
|||
|
|
@ -103,6 +103,10 @@ class FakeEncryptionService : EncryptionService {
|
|||
backupStateStateFlow.emit(state)
|
||||
}
|
||||
|
||||
suspend fun emitRecoveryState(state: RecoveryState) {
|
||||
recoveryStateStateFlow.emit(state)
|
||||
}
|
||||
|
||||
suspend fun emitEnableRecoveryProgress(state: EnableRecoveryProgress) {
|
||||
enableRecoveryProgressStateFlow.emit(state)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,11 @@ object TestTags {
|
|||
val dialogNegative = TestTag("dialog-negative")
|
||||
val dialogNeutral = TestTag("dialog-neutral")
|
||||
|
||||
/**
|
||||
* Floating Action Button.
|
||||
*/
|
||||
val floatingActionButton = TestTag("floating-action-button")
|
||||
|
||||
/**
|
||||
* Timeline item.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue