Show who voted for what in poll results #980
Annotations
9 errors
Run tests:
test/unit-tests/components/views/messages/MPollEndBody-test.tsx#L104
expect(received).toMatchSnapshot()
Snapshot name: `<MPollEndBody /> when poll start event exists in current timeline renders an ended poll 1`
- Snapshot - 1
+ Received + 38
@@ -33,13 +33,30 @@
class="mx_PollOption_optionText"
>
Socks
</div>
<div
+ class="mx_PollOption_votesWrapper"
+ >
+ <div
+ class="mx_PollOption_facePile"
+ >
+ <div
+ class="mx_AccessibleButton mx_FacePile"
+ role="button"
+ tabindex="0"
+ >
+ <div
+ class="_stacked-avatars_mcap2_111"
+ />
+ </div>
+ </div>
+ <span
class="mx_PollOption_optionVoteCount"
>
0 votes
+ </span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
@@ -65,13 +82,30 @@
class="mx_PollOption_optionText"
>
Shoes
</div>
<div
+ class="mx_PollOption_votesWrapper"
+ >
+ <div
+ class="mx_PollOption_facePile"
+ >
+ <div
+ class="mx_AccessibleButton mx_FacePile"
+ role="button"
+ tabindex="0"
+ >
+ <div
+ class="_stacked-avatars_mcap2_111"
+ />
+ </div>
+ </div>
+ <span
class="mx_PollOption_optionVoteCount"
>
0 votes
+ </span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
@@ -83,13 +117,16 @@
</div>
</div>
</div>
<div
class="mx_MPollBody_totalVotes"
+ >
+ <span
data-testid="totalVotes"
>
- Final result based on 0 votes
+ Final result based on 0 votes. Click here to see full results
+ </span>
<div
class="mx_Spinner"
>
<div
aria-label="Loading…"
at Object.toMatchSnapshot (test/unit-tests/components/views/messages/MPollEndBody-test.tsx:104:31)
|
Run tests:
test/unit-tests/components/views/messages/MPollEndBody-test.tsx#L135
expect(received).toEqual(expected) // deep equality
Expected: "Final result based on 0 votes"
Received: "Final result based on 0 votes. Click here to see full results"
at Object.toEqual (test/unit-tests/components/views/messages/MPollEndBody-test.tsx:135:57)
|
Run tests:
test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx#L70
expect(received).toMatchSnapshot()
Snapshot name: `<PollListItemEnded /> renders a poll with no responses 1`
- Snapshot - 1
+ Received + 1
@@ -31,11 +31,11 @@
class="mx_PollListItemEnded_voteCount"
>
<span
class="mx_Caption"
>
- Final result based on 0 votes
+ Final result based on 0 votes. Click here to see full results
</span>
</div>
</div>
</span>
</li>
at Object.toMatchSnapshot (test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx:70:27)
|
Run tests:
test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx#L83
expect(received).resolves.toBeInTheDocument()
Received promise rejected instead of resolved
Rejected to value: [TestingLibraryElementError: Unable to find an element with the text: Final result based on 3 votes. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.·
Ignored nodes: comments, script, style
<body>
<div>
<li
class="mx_PollListItemEnded"
data-testid="pollListItem-1"
>
<span
tabindex="0"
>
<div
aria-labelledby=":r6:"
class="mx_PollListItemEnded_content"
>
<div
class="mx_PollListItemEnded_title"
>
<div
class="mx_PollListItemEnded_icon"
/>
<span
class="mx_PollListItemEnded_question"
>
Question?
</span>
<span
class="mx_Caption"
>
02/02/23
</span>
</div>
<div
class="mx_PollListItemEnded_answers"
>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerOneId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerOneId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Nissan Silvia S15
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
<span
class="mx_PollOption_optionVoteCount"
>
<div
class="mx_PollOption_winnerIcon"
/>
2 votes
</span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
>
<div
class="mx_PollOption_popularityAmount"
style="width: 67%;"
/>
</div>
</div>
</div>
<div
class="mx_PollListItemEnded_voteCount"
>
<span
class="mx_Caption"
>
Final result based on 3 votes. Click here to see full results
</span>
</div>
</div>
</span>
</li>
</div>
<div
data-floating-ui-portal=""
id=":ra:"
>
<div
class="_tooltip_1pslb_17 _invisible_1pslb_30"
data-floating-ui-focusable=""
style="position: absolute; left: 0px; top: 0px; transform: translate(5px, -6px);"
tabindex="-1"
>
<svg
aria-hidden="true"
class="_arrow_1pslb_42"
height="10"
style="position: absolute; pointer-events: none; top: 100%; left: -1px;"
viewBox="0 0 10 10"
width="10"
>
<path
d="M0,0 H10 L5,6 Q5,6 5,6 Z"
stroke="none"
/>
<clippath
id=":rb:"
>
<rect
height="10"
width="10"
x="0"
y="0"
/>
</clippath>
</svg>
<span
id=":r6:"
>
View poll
</span>
</div>
</div>
<div
aria-h
|
Run tests:
test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx#L99
expect(received).resolves.toBeInTheDocument()
Received promise rejected instead of resolved
Rejected to value: [TestingLibraryElementError: Unable to find an element with the text: Final result based on 4 votes. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.·
Ignored nodes: comments, script, style
<body>
<div>
<li
class="mx_PollListItemEnded"
data-testid="pollListItem-1"
>
<span
tabindex="0"
>
<div
aria-labelledby=":rc:"
class="mx_PollListItemEnded_content"
>
<div
class="mx_PollListItemEnded_title"
>
<div
class="mx_PollListItemEnded_icon"
/>
<span
class="mx_PollListItemEnded_question"
>
Question?
</span>
<span
class="mx_Caption"
>
02/02/23
</span>
</div>
<div
class="mx_PollListItemEnded_answers"
>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerOneId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerOneId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Nissan Silvia S15
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
<span
class="mx_PollOption_optionVoteCount"
>
<div
class="mx_PollOption_winnerIcon"
/>
2 votes
</span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
>
<div
class="mx_PollOption_popularityAmount"
style="width: 50%;"
/>
</div>
</div>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerTwoId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerTwoId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Mitsubishi Lancer Evolution IX
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
<span
class=
|
Run tests:
test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx#L120
expect(received).resolves.toBeInTheDocument()
Received promise rejected instead of resolved
Rejected to value: [TestingLibraryElementError: Unable to find an element with the text: Final result based on 3 votes. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.·
Ignored nodes: comments, script, style
<body>
<div>
<li
class="mx_PollListItemEnded"
data-testid="pollListItem-1"
>
<span
tabindex="0"
>
<div
aria-labelledby=":ri:"
class="mx_PollListItemEnded_content"
>
<div
class="mx_PollListItemEnded_title"
>
<div
class="mx_PollListItemEnded_icon"
/>
<span
class="mx_PollListItemEnded_question"
>
Question?
</span>
<span
class="mx_Caption"
>
02/02/23
</span>
</div>
<div
class="mx_PollListItemEnded_answers"
>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerOneId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerOneId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Nissan Silvia S15
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
<span
class="mx_PollOption_optionVoteCount"
>
<div
class="mx_PollOption_winnerIcon"
/>
2 votes
</span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
>
<div
class="mx_PollOption_popularityAmount"
style="width: 67%;"
/>
</div>
</div>
</div>
<div
class="mx_PollListItemEnded_voteCount"
>
<span
class="mx_Caption"
>
Final result based on 3 votes. Click here to see full results
</span>
</div>
</div>
</span>
</li>
</div>
<div
data-floating-ui-portal=""
id=":rm:"
>
<div
class="_tooltip_1pslb_17 _invisible_1pslb_30"
data-floating-ui-focusable=""
style="position: absolute; left: 0px; top: 0px; transform: translate(5px, -6px);"
tabindex="-1"
>
<svg
aria-hidden="true"
class="_arrow_1pslb_42"
height="10"
style="position: absolute; pointer-events: none; top: 100%; left: -1px;"
viewBox="0 0 10 10"
width="10"
>
<path
d="M0,0 H10 L5,6 Q5,6 5,6 Z"
stroke="none"
/>
<clippath
id=":rn:"
>
<rect
height="10"
width="10"
x="0"
y="0"
/>
</clippath>
</svg>
<span
id=":ri:"
>
View poll
</span>
<
|
Run tests:
test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx#L137
expect(received).resolves.toBeInTheDocument()
Received promise rejected instead of resolved
Rejected to value: [TestingLibraryElementError: Unable to find an element with the text: Final result based on 2 votes. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.·
Ignored nodes: comments, script, style
<body>
<div>
<li
class="mx_PollListItemEnded"
data-testid="pollListItem-1"
>
<span
tabindex="0"
>
<div
aria-labelledby=":ro:"
class="mx_PollListItemEnded_content"
>
<div
class="mx_PollListItemEnded_title"
>
<div
class="mx_PollListItemEnded_icon"
/>
<span
class="mx_PollListItemEnded_question"
>
Question?
</span>
<span
class="mx_Caption"
>
02/02/23
</span>
</div>
<div
class="mx_PollListItemEnded_answers"
>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerOneId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerOneId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Nissan Silvia S15
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
<span
class="mx_PollOption_optionVoteCount"
>
<div
class="mx_PollOption_winnerIcon"
/>
1 vote
</span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
>
<div
class="mx_PollOption_popularityAmount"
style="width: 50%;"
/>
</div>
</div>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerTwoId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerTwoId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Mitsubishi Lancer Evolution IX
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
|
Run tests:
test/unit-tests/components/views/polls/pollHistory/PollListItemEnded-test.tsx#L150
expect(received).resolves.toBeInTheDocument()
Received promise rejected instead of resolved
Rejected to value: [TestingLibraryElementError: Unable to find an element with the text: Final result based on 2 votes. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.·
Ignored nodes: comments, script, style
<body>
<div>
<li
class="mx_PollListItemEnded"
data-testid="pollListItem-1"
>
<span
tabindex="0"
>
<div
aria-labelledby=":ru:"
class="mx_PollListItemEnded_content"
>
<div
class="mx_PollListItemEnded_title"
>
<div
class="mx_PollListItemEnded_icon"
/>
<span
class="mx_PollListItemEnded_question"
>
Question?
</span>
<span
class="mx_Caption"
>
02/02/23
</span>
</div>
<div
class="mx_PollListItemEnded_answers"
>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerOneId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerOneId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Nissan Silvia S15
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
</div>
<span
class="mx_PollOption_optionVoteCount"
>
<div
class="mx_PollOption_winnerIcon"
/>
1 vote
</span>
</div>
</div>
</div>
<div
class="mx_PollOption_popularityBackground"
>
<div
class="mx_PollOption_popularityAmount"
style="width: 50%;"
/>
</div>
</div>
<div
class="mx_PollOption mx_PollOption_checked mx_PollOption_ended"
data-testid="pollOption-answerTwoId"
>
<div
class="mx_PollOption_endedOption mx_PollOption_endedOptionWinner"
data-value="answerTwoId"
>
<div
class="mx_PollOption_content"
>
<div
class="mx_PollOption_optionText"
>
Mitsubishi Lancer Evolution IX
</div>
<div
class="mx_PollOption_votesWrapper"
>
<div
class="mx_PollOption_facePile"
>
<div
class="mx_AccessibleButton mx_FacePile"
role="button"
tabindex="0"
>
<div
class="_stacked-avatars_mcap2_111"
/>
</div>
|
Run tests
Process completed with exit code 1.
|
Loading