From 62f968be7c78c389cb4599b6e34ba85ed8479b9b Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 17 Feb 2023 11:27:03 +1300 Subject: [PATCH] fix broken test (#10171) --- test/components/views/messages/MPollBody-test.tsx | 9 ++------- .../views/messages/__snapshots__/MPollBody-test.tsx.snap | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/test/components/views/messages/MPollBody-test.tsx b/test/components/views/messages/MPollBody-test.tsx index 33e6e1c062..2e411f2b7d 100644 --- a/test/components/views/messages/MPollBody-test.tsx +++ b/test/components/views/messages/MPollBody-test.tsx @@ -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"), @@ -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 () => { diff --git a/test/components/views/messages/__snapshots__/MPollBody-test.tsx.snap b/test/components/views/messages/__snapshots__/MPollBody-test.tsx.snap index c27f984101..3d6a99be8a 100644 --- a/test/components/views/messages/__snapshots__/MPollBody-test.tsx.snap +++ b/test/components/views/messages/__snapshots__/MPollBody-test.tsx.snap @@ -465,8 +465,6 @@ exports[`MPollBody renders a finished poll with no votes 1`] = ` `; -exports[`MPollBody renders a loader while responses are still loading 1`] = `"Based on 4 votes
"`; - exports[`MPollBody renders a poll that I have not voted in 1`] = `