Synchronise internationalisations with Localazy (#30407)

* [create-pull-request] automated change

* First pass of fixing tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Second pass of fixing tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Third pass of fixing tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
ElementRobot
2025-08-07 13:25:34 +02:00
committed by GitHub
parent 2d0facd47b
commit cc094f4b56
78 changed files with 220 additions and 189 deletions
@@ -125,12 +125,12 @@ describe("MessageComposer", () => {
it("Renders a SendMessageComposer and MessageComposerButtons by default", () => {
wrapAndRender({ room });
expect(screen.getByLabelText("Send a message…")).toBeInTheDocument();
expect(screen.getByLabelText("Send an unencrypted message…")).toBeInTheDocument();
});
it("Does not render a SendMessageComposer or MessageComposerButtons when user has no permission", () => {
wrapAndRender({ room }, false);
expect(screen.queryByLabelText("Send a message…")).not.toBeInTheDocument();
expect(screen.queryByLabelText("Send an unencrypted message…")).not.toBeInTheDocument();
expect(screen.getByText("You do not have permission to post to this room")).toBeInTheDocument();
});
@@ -150,7 +150,7 @@ describe("MessageComposer", () => {
}),
);
expect(screen.queryByLabelText("Send a message…")).not.toBeInTheDocument();
expect(screen.queryByLabelText("Send an unencrypted message…")).not.toBeInTheDocument();
expect(screen.getByText("This room has been replaced and is no longer active.")).toBeInTheDocument();
});
@@ -336,7 +336,7 @@ describe("MessageComposer", () => {
describe("when not replying to an event", () => {
it("should pass the expected placeholder to SendMessageComposer", () => {
wrapAndRender({ room });
expect(screen.getByLabelText("Send a message…")).toBeInTheDocument();
expect(screen.getByLabelText("Send an unencrypted message…")).toBeInTheDocument();
});
it("and an e2e status it should pass the expected placeholder to SendMessageComposer", () => {
@@ -344,7 +344,7 @@ describe("MessageComposer", () => {
room,
e2eStatus: E2EStatus.Normal,
});
expect(screen.getByLabelText("Send an encrypted message…")).toBeInTheDocument();
expect(screen.getByLabelText("Send a message…")).toBeInTheDocument();
});
});
@@ -380,12 +380,12 @@ describe("MessageComposer", () => {
});
describe("without encryption", () => {
checkPlaceholder("Send a reply…");
checkPlaceholder("Send an unencrypted reply…");
});
describe("with encryption", () => {
setEncrypted();
checkPlaceholder("Send an encrypted reply…");
checkPlaceholder("Send a reply…");
});
describe("with a non-thread relation", () => {
@@ -393,7 +393,7 @@ describe("MessageComposer", () => {
props.relation = { rel_type: "test" };
});
checkPlaceholder("Send a reply…");
checkPlaceholder("Send an unencrypted reply…");
});
describe("that is a thread", () => {
@@ -401,11 +401,11 @@ describe("MessageComposer", () => {
props.relation = { rel_type: THREAD_RELATION_TYPE.name };
});
checkPlaceholder("Reply to thread…");
checkPlaceholder("Reply to unencrypted thread…");
describe("with encryption", () => {
setEncrypted();
checkPlaceholder("Reply to encrypted thread…");
checkPlaceholder("Reply to thread…");
});
});
});