Available on (crate features
testing) and non-target_family=wasm only.Expand description
Helpers to mock a server and have a client automatically connected to that server, for the purpose of integration tests.
Modules§
- encryption
e2e-encryption - Helpers to mock a server that supports the main crypto API and have a client automatically connected to that server, for the purpose of integration tests.
- oauth
- Helpers to mock an OAuth 2.0 server for the purpose of integration tests.
Structs§
- AddRoom
Keys Version Endpoint - A prebuilt mock for
POST room_keys/version: adding room key backups. - Authed
Media Download Endpoint - A prebuilt mock for
GET /client/v1/media/downloadrequests. - Authed
Media Thumbnail Endpoint - A prebuilt mock for
GET /client/v1/media/thumbnailrequests. - Authenticated
Media Config Endpoint - A prebuilt mock for
GET /_matrix/client/v1/media/configrequest. - BanUser
Endpoint - A prebuilt mock for
POST /banrequest. - Create
Room Alias Endpoint - A prebuilt mock for creating a room alias.
- Create
Room Endpoint - A prebuilt mock for
POST /createRoomrequests. - Delete
Profile Field Endpoint - A prebuilt mock for
DELETE /_matrix/client/*/profile/{user_id}/{key_name}. - Delete
Push Rules Endpoint - A prebuilt mock for
DELETE /_matrix/client/v3/pushrules/global/{kind}/{ruleId}. - Delete
Room Keys Version Endpoint - A prebuilt mock for
DELETE room_keys/version/xxx: deleting room key backups. - Devices
Endpoint - A prebuilt mock for
GET /devicesrequests. - Enable
Push Rule Endpoint - A prebuilt mock for
PUT /_matrix/client/v3/pushrules/global/{kind}/{ruleId}/enabled. - Encryption
State Endpoint - A prebuilt mock for reading the encryption state of a room.
- Federation
Version Endpoint - A prebuilt mock for the federation version endpoint.
- GetDefault
Secret Storage KeyEndpoint e2e-encryption - A prebuilt mock for a
GET /_matrix/client/v3/user/{userId}/account_data/m.secret_storage.default_keyrequest, which fetches the ID of the default secret storage key. - GetDevice
Endpoint - A prebuilt mock for
GET /devices/{deviceId}requests. - GetHierarchy
Endpoint - A prebuilt mock for
GET /client/*/rooms/{roomId}/hierarchy - GetMaster
Signing KeyEndpoint e2e-encryption - A prebuilt mock for a
GET /_matrix/client/v3/user/{userId}/account_data/m.cross_signing.masterrequest, which fetches information about the master signing key. - GetProfile
Endpoint - A prebuilt mock for
GET /_matrix/client/*/profile/{user_id}. - GetProfile
Field Endpoint - A prebuilt mock for
GET /_matrix/client/*/profile/{user_id}/{key_name}. - GetRecent
Emojis Endpoint experimental-element-recent-emojis - A prebuilt mock for a
GET /_matrix/client/v3/user/{userId}/account_data/io.element.recent_emojirequest, which fetches the recently used emojis in the account data. - GetRoom
Members Endpoint - A prebuilt mock for
GET /membersrequest. - GetRoom
Visibility Endpoint - A prebuilt mock for getting the room’s visibility in the room directory.
- GetSecret
Storage KeyEndpoint e2e-encryption - A prebuilt mock for a
GET /_matrix/client/v3/user/{userId}/account_data/m.secret_storage.key.{keyId}request, which fetches information about a secret storage key. - GetThread
Subscriptions Endpoint - A prebuilt mock for
GET ^/_matrix/client/v3/thread_subscriptions. - Invite
User ById Endpoint - A prebuilt mock for
POST /inviterequest. - Join
Room Endpoint - A prebuilt mock for
GET /client/v3/rooms/{room_id}/joinrequests. - Kick
User Endpoint - A prebuilt mock for
POST /kickrequest. - Login
Endpoint - A prebuilt mock for
POST /loginrequests. - Login
Response Template200 - A response to a
LoginEndpointquery with status code 200. - Logout
Endpoint - A prebuilt mock for
POST /logoutrequest. - Matrix
Mock - A wrapper for a
Mockas well as aMockServer, allowing us to callMock::mountorMock::mount_as_scopedwithout having to pass theMockServerreference (i.e. callmount()instead ofmount(&server)). - Matrix
Mock Server - A
wiremockMockServeralong with useful methods to help mocking Matrix client-server API endpoints easily. - Media
Allocate Endpoint - A prebuilt mock for
POST /media/v1/createrequests. - Media
Allocated Upload Endpoint - A prebuilt mock for
PUT /media/v3/upload/{server_name}/{media_id}requests. - Media
Config Endpoint - A prebuilt mock for
GET /_matrix/media/v3/configrequest. - Media
Download Endpoint - A prebuilt mock for
GET /media/v3/downloadrequests. - Media
Thumbnail Endpoint - A prebuilt mock for
GET /media/v3/thumbnailrequests. - Mock
Endpoint - Generic mocked endpoint, with useful common helpers.
- Public
Rooms Endpoint - A prebuilt mock for paginating the public room list.
- Query
Keys Endpoint - A prebuilt mock for
POST /keys/queryrequest. - Read
Markers Endpoint - A prebuilt mock for
POST /rooms/{roomId}/read_markersrequest. - Receipt
Endpoint - A prebuilt mock for
POST /rooms/{roomId}/receipt/{receiptType}/{eventId}request. - Remove
Room Alias Endpoint - A prebuilt mock for removing a room alias.
- Resolve
Room Alias Endpoint - A prebuilt mock for resolving a room alias.
- Room
Account Data Endpoint - A prebuilt mock for
PUT /user/{userId}/rooms/{roomId}/account_data/{type}request. - Room
Context Response Template - A builder pattern for the response to a
RoomEventContextEndpointrequest. - Room
Delete Thread Subscription Endpoint - A prebuilt mock for
DELETE /client/*/rooms/{room_id}/threads/{thread_root}/subscription - Room
Event Context Endpoint - A prebuilt mock for getting a single event with its context in a room.
- Room
Event Endpoint - A prebuilt mock for getting a single event in a room.
- Room
Forget Endpoint - A prebuilt mock for the room forget endpoint.
- Room
GetThread Subscription Endpoint - A prebuilt mock for
GET /client/*/rooms/{room_id}/threads/{thread_root}/subscription - Room
Keys Version Endpoint - A prebuilt mock for
GET room_keys/version: storage (“backup”) of room keys. - Room
Leave Endpoint - A prebuilt mock for the room leave endpoint.
- Room
Messages Endpoint - A prebuilt mock for the
/messagesendpoint. - Room
Messages Response Template - A response to a
RoomMessagesEndpointquery. - Room
PutThread Subscription Endpoint - A prebuilt mock for
PUT /client/*/rooms/{room_id}/threads/{thread_root}/subscription - Room
Redact Endpoint - A prebuilt mock for redacting an event in a room.
- Room
Relations Endpoint - A prebuilt mock for a
GET /rooms/{roomId}/relations/{eventId}family of requests. - Room
Relations Response Template - A response to a
RoomRelationsEndpointquery. - Room
Send Endpoint - A prebuilt mock for sending a message like event in a room.
- Room
Send State Endpoint - A prebuilt mock for sending a state event in a room.
- Room
Summary Endpoint - A prebuilt mock for the room summary endpoint.
- Room
Threads Endpoint - A prebuilt mock for a
GET /rooms/{roomId}/threadsrequest. - Send
ToDevice Endpoint - A prebuilt mock for the
/sendToDeviceendpoint. - SetEncryption
State Endpoint - A prebuilt mock for setting the encryption state of a room.
- SetProfile
Field Endpoint - A prebuilt mock for
PUT /_matrix/client/*/profile/{user_id}/{key_name}. - SetPush
Rules Actions Endpoint - A prebuilt mock for
PUT /_matrix/client/v3/pushrules/global/{kind}/{ruleId}/actions. - SetPush
Rules Endpoint - A prebuilt mock for
PUT /_matrix/client/v3/pushrules/global/{kind}/{ruleId}. - SetRoom
Pinned Events Endpoint - A prebuilt mock to set a room’s pinned events.
- SetRoom
Visibility Endpoint - A prebuilt mock for setting the room’s visibility in the room directory.
- SetSpace
Child Endpoint - A prebuilt mock for
PUT /_matrix/client/v3/rooms/{roomId}/state/m.space.child/{stateKey} - SetSpace
Parent Endpoint - A prebuilt mock for
PUT /_matrix/client/v3/rooms/{roomId}/state/m.space.parent/{stateKey} - Sliding
Sync Endpoint - A prebuilt mock for running simplified sliding sync.
- Sync
Endpoint - A prebuilt mock for running sync v2.
- Update
Recent Emojis Endpoint experimental-element-recent-emojis - A prebuilt mock for a
PUT /_matrix/client/v3/user/{userId}/account_data/io.element.recent_emojirequest, which updates the recently used emojis in the account data. - Upgrade
Room Endpoint - A prebuilt mock for
POST /rooms/{roomId}/upgraderequests. - Upload
Cross Signing Keys Endpoint - A prebuilt mock for
POST /keys/device_signing/uploadrequest. - Upload
Cross Signing Signatures Endpoint - A prebuilt mock for
POST /keys/signatures/uploadrequest. - Upload
Endpoint - A prebuilt mock for uploading media.
- Upload
Keys Endpoint - A prebuilt mock for
POST /keys/uploadrequest. - User
Directory Endpoint - A prebuilt mock for
POST /user_directory/searchrequests. - Versions
Endpoint - A prebuilt mock for
GET /versionsrequest. - Well
Known Endpoint - A prebuilt mock for
GET /.well-known/matrix/clientrequest. - WhoAmI
Endpoint - A prebuilt mock for
GET /account/whoamirequest.
Enums§
- AnyRoom
Builder - Parameter to
MatrixMockServer::sync_room. - Push
Rule IdSpec - A specification for a push rule ID.