Skip to content

Show who voted for what in poll results #980

Show who voted for what in poll results

Show who voted for what in poll results #980

Re-run triggered November 19, 2024 09:14
Status Failure
Total duration 5m 57s
Artifacts

tests.yml

on: pull_request
Matrix: Jest
jest-tests
4s
jest-tests
Fit to window
Zoom out
Zoom in

Annotations

20 errors
MPollBody › renders a poll with no votes: test/unit-tests/components/views/messages/MPollBody-test.tsx#L752
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a poll with no votes 1` - Snapshot - 12 + Received + 4 @@ -34,18 +34,16 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -84,18 +82,16 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -134,18 +130,16 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -184,18 +178,16 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" at Object.toMatchSnapshot (test/unit-tests/components/views/messages/MPollBody-test.tsx:752:27)
MPollBody › renders a poll with only non-local votes: test/unit-tests/components/views/messages/MPollBody-test.tsx#L764
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a poll with only non-local votes 1` - Snapshot - 16 + Received + 20 @@ -34,30 +34,31 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> + </div> </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -96,30 +97,31 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -158,30 +160,31 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 2 votes </span> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -220,30 +223,31 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabinde
MPollBody › renders a poll with local: test/unit-tests/components/views/messages/MPollBody-test.tsx#L793
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a poll with local, non-local and invalid votes 1` - Snapshot - 16 + Received + 20 @@ -34,30 +34,31 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> + </div> </div> <span class="mx_PollOption_optionVoteCount" > 1 vote </span> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -96,30 +97,31 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -158,30 +160,31 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 3 votes </span> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -220,30 +223,31 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;"
MPollBody › renders a poll that I have not voted in: test/unit-tests/components/views/messages/MPollBody-test.tsx#L805
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a poll that I have not voted in 1` - Snapshot - 12 + Received + 4 @@ -34,18 +34,16 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -84,18 +82,16 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -134,18 +130,16 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -184,18 +178,16 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" at Object.toMatchSnapshot (test/unit-tests/components/views/messages/MPollBody-test.tsx:805:27)
MPollBody › renders a finished poll with no votes: test/unit-tests/components/views/messages/MPollBody-test.tsx#L811
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a finished poll with no votes 1` - Snapshot - 16 + Received + 20 @@ -24,30 +24,31 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> + </div> </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -72,30 +73,31 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -120,30 +122,31 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -168,30 +171,31 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx
MPollBody › renders a finished poll: test/unit-tests/components/views/messages/MPollBody-test.tsx#L824
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a finished poll 1` - Snapshot - 16 + Received + 20 @@ -24,30 +24,31 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> + </div> </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -72,30 +73,31 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -120,33 +122,34 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" 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> <div class="mx_PollOption_popularityBackground" @@ -171,30 +174,31 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" />
MPollBody › renders a finished poll with multiple winners: test/unit-tests/components/views/messages/MPollBody-test.tsx#L838
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders a finished poll with multiple winners 1` - Snapshot - 16 + Received + 20 @@ -24,33 +24,34 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" 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> <div class="mx_PollOption_popularityBackground" @@ -75,30 +76,31 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -123,30 +125,31 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -171,33 +174,34 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111"
MPollBody › renders an undisclosed: test/unit-tests/components/views/messages/MPollBody-test.tsx#L852
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders an undisclosed, unfinished poll 1` - Snapshot - 12 + Received + 4 @@ -34,18 +34,16 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -84,18 +82,16 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -134,18 +130,16 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" @@ -184,18 +178,16 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> <div - style="display: flex;" + class="mx_PollOption_votesWrapper" > <span class="mx_PollOption_optionVoteCount" /> - </div> </div> </div> </div> <div class="mx_StyledRadioButton_spacer" at Object.toMatchSnapshot (test/unit-tests/components/views/messages/MPollBody-test.tsx:852:27)
MPollBody › renders an undisclosed: test/unit-tests/components/views/messages/MPollBody-test.tsx#L866
expect(received).toMatchSnapshot() Snapshot name: `MPollBody renders an undisclosed, finished poll 1` - Snapshot - 16 + Received + 20 @@ -24,33 +24,34 @@ <div class="mx_PollOption_optionText" > Pizza </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" 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> <div class="mx_PollOption_popularityBackground" @@ -75,30 +76,31 @@ <div class="mx_PollOption_optionText" > Poutine </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -123,30 +125,31 @@ <div class="mx_PollOption_optionText" > Italian </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" /> </div> + </div> <span class="mx_PollOption_optionVoteCount" > 0 votes </span> - </div> </div> </div> </div> <div class="mx_PollOption_popularityBackground" @@ -171,33 +174,34 @@ <div class="mx_PollOption_optionText" > Wings </div> - <div> + <div + class="mx_PollOption_votesWrapper" + > <div - style="display: flex;" + class="mx_PollOption_facePile" > <div class="mx_AccessibleButton mx_FacePile" role="button" - style="margin-right: 10px;" tabindex="0" > <div class="_stacked-avatars_mcap2_111" />
Jest (1)
Process completed with exit code 1.
<MPollEndBody /> › when poll start event exists in current timeline › renders an ended poll: 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)
<MPollEndBody /> › when poll start event does not exist in current timeline › fetches the related poll start event and displays a poll tile: 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)
<PollListItemEnded /> › renders a poll with no responses: 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)
<PollListItemEnded /> › renders a poll with one winning answer: 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
<PollListItemEnded /> › renders a poll with two winning answers: 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=
<PollListItemEnded /> › counts one unique vote per user: 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> <
<PollListItemEnded /> › excludes malformed responses: 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>
<PollListItemEnded /> › updates on new responses: 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>
Jest (2)
Process completed with exit code 1.
jest-tests
Process completed with exit code 1.