2021-11-23 10:27:44 +00:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2021-12-08 14:56:48 +00:00
|
|
|
exports[`MPollBody renders a finished poll 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-12-08 14:56:48 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-12-08 14:56:48 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-12-08 14:56:48 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-12-08 14:56:48 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="pizza"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="poutine"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked mx_MPollBody_option_ended"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner"
|
|
|
|
data-value="italian"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "67%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="1 vote"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="wings"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
1 vote
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "33%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Final result based on 3 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-12-08 14:56:48 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a finished poll with multiple winners 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-12-08 14:56:48 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-12-08 14:56:48 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-12-08 14:56:48 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-12-08 14:56:48 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked mx_MPollBody_option_ended"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner"
|
|
|
|
data-value="pizza"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "50%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="poutine"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="italian"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked mx_MPollBody_option_ended"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner"
|
|
|
|
data-value="wings"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "50%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Final result based on 4 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-12-08 14:56:48 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a finished poll with no votes 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-12-08 14:56:48 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-12-08 14:56:48 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-12-08 14:56:48 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-08 14:56:48 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-12-08 14:56:48 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="pizza"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="poutine"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="italian"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</EndedPollOption>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityBackground"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_ended"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<EndedPollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_endedOption"
|
|
|
|
data-value="wings"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-08 14:56:48 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
</EndedPollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-08 14:56:48 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
2021-12-08 14:56:48 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Final result based on 0 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-12-08 14:56:48 +00:00
|
|
|
`;
|
|
|
|
|
2021-12-03 10:26:28 +00:00
|
|
|
exports[`MPollBody renders a poll that I have not voted in 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-12-03 10:26:28 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-12-03 10:26:28 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-12-03 10:26:28 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-12-03 10:26:28 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-03 10:26:28 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-03 10:26:28 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-12-03 10:26:28 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-12-03 10:26:28 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-12-03 10:26:28 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-12-03 10:26:28 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-12-03 10:26:28 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Pizza
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-03 10:26:28 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-03 10:26:28 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-12-03 10:26:28 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Poutine
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-03 10:26:28 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-03 10:26:28 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-12-03 10:26:28 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Italian
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-03 10:26:28 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-03 10:26:28 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-12-03 10:26:28 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-12-03 10:26:28 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Wings
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-12-03 10:26:28 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-12-03 10:26:28 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-12-03 10:26:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
3 votes cast. Vote to see the results
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-12-03 10:26:28 +00:00
|
|
|
`;
|
|
|
|
|
2021-11-23 10:27:44 +00:00
|
|
|
exports[`MPollBody renders a poll with local, non-local and invalid votes 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-11-23 10:27:44 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-11-23 10:27:44 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-11-23 10:27:44 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-11-23 10:27:44 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="1 vote"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
1 vote
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "20%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
0 votes
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="3 votes"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={true}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled mx_StyledRadioButton_checked"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={true}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
3 votes
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "60%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="1 vote"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
|
|
|
>
|
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
1 vote
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "20%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Based on 5 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-11-23 10:27:44 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a poll with no votes 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-11-23 10:27:44 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-11-23 10:27:44 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-11-23 10:27:44 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-11-23 10:27:44 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Pizza
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Poutine
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Italian
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText=""
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Wings
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
No votes cast
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-11-23 10:27:44 +00:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`MPollBody renders a poll with only non-local votes 1`] = `
|
2022-03-22 10:32:35 +00:00
|
|
|
<MPollBody
|
2021-11-23 10:27:44 +00:00
|
|
|
getRelationsForEvent={[Function]}
|
2022-03-25 02:11:56 +00:00
|
|
|
highlightLink="unused"
|
2022-11-04 10:48:08 +00:00
|
|
|
highlights={[]}
|
2022-03-25 02:11:56 +00:00
|
|
|
mediaEventHelper={null}
|
2021-11-23 10:27:44 +00:00
|
|
|
mxEvent={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
|
|
|
"content": {
|
2021-11-23 10:27:44 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?
|
|
|
|
1. Pizza
|
|
|
|
2. Poutine
|
|
|
|
3. Italian
|
|
|
|
4. Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"org.matrix.msc3381.poll.start": {
|
|
|
|
"answers": [
|
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2021-11-23 10:27:44 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"kind": "org.matrix.msc3381.poll.disclosed",
|
2022-11-04 10:48:08 +00:00
|
|
|
"question": {
|
2021-11-23 10:27:44 +00:00
|
|
|
"org.matrix.msc1767.text": "What should we order for the party?",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"event_id": "$mypoll",
|
|
|
|
"room_id": "#myroom:example.com",
|
2022-01-17 17:06:30 +00:00
|
|
|
"type": "org.matrix.msc3381.poll.start",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-25 02:11:56 +00:00
|
|
|
onHeightChanged={[Function]}
|
|
|
|
onMessageAllowed={[Function]}
|
|
|
|
permalinkCreator={null}
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<h2>
|
|
|
|
What should we order for the party?
|
|
|
|
</h2>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_allOptions"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="pizza"
|
|
|
|
onClick={[Function]}
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Pizza",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Pizza",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "pizza",
|
|
|
|
"org.matrix.msc1767.text": "Pizza",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="pizza"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="pizza"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Pizza
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="poutine"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Poutine",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Poutine",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "poutine",
|
|
|
|
"org.matrix.msc1767.text": "Poutine",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="0 votes"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="poutine"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="poutine"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Poutine
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
0 votes
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "0%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option"
|
|
|
|
key="italian"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Italian",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Italian",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "italian",
|
|
|
|
"org.matrix.msc1767.text": "Italian",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={false}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="2 votes"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-11-23 10:27:44 +00:00
|
|
|
checked={false}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="italian"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={false}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="italian"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Italian
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
2 votes
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "67%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_option mx_MPollBody_option_checked"
|
|
|
|
key="wings"
|
|
|
|
onClick={[Function]}
|
|
|
|
>
|
|
|
|
<LivePollOption
|
|
|
|
answer={
|
|
|
|
PollAnswerSubevent {
|
|
|
|
"html": undefined,
|
|
|
|
"id": "wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"renderings": [
|
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"body": "Wings",
|
|
|
|
"mimetype": "text/plain",
|
2022-01-17 17:06:30 +00:00
|
|
|
},
|
2022-03-22 10:32:35 +00:00
|
|
|
],
|
|
|
|
"text": "Wings",
|
2022-11-04 10:48:08 +00:00
|
|
|
"wireFormat": {
|
|
|
|
"content": {
|
2022-03-22 10:32:35 +00:00
|
|
|
"id": "wings",
|
|
|
|
"org.matrix.msc1767.text": "Wings",
|
|
|
|
},
|
|
|
|
"type": "org.matrix.sdk.poll.answer",
|
|
|
|
},
|
2021-12-08 14:56:48 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
checked={true}
|
|
|
|
onOptionSelected={[Function]}
|
|
|
|
pollId="$mypoll"
|
|
|
|
votesText="1 vote"
|
|
|
|
>
|
|
|
|
<StyledRadioButton
|
2021-12-03 10:26:28 +00:00
|
|
|
checked={true}
|
2022-03-22 10:32:35 +00:00
|
|
|
childrenInLabel={true}
|
|
|
|
className="mx_MPollBody_live-option"
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
value="wings"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<label
|
|
|
|
className="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled mx_StyledRadioButton_checked"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
<input
|
|
|
|
checked={true}
|
|
|
|
name="poll_answer_select-$mypoll"
|
|
|
|
onChange={[Function]}
|
|
|
|
type="radio"
|
|
|
|
value="wings"
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
<div />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_content"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionDescription"
|
2021-11-23 10:27:44 +00:00
|
|
|
>
|
2021-11-23 11:16:31 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_optionText"
|
2021-11-23 11:16:31 +00:00
|
|
|
>
|
2022-03-22 10:32:35 +00:00
|
|
|
Wings
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_optionVoteCount"
|
|
|
|
>
|
|
|
|
1 vote
|
2021-11-23 11:16:31 +00:00
|
|
|
</div>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className="mx_StyledRadioButton_spacer"
|
|
|
|
/>
|
|
|
|
</label>
|
|
|
|
</StyledRadioButton>
|
|
|
|
</LivePollOption>
|
|
|
|
<div
|
|
|
|
className="mx_MPollBody_popularityBackground"
|
|
|
|
>
|
2021-11-23 10:27:44 +00:00
|
|
|
<div
|
2022-03-22 10:32:35 +00:00
|
|
|
className="mx_MPollBody_popularityAmount"
|
|
|
|
style={
|
2022-11-04 10:48:08 +00:00
|
|
|
{
|
2022-03-22 10:32:35 +00:00
|
|
|
"width": "33%",
|
2021-11-23 10:27:44 +00:00
|
|
|
}
|
2022-03-22 10:32:35 +00:00
|
|
|
}
|
|
|
|
/>
|
2021-11-23 10:27:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-03-22 10:32:35 +00:00
|
|
|
<div
|
|
|
|
className="mx_MPollBody_totalVotes"
|
|
|
|
>
|
|
|
|
Based on 3 votes
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</MPollBody>
|
2021-11-23 10:27:44 +00:00
|
|
|
`;
|
2022-02-21 10:21:35 +00:00
|
|
|
|
2022-11-04 10:48:08 +00:00
|
|
|
exports[`MPollBody renders an undisclosed, finished poll 1`] = `"<div class="mx_MPollBody"><h2>What should we order for the party?</h2><div class="mx_MPollBody_allOptions"><div class="mx_MPollBody_option mx_MPollBody_option_checked mx_MPollBody_option_ended"><div class="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner" data-value="pizza"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Pizza</div><div class="mx_MPollBody_optionVoteCount">2 votes</div></div></div><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 50%;"></div></div></div><div class="mx_MPollBody_option mx_MPollBody_option_ended"><div class="mx_MPollBody_endedOption" data-value="poutine"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Poutine</div><div class="mx_MPollBody_optionVoteCount">0 votes</div></div></div><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 0%;"></div></div></div><div class="mx_MPollBody_option mx_MPollBody_option_ended"><div class="mx_MPollBody_endedOption" data-value="italian"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Italian</div><div class="mx_MPollBody_optionVoteCount">0 votes</div></div></div><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 0%;"></div></div></div><div class="mx_MPollBody_option mx_MPollBody_option_checked mx_MPollBody_option_ended"><div class="mx_MPollBody_endedOption mx_MPollBody_endedOptionWinner" data-value="wings"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Wings</div><div class="mx_MPollBody_optionVoteCount">2 votes</div></div></div><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 50%;"></div></div></div></div><div class="mx_MPollBody_totalVotes">Final result based on 4 votes</div></div>"`;
|
2022-02-21 10:21:35 +00:00
|
|
|
|
2022-11-04 10:48:08 +00:00
|
|
|
exports[`MPollBody renders an undisclosed, unfinished poll 1`] = `"<div class="mx_MPollBody"><h2>What should we order for the party?</h2><div class="mx_MPollBody_allOptions"><div class="mx_MPollBody_option"><label class="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"><input type="radio" name="poll_answer_select-$mypoll" value="pizza"><div><div></div></div><div class="mx_StyledRadioButton_content"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Pizza</div><div class="mx_MPollBody_optionVoteCount"></div></div></div><div class="mx_StyledRadioButton_spacer"></div></label><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 0%;"></div></div></div><div class="mx_MPollBody_option"><label class="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"><input type="radio" name="poll_answer_select-$mypoll" value="poutine"><div><div></div></div><div class="mx_StyledRadioButton_content"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Poutine</div><div class="mx_MPollBody_optionVoteCount"></div></div></div><div class="mx_StyledRadioButton_spacer"></div></label><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 0%;"></div></div></div><div class="mx_MPollBody_option"><label class="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"><input type="radio" name="poll_answer_select-$mypoll" value="italian"><div><div></div></div><div class="mx_StyledRadioButton_content"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Italian</div><div class="mx_MPollBody_optionVoteCount"></div></div></div><div class="mx_StyledRadioButton_spacer"></div></label><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 0%;"></div></div></div><div class="mx_MPollBody_option"><label class="mx_StyledRadioButton mx_MPollBody_live-option mx_StyledRadioButton_enabled"><input type="radio" name="poll_answer_select-$mypoll" value="wings"><div><div></div></div><div class="mx_StyledRadioButton_content"><div class="mx_MPollBody_optionDescription"><div class="mx_MPollBody_optionText">Wings</div><div class="mx_MPollBody_optionVoteCount"></div></div></div><div class="mx_StyledRadioButton_spacer"></div></label><div class="mx_MPollBody_popularityBackground"><div class="mx_MPollBody_popularityAmount" style="width: 0%;"></div></div></div></div><div class="mx_MPollBody_totalVotes">Results will be visible when the poll is ended</div></div>"`;
|