mirror of
https://github.com/bitwarden/android.git
synced 2026-11-19 17:40:12 -06:00
Add send icons to row items. (#496)
This commit is contained in:
committed by
Álison Fernandes
parent
10bad26c95
commit
02c8f4bfec
@@ -501,6 +501,7 @@ private val DEFAULT_SEND_ITEM: SendState.ViewState.Content.SendItem =
|
||||
name = "mockName-1",
|
||||
deletionDate = "1",
|
||||
type = SendState.ViewState.Content.SendItem.Type.FILE,
|
||||
iconList = emptyList(),
|
||||
)
|
||||
|
||||
private val DEFAULT_CONTENT_VIEW_STATE: SendState.ViewState.Content = SendState.ViewState.Content(
|
||||
@@ -513,6 +514,7 @@ private val DEFAULT_CONTENT_VIEW_STATE: SendState.ViewState.Content = SendState.
|
||||
name = "mockName-2",
|
||||
deletionDate = "1",
|
||||
type = SendState.ViewState.Content.SendItem.Type.TEXT,
|
||||
iconList = emptyList(),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
+12
-1
@@ -4,6 +4,7 @@ import com.bitwarden.core.SendType
|
||||
import com.x8bit.bitwarden.data.vault.datasource.sdk.model.createMockSendView
|
||||
import com.x8bit.bitwarden.data.vault.repository.model.SendData
|
||||
import com.x8bit.bitwarden.ui.tools.feature.send.SendState
|
||||
import com.x8bit.bitwarden.ui.tools.feature.send.model.SendStatusIcon
|
||||
import org.junit.jupiter.api.AfterEach
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
@@ -36,8 +37,8 @@ class SendDataExtensionsTest {
|
||||
@Test
|
||||
fun `toViewState should return Content when SendData is not empty`() {
|
||||
val list = listOf(
|
||||
createMockSendView(number = 1, type = SendType.FILE),
|
||||
createMockSendView(number = 2, type = SendType.TEXT),
|
||||
createMockSendView(number = 1, type = SendType.FILE),
|
||||
)
|
||||
val sendData = SendData(list)
|
||||
|
||||
@@ -53,12 +54,22 @@ class SendDataExtensionsTest {
|
||||
name = "mockName-1",
|
||||
deletionDate = "Oct 27, 2023, 12:00 PM",
|
||||
type = SendState.ViewState.Content.SendItem.Type.FILE,
|
||||
iconList = listOf(
|
||||
SendStatusIcon.EXPIRED,
|
||||
SendStatusIcon.PASSWORD,
|
||||
SendStatusIcon.MAX_ACCESS_COUNT_REACHED,
|
||||
),
|
||||
),
|
||||
SendState.ViewState.Content.SendItem(
|
||||
id = "mockId-2",
|
||||
name = "mockName-2",
|
||||
deletionDate = "Oct 27, 2023, 12:00 PM",
|
||||
type = SendState.ViewState.Content.SendItem.Type.TEXT,
|
||||
iconList = listOf(
|
||||
SendStatusIcon.EXPIRED,
|
||||
SendStatusIcon.PASSWORD,
|
||||
SendStatusIcon.MAX_ACCESS_COUNT_REACHED,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user