fix broken test (#10171)
This commit is contained in:
parent
cf7ab9a8c6
commit
62f968be7c
2 changed files with 2 additions and 9 deletions
|
@ -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 () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue