Skip to content

Commit 8070c1e

Browse files
committed
test(timeline): Workarounds to get the timeline tests passing
This is necessary because both the timeline and the event cache attempt to redecrypt events currently. This will change once only the event cache handles this task.
1 parent a5e6728 commit 8070c1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

crates/matrix-sdk-ui/src/timeline/tests/encryption.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,17 @@ async fn test_retry_edit_decryption() {
424424
assert!(msg.is_edited());
425425
assert_eq!(msg.body(), "This is Error");
426426

427+
let item =
428+
assert_next_matches_with_timeout!(stream, VectorDiff::Set { index: 0, value } => value);
429+
430+
// TODO: We receive this update twice, since the event cache decrypts things as
431+
// well as the timeline.
432+
assert_matches!(item.encryption_info(), Some(_));
433+
assert_matches!(item.latest_edit_json(), Some(_));
434+
assert_let!(Some(msg) = item.content().as_message());
435+
assert!(msg.is_edited());
436+
assert_eq!(msg.body(), "This is Error");
437+
427438
// (There are no more items)
428439
assert_pending!(stream);
429440
}

0 commit comments

Comments
 (0)