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

Commit acae684

Browse files
sumnerevanst3chguy
andcommitted
Fix ReactionsRowButton test
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> Signed-off-by: Sumner Evans <sumner@beeper.com>
1 parent 3845d29 commit acae684

File tree

2 files changed

+90
-459
lines changed

2 files changed

+90
-459
lines changed

test/components/views/messages/ReactionsRowButton-test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe("ReactionsRowButton", () => {
7575
<ReactionsRowButton {...props} />
7676
</MatrixClientContext.Provider>,
7777
);
78-
expect(root).toMatchSnapshot();
78+
expect(root.asFragment()).toMatchSnapshot();
7979

8080
// Try hover and make sure that the ReactionsRowButtonTooltip works
8181
const reactionButton = root.getByRole("button");
@@ -85,7 +85,7 @@ describe("ReactionsRowButton", () => {
8585
});
8686
reactionButton.dispatchEvent(event);
8787

88-
expect(root).toMatchSnapshot();
88+
expect(root.asFragment()).toMatchSnapshot();
8989
});
9090

9191
it("renders reaction row button custom image reactions correctly", () => {
@@ -104,7 +104,7 @@ describe("ReactionsRowButton", () => {
104104
<ReactionsRowButton {...props} />
105105
</MatrixClientContext.Provider>,
106106
);
107-
expect(root).toMatchSnapshot();
107+
expect(root.asFragment()).toMatchSnapshot();
108108

109109
// Try hover and make sure that the ReactionsRowButtonTooltip works
110110
const reactionButton = root.getByRole("button");
@@ -114,6 +114,6 @@ describe("ReactionsRowButton", () => {
114114
});
115115
reactionButton.dispatchEvent(event);
116116

117-
expect(root).toMatchSnapshot();
117+
expect(root.asFragment()).toMatchSnapshot();
118118
});
119119
});

0 commit comments

Comments
 (0)