From cb8eda4ebeccac27a4715fa4b89d85905c6902c7 Mon Sep 17 00:00:00 2001
From: Mohamed Metwalli <mohamed.metwalli@sap.com>
Date: Wed, 6 Jan 2021 14:17:17 +0100
Subject: [PATCH] Add submission data

---
 .../coronawarnapp/ui/main/home/HomeData.kt    | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeData.kt b/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeData.kt
index ee93b1757..bd3f9bd2f 100644
--- a/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeData.kt
+++ b/Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/ui/main/home/HomeData.kt
@@ -1,14 +1,32 @@
 package de.rki.coronawarnapp.ui.main.home
 
 import de.rki.coronawarnapp.risk.RiskState
+import de.rki.coronawarnapp.submission.ui.homecards.FetchingResult
+import de.rki.coronawarnapp.submission.ui.homecards.NoTest
+import de.rki.coronawarnapp.submission.ui.homecards.SubmissionDone
+import de.rki.coronawarnapp.submission.ui.homecards.TestError
+import de.rki.coronawarnapp.submission.ui.homecards.TestErrorCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestFetchingCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestInvalid
+import de.rki.coronawarnapp.submission.ui.homecards.TestInvalidCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestNegative
+import de.rki.coronawarnapp.submission.ui.homecards.TestNegativeCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestPending
+import de.rki.coronawarnapp.submission.ui.homecards.TestPendingCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestPositive
+import de.rki.coronawarnapp.submission.ui.homecards.TestPositiveCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestSubmissionDoneCard
+import de.rki.coronawarnapp.submission.ui.homecards.TestUnregisteredCard
 import de.rki.coronawarnapp.tracing.TracingProgress
 import de.rki.coronawarnapp.tracing.states.IncreasedRisk
 import de.rki.coronawarnapp.tracing.states.LowRisk
 import de.rki.coronawarnapp.tracing.states.TracingDisabled
+import de.rki.coronawarnapp.tracing.states.TracingFailed
 import de.rki.coronawarnapp.tracing.states.TracingInProgress
 import de.rki.coronawarnapp.tracing.ui.homecards.IncreasedRiskCard
 import de.rki.coronawarnapp.tracing.ui.homecards.LowRiskCard
 import de.rki.coronawarnapp.tracing.ui.homecards.TracingDisabledCard
+import de.rki.coronawarnapp.tracing.ui.homecards.TracingFailedCard
 import de.rki.coronawarnapp.tracing.ui.homecards.TracingProgressCard
 import org.joda.time.Instant
 
@@ -60,9 +78,55 @@ object HomeData {
             ),
             onCardClick = {}
         )
+
+        val tracingFailedItem = TracingFailedCard.Item(
+            state = TracingFailed(
+                riskState = RiskState.CALCULATION_FAILED,
+                isInDetailsMode = true,
+                lastExposureDetectionTime = Instant.now()
+            ),
+            onCardClick = {},
+            onRetryClick = {}
+        )
     }
 
     object Submission {
+        val testUnregisteredItem = TestUnregisteredCard.Item(
+            state = NoTest,
+            onClickAction = {}
+        )
+
+        val testFetchingItem = TestFetchingCard.Item(
+            state = FetchingResult
+        )
+
+        val testPositiveItem = TestPositiveCard.Item(
+            state = TestPositive,
+            onClickAction = {}
+        )
+
+        val testNegativeItem = TestNegativeCard.Item(
+            state = TestNegative,
+            onClickAction = {}
+        )
+
+        val testInvalidItem = TestInvalidCard.Item(
+            state = TestInvalid,
+            onDeleteTest = {}
+        )
 
+        val testErrorItem = TestErrorCard.Item(
+            state = TestError,
+            onDeleteTest = {}
+        )
+
+        val testPendingItem = TestPendingCard.Item(
+            state = TestPending,
+            onClickAction = {}
+        )
+
+        val testSubmissionDoneItem = TestSubmissionDoneCard.Item(
+            state = SubmissionDone
+        )
     }
 }
-- 
GitLab