mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Fix TimelinePresenterTests
This commit is contained in:
+6
@@ -102,6 +102,8 @@ class TimelinePresenterTest {
|
|||||||
}.test {
|
}.test {
|
||||||
assertThat(timeline.sendReadReceiptCount).isEqualTo(0)
|
assertThat(timeline.sendReadReceiptCount).isEqualTo(0)
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
|
// Wait for timeline items to be populated
|
||||||
|
skipItems(1)
|
||||||
awaitWithLatch { latch ->
|
awaitWithLatch { latch ->
|
||||||
timeline.sendReadReceiptLatch = latch
|
timeline.sendReadReceiptLatch = latch
|
||||||
initialState.eventSink.invoke(TimelineEvents.OnScrollFinished(0))
|
initialState.eventSink.invoke(TimelineEvents.OnScrollFinished(0))
|
||||||
@@ -124,6 +126,8 @@ class TimelinePresenterTest {
|
|||||||
}.test {
|
}.test {
|
||||||
assertThat(timeline.sendReadReceiptCount).isEqualTo(0)
|
assertThat(timeline.sendReadReceiptCount).isEqualTo(0)
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
|
// Wait for timeline items to be populated
|
||||||
|
skipItems(1)
|
||||||
awaitWithLatch { latch ->
|
awaitWithLatch { latch ->
|
||||||
timeline.sendReadReceiptLatch = latch
|
timeline.sendReadReceiptLatch = latch
|
||||||
initialState.eventSink.invoke(TimelineEvents.OnScrollFinished(1))
|
initialState.eventSink.invoke(TimelineEvents.OnScrollFinished(1))
|
||||||
@@ -146,6 +150,8 @@ class TimelinePresenterTest {
|
|||||||
}.test {
|
}.test {
|
||||||
assertThat(timeline.sendReadReceiptCount).isEqualTo(0)
|
assertThat(timeline.sendReadReceiptCount).isEqualTo(0)
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
|
// Wait for timeline items to be populated
|
||||||
|
skipItems(1)
|
||||||
awaitWithLatch { latch ->
|
awaitWithLatch { latch ->
|
||||||
timeline.sendReadReceiptLatch = latch
|
timeline.sendReadReceiptLatch = latch
|
||||||
initialState.eventSink.invoke(TimelineEvents.OnScrollFinished(0))
|
initialState.eventSink.invoke(TimelineEvents.OnScrollFinished(0))
|
||||||
|
|||||||
Reference in New Issue
Block a user