Skip to content
Snippets Groups Projects
Unverified Commit 71f68119 authored by Matthias Urhahn's avatar Matthias Urhahn Committed by GitHub
Browse files

Show data donation server URL in test fragment for server environments (DEV) (#2417)


* Show data donation server URL in test fragment for server environments.

* Fix test not working.

Co-authored-by: default avatarRalf Gehrer <ralfgehrer@users.noreply.github.com>
parent c692b427
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,7 @@ class DebugOptionsFragment : Fragment(R.layout.fragment_test_debugoptions), Auto
environmentCdnurlDownload.text = "Download CDN:\n${state.urlDownload}"
environmentCdnurlSubmission.text = "Submission CDN:\n${state.urlSubmission}"
environmentCdnurlVerification.text = "Verification CDN:\n${state.urlVerification}"
environmentUrlDatadonation.text = "DataDonation:\n${state.urlDataDonation}"
}
}
vm.environmentChangeEvent.observe2(this) {
......
......@@ -7,7 +7,8 @@ data class EnvironmentState(
val available: List<EnvironmentSetup.Type>,
val urlSubmission: String,
val urlDownload: String,
val urlVerification: String
val urlVerification: String,
val urlDataDonation: String
) {
companion object {
internal fun EnvironmentSetup.toEnvironmentState() = EnvironmentState(
......@@ -15,7 +16,8 @@ data class EnvironmentState(
available = EnvironmentSetup.Type.values().toList(),
urlSubmission = submissionCdnUrl,
urlDownload = downloadCdnUrl,
urlVerification = verificationCdnUrl
urlVerification = verificationCdnUrl,
urlDataDonation = dataDonationCdnUrl
)
}
}
......@@ -104,6 +104,17 @@
app:layout_constraintTop_toBottomOf="@+id/environment_cdnurl_submission"
tools:text="Verification: ?" />
<TextView
android:id="@+id/environment_url_datadonation"
style="@style/body2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_tiny"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/environment_cdnurl_verification"
tools:text="DataDonation: ?" />
<RadioGroup
android:id="@+id/environment_toggle_group"
android:layout_width="match_parent"
......@@ -113,7 +124,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/environment_cdnurl_verification" />
app:layout_constraintTop_toBottomOf="@+id/environment_url_datadonation" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
......
......@@ -39,6 +39,7 @@ class DebugOptionsFragmentViewModelTest : BaseTest() {
every { environmentSetup.submissionCdnUrl } returns "submissionUrl"
every { environmentSetup.downloadCdnUrl } returns "downloadUrl"
every { environmentSetup.verificationCdnUrl } returns "verificationUrl"
every { environmentSetup.dataDonationCdnUrl } returns "dataDonationUrl"
every { environmentSetup.currentEnvironment = any() } answers {
currentEnvironment = arg(0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment