Fix remaining existing tests
This commit is contained in:
parent
2083213131
commit
22729f4513
2 changed files with 2 additions and 2 deletions
|
@ -244,7 +244,7 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
|
|||
if (!this.state.voteRelations || !this.context) {
|
||||
return new Map<string, UserVote>();
|
||||
}
|
||||
return collectUserVotes(allVotes(this.state.voteRelations), null, this.state.selected);
|
||||
return collectUserVotes(allVotes(this.state.voteRelations), this.context.getUserId(), this.state.selected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -425,7 +425,7 @@ describe("MPollBody", () => {
|
|||
expect(endedVotesCount(renderResult, "poutine")).toBe("1 vote");
|
||||
expect(endedVotesCount(renderResult, "italian")).toBe("0 votes");
|
||||
expect(endedVotesCount(renderResult, "wings")).toBe("1 vote");
|
||||
expect(renderResult.getByTestId("totalVotes").innerHTML).toBe("Final result based on 5 votes");
|
||||
expect(renderResult.getByTestId("totalVotes").innerHTML).toBe("Final result based on 5 votes. Click here to see full results");
|
||||
});
|
||||
|
||||
it("sends a vote event when I choose an option", async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue