Announcement for Spaces

This commit is contained in:
Benoit Marty 2025-10-02 23:13:43 +02:00
parent 8664b2ce90
commit e40451463b
30 changed files with 690 additions and 1 deletions

View file

@ -0,0 +1,19 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
plugins {
id("io.element.android-compose-library")
}
android {
namespace = "io.element.android.features.announcement.test"
}
dependencies {
implementation(projects.features.announcement.api)
implementation(libs.coroutines.core)
implementation(projects.tests.testutils)
}

View file

@ -0,0 +1,28 @@
/*
* Copyright 2024 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.features.rageshake.test.logs
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import io.element.android.features.announcement.api.AnnouncementService
import io.element.android.features.announcement.api.AnnouncementState
import io.element.android.tests.testutils.lambda.lambdaError
class FakeAnnouncementService(
val onEnteringSpaceTabResult: () -> Unit = { lambdaError() },
val renderResult: (AnnouncementState, Modifier) -> Unit = { _, _ -> lambdaError() },
) : AnnouncementService {
override suspend fun onEnteringSpaceTab() {
onEnteringSpaceTabResult()
}
@Composable
override fun Render(state: AnnouncementState, modifier: Modifier) {
renderResult(state, modifier)
}
}