diff --git a/crates/matrix-sdk-ui/tests/integration/room_list.rs b/crates/matrix-sdk-ui/tests/integration/room_list.rs index 57099d905..b610e1871 100644 --- a/crates/matrix-sdk-ui/tests/integration/room_list.rs +++ b/crates/matrix-sdk-ui/tests/integration/room_list.rs @@ -83,7 +83,9 @@ macro_rules! sync_then_assert_request_and_fake_response { $( use State::*; - assert_matches!($room_list.state().get(), $pre_state, "pre state"); + let mut state = $room_list.state(); + + assert_matches!(state.get(), $pre_state, "pre state"); )? let next = $room_list_sync_stream.next().await; @@ -107,7 +109,7 @@ macro_rules! sync_then_assert_request_and_fake_response { } } - $( assert_matches!($room_list.state().get(), $post_state, "post state"); )? + $( assert_matches!(state.next().now_or_never(), Some(Some($post_state)), "post state"); )? next }