[fenix] Fix history metadata API breakage in unit tests

pull/600/head
Christian Sadilek 3 years ago
parent 2ab11137aa
commit 9a78d339b5

@ -52,7 +52,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val expectedHistoryGroup = HistoryMetadataGroup( val expectedHistoryGroup = HistoryMetadataGroup(
title = "mozilla", title = "mozilla",
@ -81,7 +82,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = 1, updatedAt = 1,
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val historyEntry2 = HistoryMetadata( val historyEntry2 = HistoryMetadata(
@ -90,7 +92,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = 2, updatedAt = 2,
totalViewTime = 20, totalViewTime = 20,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = "http://firefox.com/image1"
) )
val historyEntry3 = HistoryMetadata( val historyEntry3 = HistoryMetadata(
@ -99,7 +102,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = 3, updatedAt = 3,
totalViewTime = 30, totalViewTime = 30,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val expectedHistoryGroup = HistoryMetadataGroup( val expectedHistoryGroup = HistoryMetadataGroup(
@ -136,7 +140,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val historyEntry2 = HistoryMetadata( val historyEntry2 = HistoryMetadata(
@ -145,7 +150,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 20, totalViewTime = 20,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val historyEntry3 = HistoryMetadata( val historyEntry3 = HistoryMetadata(
@ -154,7 +160,8 @@ class HistoryMetadataFeatureTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 30, totalViewTime = 30,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val expectedHistoryGroup1 = HistoryMetadataGroup( val expectedHistoryGroup1 = HistoryMetadataGroup(

@ -75,7 +75,8 @@ class HistoryMetadataControllerTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
controller.handleHistoryMetadataItemClicked(historyEntry.key.url, historyEntry.key) controller.handleHistoryMetadataItemClicked(historyEntry.key.url, historyEntry.key)
@ -106,7 +107,8 @@ class HistoryMetadataControllerTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val historyGroup = HistoryMetadataGroup( val historyGroup = HistoryMetadataGroup(
title = "mozilla", title = "mozilla",

@ -32,7 +32,8 @@ class HistoryMetadataGroupViewHolderTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
private val historyGroup = HistoryMetadataGroup( private val historyGroup = HistoryMetadataGroup(
title = "mozilla", title = "mozilla",

@ -35,7 +35,8 @@ class HistoryMetadataViewHolderTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
@Before @Before
@ -74,7 +75,8 @@ class HistoryMetadataViewHolderTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
HistoryMetadataViewHolder(binding.root, interactor, icons).bind(historyEntryWithoutTitle) HistoryMetadataViewHolder(binding.root, interactor, icons).bind(historyEntryWithoutTitle)

@ -131,7 +131,8 @@ class HomeFragmentStoreTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val historyGroup = HistoryMetadataGroup( val historyGroup = HistoryMetadataGroup(
title = "mozilla", title = "mozilla",

@ -167,7 +167,8 @@ class SessionControlInteractorTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
interactor.onHistoryMetadataItemClicked(historyEntry.key.url, historyEntry.key) interactor.onHistoryMetadataItemClicked(historyEntry.key.url, historyEntry.key)
@ -193,7 +194,8 @@ class SessionControlInteractorTest {
createdAt = System.currentTimeMillis(), createdAt = System.currentTimeMillis(),
updatedAt = System.currentTimeMillis(), updatedAt = System.currentTimeMillis(),
totalViewTime = 10, totalViewTime = 10,
documentType = DocumentType.Regular documentType = DocumentType.Regular,
previewImageUrl = null
) )
val historyGroup = HistoryMetadataGroup( val historyGroup = HistoryMetadataGroup(
title = "mozilla", title = "mozilla",

Loading…
Cancel
Save