From 8ec2f9bb31ab4cf689cde1b2484505307f5ff560 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 19 Nov 2024 10:43:42 -0500 Subject: [PATCH] Update tests --- src/button/ReactionToggleButton.test.tsx | 12 +++---- .../ReactionToggleButton.test.tsx.snap | 33 +++++++------------ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/button/ReactionToggleButton.test.tsx b/src/button/ReactionToggleButton.test.tsx index 14218820..15997637 100644 --- a/src/button/ReactionToggleButton.test.tsx +++ b/src/button/ReactionToggleButton.test.tsx @@ -53,7 +53,7 @@ test("Can open menu", async () => { const { getByLabelText, container } = render( , ); - await user.click(getByLabelText("action.raise_hand_or_send_reaction")); + await user.click(getByLabelText("common.reactions")); expect(container).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ test("Can raise hand", async () => { const { getByLabelText, container } = render( , ); - await user.click(getByLabelText("action.raise_hand_or_send_reaction")); + await user.click(getByLabelText("common.reactions")); await user.click(getByLabelText("action.raise_hand")); expect(room.testSentEvents).toEqual([ [ @@ -90,7 +90,7 @@ test("Can lower hand", async () => { , ); const reactionEvent = room.testSendHandRaise(memberEventAlice, membership); - await user.click(getByLabelText("action.raise_hand_or_send_reaction")); + await user.click(getByLabelText("common.reactions")); await user.click(getByLabelText("action.lower_hand")); expect(room.testRedactedEvents).toEqual([[undefined, reactionEvent]]); expect(container).toMatchSnapshot(); @@ -103,7 +103,7 @@ test("Can react with emoji", async () => { const { getByLabelText, getByText } = render( , ); - await user.click(getByLabelText("action.raise_hand_or_send_reaction")); + await user.click(getByLabelText("common.reactions")); await user.click(getByText("🐶")); expect(room.testSentEvents).toEqual([ [ @@ -128,7 +128,7 @@ test("Can fully expand emoji picker", async () => { const { getByText, container, getByLabelText } = render( , ); - await user.click(getByLabelText("action.raise_hand_or_send_reaction")); + await user.click(getByLabelText("common.reactions")); await user.click(getByLabelText("action.show_more")); expect(container).toMatchSnapshot(); await user.click(getByText("🦗")); @@ -156,7 +156,7 @@ test("Can close search", async () => { const { getByLabelText, container } = render( , ); - await user.click(getByLabelText("action.raise_hand_or_send_reaction")); + await user.click(getByLabelText("common.reactions")); await user.click(getByLabelText("action.show_more")); await user.click(getByLabelText("action.show_less")); expect(container).toMatchSnapshot(); diff --git a/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap b/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap index 604a615a..e4980da6 100644 --- a/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap +++ b/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap @@ -9,7 +9,6 @@ exports[`Can close search 1`] = ` aria-disabled="false" aria-expanded="true" aria-haspopup="true" - aria-label="action.raise_hand_or_send_reaction" aria-labelledby=":r9l:" class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59" data-kind="primary" @@ -26,10 +25,9 @@ exports[`Can close search 1`] = ` xmlns="http://www.w3.org/2000/svg" > - @@ -45,7 +43,6 @@ exports[`Can fully expand emoji picker 1`] = ` aria-disabled="false" aria-expanded="true" aria-haspopup="true" - aria-label="action.raise_hand_or_send_reaction" aria-labelledby=":r6c:" class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59" data-kind="primary" @@ -62,10 +59,9 @@ exports[`Can fully expand emoji picker 1`] = ` xmlns="http://www.w3.org/2000/svg" > - @@ -78,7 +74,6 @@ exports[`Can lower hand 1`] = ` aria-disabled="false" aria-expanded="false" aria-haspopup="true" - aria-label="action.raise_hand_or_send_reaction" aria-labelledby=":r36:" class="_button_i91xf_17 raisedButton _has-icon_i91xf_66 _icon-only_i91xf_59" data-kind="primary" @@ -111,7 +106,6 @@ exports[`Can open menu 1`] = ` aria-disabled="false" aria-expanded="true" aria-haspopup="true" - aria-label="action.raise_hand_or_send_reaction" aria-labelledby=":r0:" class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59" data-kind="primary" @@ -128,10 +122,9 @@ exports[`Can open menu 1`] = ` xmlns="http://www.w3.org/2000/svg" > - @@ -144,7 +137,6 @@ exports[`Can raise hand 1`] = ` aria-disabled="false" aria-expanded="false" aria-haspopup="true" - aria-label="action.raise_hand_or_send_reaction" aria-labelledby=":r1j:" class="_button_i91xf_17 _has-icon_i91xf_66 _icon-only_i91xf_59" data-kind="secondary" @@ -161,10 +153,9 @@ exports[`Can raise hand 1`] = ` xmlns="http://www.w3.org/2000/svg" > -