8000 Enable rampdown notice in screenshots (DEV) by SamuraiKek · Pull Request #5913 · corona-warn-app/cwa-app-android · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Enable rampdown notice in screenshots (DEV) #5913

Merged
merged 2 commits into from
Mar 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import testhelpers.recyclerScrollTo
import testhelpers.setViewVisibility
import testhelpers.takeScreenshot
import timber.log.Timber
import java.util.Locale

@RunWith(AndroidJUnit4::class)
class HomeFragmentTest : BaseUITest() {
Expand Down Expand Up @@ -400,13 +401,22 @@ class HomeFragmentTest : BaseUITest() {
private fun homeFragmentItemsLiveData(
tracingStateItem: TracingStateItem = HomeData.Tracing.LOW_RISK_ITEM_WITH_ENCOUNTERS,
submissionTestResultItems: List<TestResultItem> = listOf(HomeData.Submission.TEST_UNREGISTERED_ITEM),
showRampDownNotice: Boolean = false
showRampDownNotice: Boolean = true
): LiveData<List<HomeItem>> =
MutableLiveData(
mutableListOf<HomeItem>().apply {

if (showRampDownNotice) {
add(getRampDownNotice())
val germanTitle = "Acthung!"
val englishTitle = "Important!"
val germanSubtitle =
"Es wird nur noch bis zum 30. April 2023 möglich sein, andere Personen über die Corona-Warn-App zu warnen!"
val englishSubtitle =
"You will only be able to warn others through the Crorona-Warn-App until April 30, 2023"
when (Locale.getDefault().displayLanguage) {
"de" -> add(getRampDownNotice(germanTitle, germanSubtitle))
else -> add(getRampDownNotice(englishTitle, englishSubtitle))
}
}

val hideTracingState = submissionTestResultItems.any {
Expand All @@ -428,12 +438,12 @@ class HomeFragmentTest : BaseUITest() {
}
)

private fun getRampDownNotice() = RampDownNoticeCard.Item(
private fun getRampDownNotice(title: String, subtitle: String) = RampDownNoticeCard.Item(
>
rampDownNotice = RampDownNotice(
visible = true,
title = "Betriebsende",
subtitle = "Der Betrieb der Corona-Warn-App wird am xx.xx.xxxx eingestellt.",
title = title,
subtitle = subtitle,
description = "",
faqUrl = null
)
Expand Down
0