diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt index 9f9dea61..f96e97e5 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/Descriptor.kt @@ -20,24 +20,15 @@ data class Descriptor( val expirationDate: LocalDateTime?, val netTests: List, val longRunningTests: List = emptyList(), - val source: Source, + val source: InstalledTestDescriptorModel, val updateStatus: UpdateStatus, ) { - sealed interface Source { - data class Default(val value: DefaultTestDescriptor) : Source - - data class Installed(val value: InstalledTestDescriptorModel) : Source - } - val isExpired get() = expirationDate != null && expirationDate < LocalDateTime.now() val updatable get() = updateStatus is UpdateStatus.UpdateRejected val key: String - get() = when (source) { - is Source.Default -> name - is Source.Installed -> source.value.key - } + get() = source.key val allTests get() = netTests + longRunningTests @@ -46,23 +37,14 @@ data class Descriptor( .sumOf { it.test.runtime(it.inputs).inWholeSeconds } .seconds - val settingsPrefix: String? - get() = when (isDefaultDescriptor()) { - true -> null - else -> (source as Source.Installed).value.id.value.toString() - } + val settingsPrefix: String + get() = source.id.value.toString() fun isDefaultDescriptor(): Boolean { - return when (source) { - is Source.Default -> true - is Source.Installed -> source.value.isDefaultTestDescriptor - } + return source.isDefaultTestDescriptor } fun isInstalledNonDefaultDescriptor(): Boolean { - return when (source) { - is Source.Installed -> !source.value.isDefaultTestDescriptor - else -> false - } + return !source.isDefaultTestDescriptor } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt index 50053c9f..36b1d722 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/InstalledTestDescriptorModel.kt @@ -103,7 +103,7 @@ fun InstalledTestDescriptorModel.toDescriptor(updateStatus: UpdateStatus = Updat dataUsage = { if (isDefaultTestDescriptor) stringResource(getDataUsage()) else null }, expirationDate = expirationDate, netTests = netTests.orEmpty(), - source = Descriptor.Source.Installed(this), + source = this, updateStatus = updateStatus, ) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt index 3c2ffd18..68d586e9 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/RunSpecification.kt @@ -17,24 +17,11 @@ sealed interface RunSpecification { @Serializable data class Test( - val source: Source, + val source: InstalledTestDescriptorModel.Id? = null, val netTests: List, ) { - @Serializable - sealed interface Source { - @Serializable - data class Default(val name: String) : Source - - @Serializable - data class Installed(val id: InstalledTestDescriptorModel.Id) : Source - - companion object { - fun fromDescriptor(descriptor: Descriptor) = - when (descriptor.source) { - is Descriptor.Source.Default -> Default(descriptor.name) - is Descriptor.Source.Installed -> Installed(descriptor.source.value.id) - } - } + companion object { + fun fromDescriptor(descriptor: Descriptor) =descriptor.source.id } } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt index f3399b98..32105b27 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/data/repositories/PreferenceRepository.kt @@ -133,8 +133,7 @@ class PreferenceRepository( ): Flow { val key = getPreferenceKey( name = descriptor.name, - prefix = (descriptor.source as? Descriptor.Source.Installed) - ?.value?.id?.value?.toString(), + prefix = descriptor.source.id.value.toString(), autoRun = isAutoRun, ) return dataStore.data.map { diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt index b247ae7b..bb40df9c 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/di/Dependencies.kt @@ -286,7 +286,6 @@ class Dependencies( @VisibleForTesting val getTestDescriptors by lazy { GetTestDescriptors( - getDefaultTestDescriptors = { emptyList() }, listInstalledTestDescriptors = testDescriptorRepository::list, descriptorUpdates = getDescriptorUpdate::observeAvailableUpdatesState, ) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt index 47455162..4fd92041 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetAutoRunSpecification.kt @@ -17,7 +17,7 @@ class GetAutoRunSpecification( return RunSpecification.Full( tests = descriptors.map { descriptor -> RunSpecification.Test( - source = RunSpecification.Test.Source.fromDescriptor(descriptor), + source = RunSpecification.Test.fromDescriptor(descriptor), netTests = descriptor.netTests, ) }, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt index 0a3a283d..e7478872 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetResults.kt @@ -34,7 +34,7 @@ fun List.forResult(result: ResultModel): Descriptor? = result.testDescriptorId ?.let { descriptorId -> firstOrNull { - it.source is Descriptor.Source.Installed && it.source.value.id == descriptorId + it.source.id == descriptorId } } ?: firstOrNull { it.name == result.testGroupName } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt index b98616c5..7b44e505 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptors.kt @@ -3,20 +3,15 @@ package org.ooni.probe.domain import androidx.compose.runtime.Composable import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine -import kotlinx.coroutines.flow.flowOf -import kotlinx.coroutines.flow.map import ooniprobe.composeapp.generated.resources.Res import ooniprobe.composeapp.generated.resources.Settings_TestOptions_LongRunningTest import org.jetbrains.compose.resources.stringResource -import org.ooni.probe.data.models.DefaultTestDescriptor import org.ooni.probe.data.models.Descriptor import org.ooni.probe.data.models.DescriptorUpdatesStatus import org.ooni.probe.data.models.InstalledTestDescriptorModel -import org.ooni.probe.data.models.UpdateStatus import org.ooni.probe.data.models.toDescriptor class GetTestDescriptors( - private val getDefaultTestDescriptors: () -> List, private val listInstalledTestDescriptors: () -> Flow>, private val descriptorUpdates: () -> Flow, ) { @@ -24,39 +19,14 @@ class GetTestDescriptors( return combine( listInstalledTestDescriptors(), descriptorUpdates(), - flowOf(getDefaultTestDescriptors()), - ) { installedDescriptors, descriptorUpdates, defaultDescriptors -> + ) { installedDescriptors, descriptorUpdates -> val updatedDescriptors = installedDescriptors.map { item -> item.toDescriptor(updateStatus = descriptorUpdates.getStatusOf(item.id)) } - return@combine defaultDescriptors - .map { it.toDescriptor() } + updatedDescriptors + return@combine updatedDescriptors } } - private fun DefaultTestDescriptor.toDescriptor() = - Descriptor( - name = label, - title = { stringResource(title) }, - shortDescription = { stringResource(shortDescription) }, - description = { - if (label == "experimental") { - stringResource(description, experimentalLinks()) - } else { - stringResource(description) - } - }, - icon = icon, - color = color, - animation = animation, - dataUsage = { stringResource(dataUsage) }, - expirationDate = null, - netTests = netTests, - longRunningTests = longRunningTests, - source = Descriptor.Source.Default(this), - updateStatus = UpdateStatus.NotApplicable, - ) - @Composable private fun experimentalLinks() = """ diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt index 89017c85..706331d2 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/GetTestDescriptorsBySpec.kt @@ -32,16 +32,6 @@ class GetTestDescriptorsBySpec( // Is this descriptor contained in the RunSpecification's list of tests private fun RunSpecification.Full.forDescriptor(descriptor: Descriptor) = tests.firstOrNull { specTest -> - when (descriptor.source) { - is Descriptor.Source.Default -> { - specTest.source is RunSpecification.Test.Source.Default && - specTest.source.name == descriptor.name - } - - is Descriptor.Source.Installed -> { - specTest.source is RunSpecification.Test.Source.Installed && - specTest.source.id == descriptor.source.value.id - } - } + specTest.source == descriptor.source.id } } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt index 58447056..3fb352f1 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunDescriptors.kt @@ -129,7 +129,7 @@ class RunDescriptors( ) { val result = ResultModel( testGroupName = descriptor.name, - testDescriptorId = (descriptor.source as? Descriptor.Source.Installed)?.value?.id, + testDescriptorId = descriptor.source.id, taskOrigin = taskOrigin, ) val resultId = storeResult(result) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt index 562b9594..aa648dc3 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/domain/RunNetTest.kt @@ -60,8 +60,7 @@ class RunNetTest( testTotal = spec.testTotal, ) } - val installedDescriptorId = - (spec.descriptor.source as? Descriptor.Source.Installed)?.value?.id + val installedDescriptorId = spec.descriptor.source.id startTest( spec.netTest, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt index 349f2ab1..9ad206a6 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/choosewebsites/ChooseWebsitesViewModel.kt @@ -104,7 +104,6 @@ class ChooseWebsitesViewModel( RunSpecification.Full( tests = listOf( RunSpecification.Test( - source = RunSpecification.Test.Source.Default("websites"), netTests = listOf( NetTest( test = TestType.WebConnectivity, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt index d179642f..06b40fc4 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/dashboard/DashboardViewModel.kt @@ -114,7 +114,7 @@ class DashboardViewModel( .filterIsInstance() .onEach { state.value.descriptors[DescriptorType.Installed] - ?.map { (it.source as Descriptor.Source.Installed).value } + ?.map { it.source } ?.let { descriptors -> fetchDescriptorUpdate(descriptors) } diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt index 4308c19e..be25abdc 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorScreen.kt @@ -76,7 +76,7 @@ fun DescriptorScreen( isRefreshing = state.isRefreshing, onRefresh = { onEvent(DescriptorViewModel.Event.FetchUpdatedDescriptor) }, state = pullRefreshState, - enabled = state.descriptor?.source is Descriptor.Source.Installed, + enabled = true, ) .background(MaterialTheme.colorScheme.background), ) { @@ -127,11 +127,7 @@ fun DescriptorScreen( modifier = Modifier.padding(horizontal = 16.dp, vertical = 16.dp), ) - if (descriptor.isInstalledNonDefaultDescriptor()) { - (descriptor.source as Descriptor.Source.Installed?)?.let { - ConfigureUpdates(onEvent, it.value.autoUpdate) - } - } + ConfigureUpdates(onEvent, descriptor.source.autoUpdate) Text( stringResource(Res.string.AddDescriptor_Settings), style = MaterialTheme.typography.titleMedium, @@ -164,13 +160,11 @@ fun DescriptorScreen( TestDisplayMode.WebsitesOnly -> WebsiteItems(state.tests) } - if (descriptor.source is Descriptor.Source.Installed) { - InstalledDescriptorActionsView( - descriptor = descriptor.source.value, - onEvent = onEvent, - modifier = Modifier.padding(horizontal = 16.dp), - ) - } + InstalledDescriptorActionsView( + descriptor = descriptor.source, + onEvent = onEvent, + modifier = Modifier.padding(horizontal = 16.dp), + ) } } if (state.isRefreshing) { diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt index 449f9a25..5acd4a2b 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/descriptor/DescriptorViewModel.kt @@ -166,8 +166,7 @@ class DescriptorViewModel( events.filterIsInstance() .onEach { val descriptor = state.value.descriptor ?: return@onEach - if (descriptor.source !is Descriptor.Source.Installed) return@onEach - setAutoUpdate(descriptor.source.value.id, it.value) + setAutoUpdate(descriptor.source.id, it.value) } .launchIn(viewModelScope) @@ -176,23 +175,21 @@ class DescriptorViewModel( if (state.value.isRefreshing) return@onEach val descriptor = state.value.descriptor ?: return@onEach - if (descriptor.source !is Descriptor.Source.Installed) return@onEach _state.update { it.copy(refreshType = UpdateStatusType.UpdateLink, updatedDescriptor = null) } - fetchDescriptorUpdate(listOf(descriptor.source.value)) + fetchDescriptorUpdate(listOf(descriptor.source)) } .launchIn(viewModelScope) events.filterIsInstance() .onEach { val descriptor = state.value.updatedDescriptor ?: return@onEach - if (descriptor.source !is Descriptor.Source.Installed) return@onEach _state.update { it.copy(refreshType = UpdateStatusType.None, updatedDescriptor = null) } - reviewUpdates(listOf(descriptor.source.value)) + reviewUpdates(listOf(descriptor.source)) goToReviewDescriptorUpdates() } .launchIn(viewModelScope) diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt index d481da49..8951dd24 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/result/ResultViewModel.kt @@ -106,7 +106,7 @@ class ResultViewModel( return RunSpecification.Full( tests = listOf( RunSpecification.Test( - source = RunSpecification.Test.Source.fromDescriptor(item.descriptor), + source = RunSpecification.Test.fromDescriptor(item.descriptor), netTests = listOf( NetTest( test = TestType.WebConnectivity, diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt index 16a4af3e..783d6897 100644 --- a/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt +++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/ui/run/RunViewModel.kt @@ -228,14 +228,7 @@ class RunViewModel( tests = selectedTests.map { (descriptor, tests) -> RunSpecification.Test( - source = - when (descriptor.source) { - is Descriptor.Source.Default -> - RunSpecification.Test.Source.Default(descriptor.name) - - is Descriptor.Source.Installed -> - RunSpecification.Test.Source.Installed(descriptor.source.value.id) - }, + source = descriptor.source.id, netTests = tests, ) }, diff --git a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt b/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt deleted file mode 100644 index 5ea68194..00000000 --- a/composeApp/src/ooniMain/kotlin/org/ooni/probe/domain/GetDefaultTestDescriptors.kt +++ /dev/null @@ -1,134 +0,0 @@ -package org.ooni.probe.domain - -import androidx.compose.ui.graphics.Color -import ooniprobe.composeapp.generated.resources.Dashboard_Circumvention_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Circumvention_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_Experimental_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Experimental_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_InstantMessaging_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_InstantMessaging_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_Performance_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Performance_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Dashboard_Websites_Card_Description -import ooniprobe.composeapp.generated.resources.Dashboard_Websites_Overview_Paragraph -import ooniprobe.composeapp.generated.resources.Res -import ooniprobe.composeapp.generated.resources.TestResults_NotAvailable -import ooniprobe.composeapp.generated.resources.Test_Circumvention_Fullname -import ooniprobe.composeapp.generated.resources.Test_Experimental_Fullname -import ooniprobe.composeapp.generated.resources.Test_InstantMessaging_Fullname -import ooniprobe.composeapp.generated.resources.Test_Performance_Fullname -import ooniprobe.composeapp.generated.resources.Test_Websites_Fullname -import ooniprobe.composeapp.generated.resources.performance_datausage -import ooniprobe.composeapp.generated.resources.small_datausage -import ooniprobe.composeapp.generated.resources.test_circumvention -import ooniprobe.composeapp.generated.resources.test_experimental -import ooniprobe.composeapp.generated.resources.test_instant_messaging -import ooniprobe.composeapp.generated.resources.test_performance -import ooniprobe.composeapp.generated.resources.test_websites -import ooniprobe.composeapp.generated.resources.websites_datausage -import org.ooni.engine.models.TestType -import org.ooni.probe.data.models.Animation -import org.ooni.probe.data.models.DefaultTestDescriptor -import org.ooni.probe.data.models.NetTest - -class GetDefaultTestDescriptors { - operator fun invoke(): List = emptyList() - /*listOf( - WEBSITES, - INSTANT_MESSAGING, - CIRCUMVENTION, - PERFORMANCE, - EXPERIMENTAL, - )*/ - - companion object { - private val WEBSITES = - DefaultTestDescriptor( - label = "websites", - title = Res.string.Test_Websites_Fullname, - shortDescription = Res.string.Dashboard_Websites_Card_Description, - description = Res.string.Dashboard_Websites_Overview_Paragraph, - icon = Res.drawable.test_websites, - color = Color(0xFF4c6ef5), - animation = Animation.Websites, - dataUsage = Res.string.websites_datausage, - netTests = listOf( - NetTest(TestType.WebConnectivity), - ), - ) - - private val INSTANT_MESSAGING = - DefaultTestDescriptor( - label = "instant_messaging", - title = Res.string.Test_InstantMessaging_Fullname, - shortDescription = Res.string.Dashboard_InstantMessaging_Card_Description, - description = Res.string.Dashboard_InstantMessaging_Overview_Paragraph, - icon = Res.drawable.test_instant_messaging, - color = Color(0xFF15aabf), - animation = Animation.InstantMessaging, - dataUsage = Res.string.small_datausage, - netTests = listOf( - NetTest(TestType.Whatsapp), - NetTest(TestType.Telegram), - NetTest(TestType.FacebookMessenger), - NetTest(TestType.Signal), - ), - ) - - private val CIRCUMVENTION = - DefaultTestDescriptor( - label = "circumvention", - title = Res.string.Test_Circumvention_Fullname, - shortDescription = Res.string.Dashboard_Circumvention_Card_Description, - description = Res.string.Dashboard_Circumvention_Overview_Paragraph, - icon = Res.drawable.test_circumvention, - color = Color(0xFFe64980), - animation = Animation.Circumvention, - dataUsage = Res.string.small_datausage, - netTests = listOf( - NetTest(TestType.Psiphon), - NetTest(TestType.Tor), - ), - ) - - private val PERFORMANCE = - DefaultTestDescriptor( - label = "performance", - title = Res.string.Test_Performance_Fullname, - shortDescription = Res.string.Dashboard_Performance_Card_Description, - description = Res.string.Dashboard_Performance_Overview_Paragraph, - icon = Res.drawable.test_performance, - color = Color(0xFFbe4bdb), - animation = Animation.Performance, - dataUsage = Res.string.performance_datausage, - netTests = listOf( - NetTest(TestType.Ndt), - NetTest(TestType.Dash), - NetTest(TestType.HttpHeaderFieldManipulation), - NetTest(TestType.HttpInvalidRequestLine), - ), - ) - - private val EXPERIMENTAL = - DefaultTestDescriptor( - label = "experimental", - title = Res.string.Test_Experimental_Fullname, - shortDescription = Res.string.Dashboard_Experimental_Card_Description, - description = Res.string.Dashboard_Experimental_Overview_Paragraph, - icon = Res.drawable.test_experimental, - color = Color(0xFF495057), - animation = Animation.Experimental, - dataUsage = Res.string.TestResults_NotAvailable, - netTests = listOf( - NetTest(TestType.Experimental("stunreachability")), - NetTest(TestType.Experimental("openvpn")), - // NetTest(TestType.Experimental("riseupvpn")), - // NetTest(TestType.Experimental("echcheck")), - ), - longRunningTests = listOf( - // NetTest(TestType.Experimental("torsf")), - NetTest(TestType.Experimental("vanilla_tor")), - ), - ) - } -}