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

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
florianduros committed Aug 19, 2024
1 parent d5bbaa1 commit 53e0523
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/components/views/rooms/MessageComposer-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ describe("MessageComposer", () => {

it("wysiwyg correctly persists state to and from localStorage", async () => {
const room = mkStubRoom("!roomId:server", "Room 1", cli);
const messateText = "Test Text";
const messageText = "Test Text";
await SettingsStore.setValue("feature_wysiwyg_composer", null, SettingLevel.DEVICE, true);
const { renderResult, rawComponent } = wrapAndRender({ room });
const { unmount, rerender } = renderResult;
Expand All @@ -469,11 +469,11 @@ describe("MessageComposer", () => {
await userEvent.click(screen.getByRole("textbox"));
});
fireEvent.input(screen.getByRole("textbox"), {
data: messateText,
data: messageText,
inputType: "insertText",
});

await waitFor(() => expect(screen.getByRole("textbox")).toHaveTextContent(messateText));
await waitFor(() => expect(screen.getByRole("textbox")).toHaveTextContent(messageText));

// Wait for event dispatch to happen
await act(async () => {
Expand All @@ -488,13 +488,13 @@ describe("MessageComposer", () => {

// assert the persisted state
expect(JSON.parse(localStorage.getItem(key)!)).toStrictEqual({
content: messateText,
content: messageText,
isRichText: true,
});

// ensure the correct state is re-loaded
rerender(rawComponent);
await waitFor(() => expect(screen.getByRole("textbox")).toHaveTextContent(messateText));
await waitFor(() => expect(screen.getByRole("textbox")).toHaveTextContent(messageText));
});
});

Expand Down

0 comments on commit 53e0523

Please sign in to comment.