Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix broken test (#10171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry authored Feb 16, 2023
1 parent cf7ab9a commit 62f968b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 2 additions & 7 deletions test/components/views/messages/MPollBody-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("MPollBody", () => {
expect(allVotes(newVoteRelations([]))).toEqual([]);
});

xit("renders a loader while responses are still loading", async () => {
it("renders a loader while responses are still loading", async () => {
const votes = [
responseEvent("@me:example.com", "pizza"),
responseEvent("@bellc:example.com", "pizza"),
Expand All @@ -75,13 +75,8 @@ describe("MPollBody", () => {
// render without waiting for responses
const renderResult = await newMPollBody(votes, [], undefined, undefined, false);

// votes still displayed
expect(votesCount(renderResult, "pizza")).toBe("2 votes");
expect(votesCount(renderResult, "poutine")).toBe("1 vote");
expect(votesCount(renderResult, "italian")).toBe("0 votes");
expect(votesCount(renderResult, "wings")).toBe("1 vote");
// spinner rendered
expect(renderResult.getByTestId("totalVotes").innerHTML).toMatchSnapshot();
expect(renderResult.getByTestId("spinner")).toBeInTheDocument();
});

it("renders no votes if none were made", async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ exports[`MPollBody renders a finished poll with no votes 1`] = `
</div>
`;

exports[`MPollBody renders a loader while responses are still loading 1`] = `"Based on 4 votes<div class="mx_Spinner"><div class="mx_Spinner_icon" style="width: 16px; height: 16px;" aria-label="Loading…" role="progressbar" data-testid="spinner"></div></div>"`;

exports[`MPollBody renders a poll that I have not voted in 1`] = `
<div>
<div
Expand Down

0 comments on commit 62f968b

Please sign in to comment.