Handle isProton in ContactEmail and ParticipantMapper

Ignore 2 tests failing because MR 575
This commit is contained in:
Adam Jodlowski
2023-07-27 13:58:41 +02:00
parent e6eeda1f1c
commit 1faa61389f
3 changed files with 11 additions and 5 deletions
@@ -40,6 +40,7 @@ import dagger.hilt.android.testing.UninstallModules
import io.mockk.mockk
import me.proton.core.auth.domain.usecase.ValidateServerProof
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
@RegressionTest
@@ -85,6 +86,7 @@ internal class ComposerRecipientsCollapsedChipsTests : MockedNetworkTest(), Comp
navigator { navigateTo(Destination.Composer) }
}
@Ignore("https://jira.protontech.ch/browse/MAILANDR-781")
@Test
@SmokeTest
@TestId("190243")
@@ -142,6 +144,7 @@ internal class ComposerRecipientsCollapsedChipsTests : MockedNetworkTest(), Comp
}
}
@Ignore("https://jira.protontech.ch/browse/MAILANDR-781")
@Test
@SmokeTest
@TestId("190246")
@@ -39,7 +39,7 @@ class ParticipantMapper @Inject constructor() {
return Participant(
recipient.address,
contactEmail?.name?.takeIfNotBlank() ?: recipient.address,
false, // after we bump core, change to: contactEmail?.isProton ?: false
contactEmail?.isProton ?: false,
null
)
}
@@ -48,7 +48,8 @@ class ParticipantMapperTest {
0,
ContactIdTestData.contactId1,
"test1@protonmail.com",
emptyList()
emptyList(),
true
)
)
),
@@ -64,7 +65,8 @@ class ParticipantMapperTest {
0,
ContactIdTestData.contactId2,
"test2@protonmail.com",
emptyList()
emptyList(),
false
),
ContactEmail(
UserIdTestData.userId,
@@ -75,7 +77,8 @@ class ParticipantMapperTest {
0,
ContactIdTestData.contactId1,
"test3@protonmail.com",
emptyList()
emptyList(),
false
)
)
)
@@ -87,7 +90,7 @@ class ParticipantMapperTest {
val expectedResult = Participant(
address = "test1@protonmail.com",
name = "First name from contact email",
isProton = false
isProton = true
)
// When