riot-web/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.t...

192 lines
5.3 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<RoomLiveShareWarning /> when user has live beacons renders correctly with one live beacon in room 1`] = `
<RoomLiveShareWarning
roomId="$room1:server.org"
>
<div
className="mx_RoomLiveShareWarning"
>
<StyledLiveBeaconIcon
className="mx_RoomLiveShareWarning_icon"
>
<div
className="mx_StyledLiveBeaconIcon mx_RoomLiveShareWarning_icon"
/>
</StyledLiveBeaconIcon>
<span
className="mx_RoomLiveShareWarning_label"
>
You are sharing your live location
</span>
<LiveTimeRemaining
beacon={
Beacon {
"_beaconInfo": Object {
"assetType": "m.self",
"description": undefined,
"live": true,
"timeout": 3600000,
"timestamp": 1647270879403,
},
"_events": Object {
"Beacon.LivenessChange": Array [
[Function],
[Function],
],
"Beacon.new": [Function],
"Beacon.update": [Function],
},
"_eventsCount": 3,
"_isLive": true,
"_maxListeners": undefined,
"livenessWatchInterval": 1000000000002,
"roomId": "$room1:server.org",
"rootEvent": Object {
"content": Object {
"org.matrix.msc3488.asset": Object {
"type": "m.self",
},
"org.matrix.msc3488.ts": 1647270879403,
"org.matrix.msc3489.beacon_info": Object {
"description": undefined,
"live": true,
"timeout": 3600000,
},
},
"event_id": "$0",
"room_id": "$room1:server.org",
"state_key": "@alice:server.org",
"type": "org.matrix.msc3489.beacon_info.@alice:server.org.2",
},
Symbol(kCapture): false,
}
}
>
<span
className="mx_RoomLiveShareWarning_expiry"
data-test-id="room-live-share-expiry"
>
1h left
</span>
</LiveTimeRemaining>
<AccessibleButton
data-test-id="room-live-share-stop-sharing"
disabled={false}
element="button"
kind="danger"
onClick={[Function]}
role="button"
tabIndex={0}
>
<button
className="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_danger"
data-test-id="room-live-share-stop-sharing"
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
role="button"
tabIndex={0}
>
Stop sharing
</button>
</AccessibleButton>
</div>
</RoomLiveShareWarning>
`;
exports[`<RoomLiveShareWarning /> when user has live beacons renders correctly with two live beacons in room 1`] = `
<RoomLiveShareWarning
roomId="$room2:server.org"
>
<div
className="mx_RoomLiveShareWarning"
>
<StyledLiveBeaconIcon
className="mx_RoomLiveShareWarning_icon"
>
<div
className="mx_StyledLiveBeaconIcon mx_RoomLiveShareWarning_icon"
/>
</StyledLiveBeaconIcon>
<span
className="mx_RoomLiveShareWarning_label"
>
You are sharing your live location
</span>
<LiveTimeRemaining
beacon={
Beacon {
"_beaconInfo": Object {
"assetType": "m.self",
"description": undefined,
"live": true,
"timeout": 43200000,
"timestamp": 1647270879403,
},
"_events": Object {
"Beacon.LivenessChange": Array [
[Function],
[Function],
],
"Beacon.new": [Function],
"Beacon.update": [Function],
},
"_eventsCount": 3,
"_isLive": true,
"_maxListeners": undefined,
"livenessWatchInterval": 1000000000010,
"roomId": "$room2:server.org",
"rootEvent": Object {
"content": Object {
"org.matrix.msc3488.asset": Object {
"type": "m.self",
},
"org.matrix.msc3488.ts": 1647270879403,
"org.matrix.msc3489.beacon_info": Object {
"description": undefined,
"live": true,
"timeout": 43200000,
},
},
"event_id": "$2",
"room_id": "$room2:server.org",
"state_key": "@alice:server.org",
"type": "org.matrix.msc3489.beacon_info.@alice:server.org.4",
},
Symbol(kCapture): false,
}
}
>
<span
className="mx_RoomLiveShareWarning_expiry"
data-test-id="room-live-share-expiry"
>
12h left
</span>
</LiveTimeRemaining>
<AccessibleButton
data-test-id="room-live-share-stop-sharing"
disabled={false}
element="button"
kind="danger"
onClick={[Function]}
role="button"
tabIndex={0}
>
<button
className="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_danger"
data-test-id="room-live-share-stop-sharing"
onClick={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
role="button"
tabIndex={0}
>
Stop sharing
</button>
</AccessibleButton>
</div>
</RoomLiveShareWarning>
`;