Fix TimelinePresenterTests
This commit is contained in:
parent
aeaec5cb73
commit
baf06d8615
1 changed files with 6 additions and 0 deletions
|
|
@ -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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue