Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50 (#3565)

* Adapt to changes in the SDK

* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50

* Use lambda instead of overriding the `EventDebugInfoProvider` interface

* Fix test proposal.
We may find a better way to compare data class instance if we need to do more comparison in the future...

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
This commit is contained in:
renovate[bot]
2024-10-01 09:44:52 +02:00
committed by GitHub
parent 6b257dcef0
commit bb11bc5494
26 changed files with 216 additions and 175 deletions

View File

@@ -68,7 +68,19 @@ class RoomSelectPresenterTest {
presenter.present()
}.test {
val initialState = awaitItem()
assertThat(awaitItem().resultState as? SearchBarResultState.Results).isEqualTo(SearchBarResultState.Results(listOf(aRoomSummary())))
val expectedRoomSummary = aRoomSummary()
// Do not compare the lambda because they will be different. So copy the lambda from expectedRoomSummary to result
val result = (awaitItem().resultState as SearchBarResultState.Results).results.map { roomSummary ->
roomSummary.copy(
lastMessage = roomSummary.lastMessage!!.copy(
event = roomSummary.lastMessage!!.event.copy(
debugInfoProvider = expectedRoomSummary.lastMessage!!.event.debugInfoProvider,
messageShieldProvider = expectedRoomSummary.lastMessage!!.event.messageShieldProvider,
)
),
)
}
assertThat(result).isEqualTo(listOf(expectedRoomSummary))
initialState.eventSink(RoomSelectEvents.ToggleSearchActive)
skipItems(1)
initialState.eventSink(RoomSelectEvents.UpdateQuery("string not contained"))