Commit Graph

238 Commits

Author SHA1 Message Date
Damir Jelić
b909f4400d Add support for backups 2023-11-24 17:56:09 +01:00
Benjamin Bouvier
35bac2a6c3 test: add an integration test for left rooms 2023-11-23 15:17:26 +01:00
Benjamin Bouvier
692be61043 test: add an integration test for avatar in group conversations 2023-11-21 14:50:04 +01:00
Val Lorentz
445bf3b02a Add missing "room_id" to test_json::MEMBERS
It doesn't matter at the moment as the only test using `test_json::MEMBERS`
does not rely on the event being valid, but it shows this error
nonetheless:

```
2023-11-10T08:54:29.920782Z DEBUG receive_members{room_id="!hIMjEx205EXNyjVPCV:localhost"}: matrix_sdk_base::client: Failed to deserialize member event: missing field `room_id` at line 1 column 297 event_id="$151800140517rfvjc:localhost"
```

and https://spec.matrix.org/v1.8/client-server-api/#get_matrixclientv3roomsroomidmembers
says it is a required key.
2023-11-10 09:35:47 +00:00
Jonas Platte
7d52322687 crypto: Update raw encryption methods to take &Raw content 2023-11-02 16:56:50 +01:00
Jonas Platte
7be84ca71a test: Deduplicate tracing_subscriber initialization
… and set a sensible default log level.
2023-11-02 12:58:03 +01:00
Jonas Platte
9956b56a2c test: Remove unused helpers feature from integration testing crate 2023-11-02 12:58:03 +01:00
Benjamin Bouvier
8de33f68f3 integration tests: randomize user names better
In the previous situation, running the tests with `cargo test` would sometimes fail because despite appending the number of milliseconds since
the start of epoch to the user names, some user names would clash across different tests, leading to unexpected results. This fixes it by using
an actual RNG in there, so the names don't ever clash.
2023-11-01 07:57:46 +01:00
Jonas Platte
463a02a4ef sdk: Make transaction_id truly optional for send and send_raw
… by removing the parameter and returning a named future with a
builder-style `with_transaction_id` method.
2023-10-31 11:13:25 +01:00
Benjamin Bouvier
1d90dd554c Test some verification getters in the heavyweight verification integration test 2023-10-27 13:03:20 +02:00
Jonas Platte
05a1021724 Use assert_let! instead of assert_matches! with bindings 2023-10-26 17:29:29 +02:00
Benjamin Bouvier
870faa48d1 tests: add mutual verification test 2023-10-26 15:12:34 +02:00
Jonas Platte
6f992d1ad8 ui: Add a test for updating member profiles 2023-10-23 19:34:23 +02:00
Jonas Platte
1ce67cc9e6 test: Use DEFAULT_TEST_ROOM_ID in more places 2023-10-23 19:34:23 +02:00
Jonas Platte
254efed150 test: Rename DEFAULT_SYNC_ROOM_ID to DEFAULT_TEST_ROOM_ID
… and move to matrix-sdk-test's crate root.
2023-10-23 19:34:23 +02:00
Benjamin Bouvier
b9b4e4e1e0 test: bump the sliding-sync image versions 2023-10-23 13:55:42 +02:00
Benjamin Bouvier
55257f2b8d test: remove uninteresting smoke test for sliding sync in integration suite 2023-10-23 13:55:42 +02:00
Benjamin Bouvier
6368c699c2 test: Merge the two integration test suites into a single one 2023-10-23 13:55:42 +02:00
Jonas Platte
b9c05ca934 test: Move room messages test JSON to the only module that uses it 2023-10-04 13:23:47 +02:00
Jonas Platte
75d64e697e test: Remove unused constants from test_json::messages 2023-10-04 13:23:47 +02:00
Jonas Platte
b35d40d111 test: Remove unused sync events from test_json 2023-09-27 10:06:32 +02:00
Jonas Platte
3196ac53b2 test: Remove TimelineTestEvent 2023-09-27 10:06:32 +02:00
Jonas Platte
145c5078f2 test: Remove example from SyncResponseBuilder docs
It is only an internal utility, we can copy-paste from other tests.
2023-09-27 10:06:32 +02:00
Jonas Platte
62ecff3e1d test: Remove outdated documentation 2023-09-27 10:06:32 +02:00
Benjamin Bouvier
1180c6aef9 feat: add integration test for fetch_members causing UTDs 🧪 2023-09-26 12:33:41 +02:00
Jonas Platte
6e15e34700 Use bool::then where applicable 2023-09-26 10:14:04 +02:00
Jonas Platte
f2c569440e ui: Remove transaction ID parameter on Timeline methods
There is no reason for it to be configurable in the high-level API,
since the timeline manages local echoes automatically.
2023-09-25 16:50:59 +02:00
Jonas Platte
fd822fc683 testing: Move last event creation code from TestTimeline to EventBuilder 2023-09-21 16:00:11 +02:00
Jonas Platte
5cf3c1e731 testing: Use EventBuilder in timeline teply integration tests 2023-09-21 16:00:11 +02:00
Jonas Platte
37912a1909 testing: Update EventBuilder method names for clarity 2023-09-21 16:00:11 +02:00
Jonas Platte
c89b38b19f testing: Update EventBuilder::make_message_event_with_id argument order 2023-09-21 16:00:11 +02:00
Jonas Platte
2376f16214 testing: Change make_message_event_with_id to take event_id by reference 2023-09-21 16:00:11 +02:00
Jonas Platte
5d5f5e18de testing: Move ALICE, BOB, CAROL statics to test crate 2023-09-21 16:00:11 +02:00
Jonas Platte
a5a9940ad9 testing: Extract EventBuilder out of TestTimeline 2023-09-21 16:00:11 +02:00
Jonas Platte
fe2e60c60d testing: Replace TimelineTestEvent::Custom with sync_timeline_event! 2023-09-21 16:00:11 +02:00
Jonas Platte
054d26774c testing: Generalize add_timeline_event for sync response room builders 2023-09-21 16:00:11 +02:00
Jonas Platte
c8a4bc799b testing: Add sync_timeline_event macro for more type safety in tests 2023-09-21 16:00:11 +02:00
Jonas Platte
82f793ec0f testing: Rename event_builder module to sync_builder
It used to contain a type named EventBuilder, but that has been renamed
to SyncResponseBuilder a while ago.
2023-09-21 16:00:11 +02:00
Jonas Platte
1a15802201 Upgrade Ruma 2023-09-20 14:19:06 +02:00
Jonas Platte
45b7e075c9 Remove unused dependencies 2023-09-18 19:56:06 +02:00
Benjamin Bouvier
0ecdc2f43c fix(e2ee): query keys for untracked users even if we didn't explicitly sync members ourselves 2023-09-18 17:24:21 +02:00
Jonas Platte
fd17bce300 ui: Fix day divider logic
… for when a remote event is re-received while a local echo is pending.
Also simplify test_togglling_reaction integration test so it still passes.
2023-09-14 14:14:44 +02:00
Jonas Platte
2d47aecd37 Remove the appservice feature from matrix-sdk, matrix-sdk-test 2023-09-05 15:40:38 +02:00
Benjamin Bouvier
508091af80 feat: use the encryption sync permit from the SyncService in the NotificationClient
Also rejigger the parameters passed to the notification client builder, so that it's always required to pass
a process setup. With that, we're one step closer to removing the retry_decryption() function and enable it
by default.
2023-09-05 11:17:14 +02:00
Jonas Platte
e02676616f sdk: Make use of clonable FnOnce in event handlers 2023-09-01 10:42:22 +02:00
Nicolas Mauri
1cc11ae988 feat(ffi): Add a notification_mode property to room_info (#2460)
* feat(ffi): Add a notification_mode property to room_info
* feat(sdk): Add a notification_mode() function to Room
* Fix Rust syntax
2023-08-29 12:25:26 +00:00
Benjamin Bouvier
936b6980c9 chore: move SyncTokenAwareClient to the common test helpers 2023-08-21 19:36:33 +02:00
Benjamin Bouvier
e262db3505 test: write an integration test for missing keys during encryption 2023-08-21 19:36:33 +02:00
Benjamin Bouvier
5c74a597eb nit: prefer using assert_matches! in tests 2023-08-04 17:41:47 +02:00
Benjamin Bouvier
dd3cab9409 fix: don't try /context when a notification has been filtered out 2023-08-04 17:41:47 +02:00