Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-10-15 16:22:11 +01:00
parent d928a7be9d
commit 67659ab353
48 changed files with 4088 additions and 245 deletions
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
import { act, fireEvent, render, screen, within } from "jest-matrix-react";
import { act, fireEvent, render, screen } from "jest-matrix-react";
import {
EventTimeline,
EventType,
@@ -46,7 +46,7 @@ describe("PeopleRoomSettingsTab", () => {
</MatrixClientContext.Provider>,
);
const getGroup = () => screen.getByRole("group", { name: "Asking to join" });
const getParagraph = () => screen.getByRole("paragraph");
const getParagraph = () => document.querySelector("p");
it("renders a heading", () => {
getComponent(room);
@@ -115,7 +115,7 @@ describe("PeopleRoomSettingsTab", () => {
it("allows to expand a reason", () => {
getComponent(room);
fireEvent.click(getButton("See more"));
expect(within(getGroup()).getByRole("paragraph")).toHaveTextContent(reason);
expect(getGroup().querySelector("p")).toHaveTextContent(reason);
});
it("allows to collapse a reason", () => {
@@ -352,7 +352,7 @@ exports[`<SessionManagerTab /> goes to filtered list from security recommendatio
>
<input
aria-label="Select all"
aria-labelledby="floating-ui-142"
aria-labelledby="floating-ui-bhqy142"
data-testid="device-select-all-checkbox"
id="device-select-all-checkbox"
type="checkbox"