fix: remove compatible provider consumers
This commit is contained in:
+4
-8
@@ -27,19 +27,15 @@ class ProviderSelectionScreenTest {
|
||||
ProviderProfile(ProviderProfileId("local"), ProviderType.LOCAL_EXPERIENCE, "Local"),
|
||||
Availability.Enabled,
|
||||
)
|
||||
val compatible = ProviderOption(
|
||||
ProviderProfile(
|
||||
ProviderProfileId("compatible"),
|
||||
ProviderType.COMPATIBLE_BACKEND,
|
||||
"Compatible",
|
||||
),
|
||||
val abox = ProviderOption(
|
||||
ProviderProfile(ProviderProfileId("abox"), ProviderType.ABOX, "ABox"),
|
||||
Availability.Disabled(UnavailableReason.PROTOCOL_PENDING),
|
||||
)
|
||||
var selected: ProviderOption? = null
|
||||
composeRule.setContent {
|
||||
ABoxTheme {
|
||||
ProviderSelectionScreen(
|
||||
state = ProviderSelectionUiState(listOf(local, compatible)),
|
||||
state = ProviderSelectionUiState(listOf(local, abox)),
|
||||
onSelect = { selected = it },
|
||||
)
|
||||
}
|
||||
@@ -47,6 +43,6 @@ class ProviderSelectionScreenTest {
|
||||
|
||||
composeRule.onNodeWithText("Local experience").assertIsEnabled().performClick()
|
||||
assertEquals(local, selected)
|
||||
composeRule.onNodeWithText("Compatible backend").assertIsNotEnabled()
|
||||
composeRule.onNodeWithText("ABox").assertIsNotEnabled()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,6 @@ private fun LoginErrorMessage.stringResource(): Int = when (this) {
|
||||
private fun providerName(type: ProviderType): String = stringResource(
|
||||
when (type) {
|
||||
ProviderType.ABOX -> R.string.provider_abox_name
|
||||
ProviderType.COMPATIBLE_BACKEND -> R.string.provider_compatible_name
|
||||
ProviderType.LOCAL_EXPERIENCE -> R.string.provider_local_name
|
||||
},
|
||||
)
|
||||
@@ -231,7 +230,6 @@ private fun providerName(type: ProviderType): String = stringResource(
|
||||
private fun providerDescription(type: ProviderType): String = stringResource(
|
||||
when (type) {
|
||||
ProviderType.ABOX -> R.string.provider_abox_description
|
||||
ProviderType.COMPATIBLE_BACKEND -> R.string.provider_compatible_description
|
||||
ProviderType.LOCAL_EXPERIENCE -> R.string.provider_local_description
|
||||
},
|
||||
)
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ data class ProviderAvailability(
|
||||
) {
|
||||
fun forType(type: ProviderType): Availability = when (type) {
|
||||
ProviderType.ABOX -> abox
|
||||
ProviderType.COMPATIBLE_BACKEND -> compatible
|
||||
ProviderType.LOCAL_EXPERIENCE -> local
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -185,7 +185,6 @@ private fun ProviderOptionCard(
|
||||
private fun providerName(type: ProviderType): String = stringResource(
|
||||
when (type) {
|
||||
ProviderType.ABOX -> R.string.provider_abox_name
|
||||
ProviderType.COMPATIBLE_BACKEND -> R.string.provider_compatible_name
|
||||
ProviderType.LOCAL_EXPERIENCE -> R.string.provider_local_name
|
||||
},
|
||||
)
|
||||
@@ -194,14 +193,12 @@ private fun providerName(type: ProviderType): String = stringResource(
|
||||
private fun providerDescription(type: ProviderType): String = stringResource(
|
||||
when (type) {
|
||||
ProviderType.ABOX -> R.string.provider_abox_description
|
||||
ProviderType.COMPATIBLE_BACKEND -> R.string.provider_compatible_description
|
||||
ProviderType.LOCAL_EXPERIENCE -> R.string.provider_local_description
|
||||
},
|
||||
)
|
||||
|
||||
private fun providerMark(type: ProviderType): String = when (type) {
|
||||
ProviderType.ABOX -> "A"
|
||||
ProviderType.COMPATIBLE_BACKEND -> "C"
|
||||
ProviderType.LOCAL_EXPERIENCE -> "L"
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -43,11 +43,6 @@ class ProviderSelectionViewModel @Inject constructor(
|
||||
companion object {
|
||||
private val PROFILES = listOf(
|
||||
ProviderProfile(ProviderProfileId("abox-default"), ProviderType.ABOX, "ABox"),
|
||||
ProviderProfile(
|
||||
ProviderProfileId("compatible-default"),
|
||||
ProviderType.COMPATIBLE_BACKEND,
|
||||
"Compatible backend",
|
||||
),
|
||||
ProviderProfile(
|
||||
ProviderProfileId("local-experience"),
|
||||
ProviderType.LOCAL_EXPERIENCE,
|
||||
|
||||
Reference in New Issue
Block a user