Wire up new fields on the ViewRoom posthog event and more interactions (#7787)

This commit is contained in:
Michael Telatynski 2022-02-14 19:31:13 +00:00 committed by GitHub
parent 9141225a79
commit cfa6e266cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 54 additions and 11 deletions

View file

@ -1,3 +1,4 @@
import '../skinned-sdk'; // Must be first for skinning to work
import RoomViewStore from '../../src/stores/RoomViewStore';
import { Action } from '../../src/dispatcher/actions';
import { MatrixClientPeg as peg } from '../../src/MatrixClientPeg';
@ -5,6 +6,18 @@ import * as testUtils from '../test-utils';
const dispatch = testUtils.getDispatchForStore(RoomViewStore);
jest.mock('../../src/utils/DMRoomMap', () => {
const mock = {
getUserIdForRoomId: jest.fn(),
getDMRoomsForUserId: jest.fn(),
};
return {
shared: jest.fn().mockReturnValue(mock),
sharedInstance: mock,
};
});
describe('RoomViewStore', function() {
beforeEach(function() {
testUtils.stubClient();