From d6d6efdff25ace6c6b4d19c44e0bbf583b58b003 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Fri, 8 Nov 2024 13:30:35 +0000 Subject: [PATCH] Relabel lower hand --- public/locales/en-GB/app.json | 4 ++-- src/button/ReactionToggleButton.test.tsx | 6 +++--- src/button/ReactionToggleButton.tsx | 3 ++- .../__snapshots__/ReactionToggleButton.test.tsx.snap | 7 +++++++ src/reactions/RaisedHandIndicator.tsx | 4 +++- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/public/locales/en-GB/app.json b/public/locales/en-GB/app.json index 0ed0be5f..00cc462f 100644 --- a/public/locales/en-GB/app.json +++ b/public/locales/en-GB/app.json @@ -9,9 +9,11 @@ "edit": "Edit", "go": "Go", "invite": "Invite", + "lower_hand": "Lower hand", "no": "No", "open_search": "Open search", "pick_reaction": "Pick reaction", + "raise_hand": "Raise hand", "raise_hand_or_send_reaction": "Raise hand or send reaction", "register": "Register", "remove": "Remove", @@ -53,14 +55,12 @@ "error": "Error", "home": "Home", "loading": "Loading…", - "lower_hand": "Lower hand", "microphone": "Microphone", "next": "Next", "options": "Options", "password": "Password", "preferences": "Preferences", "profile": "Profile", - "raise_hand": "Raise hand", "search": "Search", "settings": "Settings", "something_went_wrong": "Something went wrong", diff --git a/src/button/ReactionToggleButton.test.tsx b/src/button/ReactionToggleButton.test.tsx index 4d4a235e..b13b74fa 100644 --- a/src/button/ReactionToggleButton.test.tsx +++ b/src/button/ReactionToggleButton.test.tsx @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only Please see LICENSE in the repository root for full details. */ -import { fireEvent, getByLabelText, render } from "@testing-library/react"; +import { fireEvent, render } from "@testing-library/react"; import { act } from "react"; import { expect, test } from "vitest"; import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc"; @@ -66,7 +66,7 @@ test("Can raise hand", async () => { , ); await user.click(getByLabelText("action.raise_hand_or_send_reaction")); - await user.click(getByLabelText("common.raise_hand")); + await user.click(getByLabelText("action.raise_hand")); expect(room.testSentEvents).toEqual([ [ undefined, @@ -92,7 +92,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.lower_hand")); + await user.click(getByLabelText("action.lower_hand")); expect(room.testRedactedEvents).toEqual([[undefined, reactionEvent]]); expect(container).toMatchSnapshot(); }); diff --git a/src/button/ReactionToggleButton.tsx b/src/button/ReactionToggleButton.tsx index 2309edab..689bb990 100644 --- a/src/button/ReactionToggleButton.tsx +++ b/src/button/ReactionToggleButton.tsx @@ -60,6 +60,7 @@ const InnerButton: FC = ({ raised, open, ...props }) => { {errorText && ( diff --git a/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap b/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap index b3c4b035..bee0bdb1 100644 --- a/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap +++ b/src/button/__snapshots__/ReactionToggleButton.test.tsx.snap @@ -8,6 +8,7 @@ exports[`Can close search 1`] = `