mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
0aa283729c
Codecov reported 55.55% patch coverage on the previous commit: four of the nine measured lines were only partially covered. No test paginates forwards in a thread timeline, and the focus states Requested, Loading and Failure were never live when a forward pagination arrived, so only the Success branch of isPending() was ever evaluated both ways. Add a test per uncovered state: a forward pagination is deferred while the focus request is still being debounced and while the focused timeline is being created, it is performed again once the request has failed, and it is dropped in a thread timeline while a backward one still goes through. The pagination recorder now also sits on the live timeline, and the presenter is built on that same timeline. Before the detached timeline exists, a pagination that escaped the gate would go to the live one, so without this the new guards would pass against the unfixed presenter. The deferred cases end on the emitted state rather than on cancelAndIgnoreRemainingEvents for the same reason: the recorder throws from inside the presenter coroutine and cancelling swallows it. Verified by reverting the gate: the three deferred-pagination tests then fail with "This lambda should never be called."