add tests for geolocate self on map views

This commit is contained in:
Kerry Archibald 2023-02-07 16:51:58 +13:00
parent 0d59532147
commit 06d8755f6b
5 changed files with 122 additions and 4 deletions

View file

@ -49,9 +49,10 @@ describe("<LocationViewDialog />", () => {
it("renders marker correctly for self share", () => {
const selfShareEvent = makeLocationEvent("geo:51.5076,-0.1276", LocationAssetType.Self);
const member = new RoomMember(roomId, userId);
// @ts-ignore cheat assignment to property
// @ts-ignore cheat assignment to property
selfShareEvent.sender = member;
const component = getComponent({ mxEvent: selfShareEvent });
// @ts-ignore fix when moving to rtl
expect(component.find("SmartMarker").props()["roomMember"]).toEqual(member);
});
});