Unit test MessageActionBar (#8732)
* test most basic paths in messageactionbar Signed-off-by: Kerry Archibald <kerrya@element.io> * tidy Signed-off-by: Kerry Archibald <kerrya@element.io> * add rtl * add code style note about using rtl Signed-off-by: Kerry Archibald <kerrya@element.io> * downgrade to rtl 12 * use rtl for MessageActionBar test Signed-off-by: Kerry Archibald <kerrya@element.io> * try mocking settingsstore for ci only failure Signed-off-by: Kerry Archibald <kerrya@element.io> * mock setValue too Signed-off-by: Kerry Archibald <kerrya@element.io> * uupdate lockfile Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
7c57680b93
commit
158e42f764
8 changed files with 436 additions and 2 deletions
|
@ -67,4 +67,17 @@ export const mockClientMethodsUser = (userId = '@alice:domain') => ({
|
|||
getUserId: jest.fn().mockReturnValue(userId),
|
||||
isGuest: jest.fn().mockReturnValue(false),
|
||||
mxcUrlToHttp: jest.fn().mockReturnValue('mock-mxcUrlToHttp'),
|
||||
credentials: { userId },
|
||||
});
|
||||
|
||||
/**
|
||||
* Returns basic mocked client methods related to rendering events
|
||||
* ```
|
||||
* const mockClient = getMockClientWithEventEmitter({
|
||||
...mockClientMethodsUser('@mytestuser:domain'),
|
||||
});
|
||||
* ```
|
||||
*/
|
||||
export const mockClientMethodsEvents = () => ({
|
||||
decryptEventIfNeeded: jest.fn(),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue