Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
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", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue