Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5100 from corona-warn-app/fix/14543-positive-test…
Browse files Browse the repository at this point in the history
…-without-warning-text-on-the-testresult-homescreen-differs-between-iOS-and-AndroidFIGMA

Fix/14543 Positive test without warning: text on the testresult (homescreen) differs between iOS and Android/FIGMA
  • Loading branch information
30mar authored Mar 17, 2023
2 parents 4ae369a + 60dd933 commit 18c05a2
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1513,11 +1513,13 @@ Bei ausgeschalteter Hintergrundaktualisierung müssen Sie die App täglich aufru

"Home_Finding_Positive_Card_PCR_Item2" = "Falls Sie Risikofaktoren für eine schwere COVID-19-Erkrankung haben, lassen Sie sich ärztlich beraten. Bekannte Risikofaktoren sind z.B. Alter über 60 Jahre, Immunschwäche, Diabetes und hohes Übergewicht.";

"Home_Finding_Positive_Card_RAT_Item0" = "Sie sind sehr wahrscheinlich ansteckend. Isolieren Sie sich von anderen Personen.";
"Home_Finding_Positive_Card_RAT_Item0" = "Machen Sie einen PCR-Test, um dieses Test-Ergebnis zu verifizieren.";

"Home_Finding_Positive_Card_RAT_Item1" = "Machen Sie einen PCR-Test, um dieses Test-Ergebnis zu verifizieren.";
"Home_Finding_Positive_Card_RAT_Item1" = "Das Gesundheitsamt wird sich möglicherweise in den nächsten Tagen bei Ihnen melden.";

"Home_Finding_Positive_Card_RAT_Item2" = "Das Gesundheitsamt wird sich möglicherweise in den nächsten Tagen bei Ihnen melden.";
"Home_Finding_Positive_Card_RAT_Item2" = "Sie sind sehr wahrscheinlich ansteckend. Isolieren Sie sich von anderen Personen.";

"Home_Finding_Positive_Card_RAT_Item3" = "Teilen Sie Ihre Zufalls-IDs, damit andere gewarnt werden können.";

"Home_Finding_Positive_Card_Button" = "Andere warnen";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class HomeShownPositiveTestResultCellModel {
title: AppStrings.Home.TestResult.ShownPositive.itemRAT0,
titleColor: .enaColor(for: .textPrimary1),
accessibilityIdentifier: AccessibilityIdentifiers.Home.ShownPositiveTestResultCell.RAT.firstBulletPoint,
iconImageName: "Icons - Home",
iconImageName: "Icons - Test Tube",
iconTintColor: .enaColor(for: .riskHigh),
color: .clear,
separatorColor: .clear,
Expand All @@ -137,7 +137,7 @@ class HomeShownPositiveTestResultCellModel {
title: AppStrings.Home.TestResult.ShownPositive.itemRAT1,
titleColor: .enaColor(for: .textPrimary1),
accessibilityIdentifier: AccessibilityIdentifiers.Home.ShownPositiveTestResultCell.RAT.secondBulletPoint,
iconImageName: "Icons - Test Tube",
iconImageName: "Icons - Hotline",
iconTintColor: .enaColor(for: .riskHigh),
color: .clear,
separatorColor: .clear,
Expand All @@ -148,7 +148,18 @@ class HomeShownPositiveTestResultCellModel {
title: AppStrings.Home.TestResult.ShownPositive.itemRAT2,
titleColor: .enaColor(for: .textPrimary1),
accessibilityIdentifier: AccessibilityIdentifiers.Home.ShownPositiveTestResultCell.RAT.thirdBulletPoint,
iconImageName: "Icons - Hotline",
iconImageName: "Icons - Home",
iconTintColor: .enaColor(for: .riskHigh),
color: .clear,
separatorColor: .clear,
containerInsets: .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0),
stackViewAlignment: .top
),
HomeImageItemViewModel(
title: AppStrings.Home.TestResult.ShownPositive.itemRAT3,
titleColor: .enaColor(for: .textPrimary1),
accessibilityIdentifier: AccessibilityIdentifiers.Home.ShownPositiveTestResultCell.RAT.fourthBulletPoint,
iconImageName: "Icons - Warnen",
iconTintColor: .enaColor(for: .riskHigh),
color: .clear,
separatorColor: .clear,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,63 +117,79 @@ class HomeShownPositiveTestResultCellModelTest: CWATestCase {
XCTAssertFalse(cellModel.isRemoveTestButtonHidden)

let homeItemViewModels = cellModel.homeItemViewModels
XCTAssertEqual(homeItemViewModels.count, 3)
XCTAssertEqual(homeItemViewModels.count, 4)

XCTAssertEqual(homeItemViewModels[0].title, AppStrings.Home.TestResult.ShownPositive.itemRAT0)
XCTAssertEqual(homeItemViewModels[0].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(homeItemViewModels[0].iconImageName, "Icons - Home")
XCTAssertEqual(homeItemViewModels[0].iconImageName, "Icons - Test Tube")
XCTAssertEqual(homeItemViewModels[0].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(homeItemViewModels[0].color, .clear)
XCTAssertEqual(homeItemViewModels[0].separatorColor, .clear)
XCTAssertEqual(homeItemViewModels[0].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

XCTAssertEqual(homeItemViewModels[1].title, AppStrings.Home.TestResult.ShownPositive.itemRAT1)
XCTAssertEqual(homeItemViewModels[1].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(homeItemViewModels[1].iconImageName, "Icons - Test Tube")
XCTAssertEqual(homeItemViewModels[1].iconImageName, "Icons - Hotline")
XCTAssertEqual(homeItemViewModels[1].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(homeItemViewModels[1].color, .clear)
XCTAssertEqual(homeItemViewModels[1].separatorColor, .clear)
XCTAssertEqual(homeItemViewModels[1].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

XCTAssertEqual(homeItemViewModels[2].title, AppStrings.Home.TestResult.ShownPositive.itemRAT2)
XCTAssertEqual(homeItemViewModels[2].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(homeItemViewModels[2].iconImageName, "Icons - Hotline")
XCTAssertEqual(homeItemViewModels[2].iconImageName, "Icons - Home")
XCTAssertEqual(homeItemViewModels[2].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(homeItemViewModels[2].color, .clear)
XCTAssertEqual(homeItemViewModels[2].separatorColor, .clear)
XCTAssertEqual(homeItemViewModels[2].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

XCTAssertEqual(homeItemViewModels[3].title, AppStrings.Home.TestResult.ShownPositive.itemRAT3)
XCTAssertEqual(homeItemViewModels[3].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(homeItemViewModels[3].iconImageName, "Icons - Warnen")
XCTAssertEqual(homeItemViewModels[3].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(homeItemViewModels[3].color, .clear)
XCTAssertEqual(homeItemViewModels[3].separatorColor, .clear)
XCTAssertEqual(homeItemViewModels[3].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

coronaTestService.antigenTest.value?.keysSubmitted = true

XCTAssertTrue(cellModel.isWarnOthersButtonHidden)
XCTAssertTrue(cellModel.isRemoveTestButtonHidden)

let newHomeItemViewModels = cellModel.homeItemViewModels
XCTAssertEqual(newHomeItemViewModels.count, 3)
XCTAssertEqual(newHomeItemViewModels.count, 4)

XCTAssertEqual(newHomeItemViewModels[0].title, AppStrings.Home.TestResult.ShownPositive.itemRAT0)
XCTAssertEqual(newHomeItemViewModels[0].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(newHomeItemViewModels[0].iconImageName, "Icons - Home")
XCTAssertEqual(newHomeItemViewModels[0].iconImageName, "Icons - Test Tube")
XCTAssertEqual(newHomeItemViewModels[0].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(newHomeItemViewModels[0].color, .clear)
XCTAssertEqual(newHomeItemViewModels[0].separatorColor, .clear)
XCTAssertEqual(newHomeItemViewModels[0].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

XCTAssertEqual(newHomeItemViewModels[1].title, AppStrings.Home.TestResult.ShownPositive.itemRAT1)
XCTAssertEqual(newHomeItemViewModels[1].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(newHomeItemViewModels[1].iconImageName, "Icons - Test Tube")
XCTAssertEqual(newHomeItemViewModels[1].iconImageName, "Icons - Hotline")
XCTAssertEqual(newHomeItemViewModels[1].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(newHomeItemViewModels[1].color, .clear)
XCTAssertEqual(newHomeItemViewModels[1].separatorColor, .clear)
XCTAssertEqual(newHomeItemViewModels[1].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

XCTAssertEqual(newHomeItemViewModels[2].title, AppStrings.Home.TestResult.ShownPositive.itemRAT2)
XCTAssertEqual(newHomeItemViewModels[2].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(newHomeItemViewModels[2].iconImageName, "Icons - Hotline")
XCTAssertEqual(newHomeItemViewModels[2].iconImageName, "Icons - Home")
XCTAssertEqual(newHomeItemViewModels[2].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(newHomeItemViewModels[2].color, .clear)
XCTAssertEqual(newHomeItemViewModels[2].separatorColor, .clear)
XCTAssertEqual(newHomeItemViewModels[2].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))

XCTAssertEqual(newHomeItemViewModels[3].title, AppStrings.Home.TestResult.ShownPositive.itemRAT3)
XCTAssertEqual(newHomeItemViewModels[3].titleColor, .enaColor(for: .textPrimary1))
XCTAssertEqual(newHomeItemViewModels[3].iconImageName, "Icons - Warnen")
XCTAssertEqual(newHomeItemViewModels[3].iconTintColor, .enaColor(for: .riskHigh))
XCTAssertEqual(newHomeItemViewModels[3].color, .clear)
XCTAssertEqual(newHomeItemViewModels[3].separatorColor, .clear)
XCTAssertEqual(newHomeItemViewModels[3].containerInsets, .init(top: 10.0, left: 0.0, bottom: 10.0, right: 0))
}

}
1 change: 1 addition & 0 deletions src/xcode/ENA/ENA/Source/View Helpers/AppStrings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ enum AppStrings {
static let itemRAT0 = NSLocalizedString("Home_Finding_Positive_Card_RAT_Item0", comment: "")
static let itemRAT1 = NSLocalizedString("Home_Finding_Positive_Card_RAT_Item1", comment: "")
static let itemRAT2 = NSLocalizedString("Home_Finding_Positive_Card_RAT_Item2", comment: "")
static let itemRAT3 = NSLocalizedString("Home_Finding_Positive_Card_RAT_Item3", comment: "")
static let button = NSLocalizedString("Home_Finding_Positive_Card_Button", comment: "")
static let removeTestButton = NSLocalizedString("Home_Finding_Positive_Card_Button_Remove_Test", comment: "")
}
Expand Down

0 comments on commit 18c05a2

Please sign in to comment.