Fix typing issues
This commit is contained in:
parent
30d60bfcdd
commit
95c0ff9da9
24 changed files with 36 additions and 121 deletions
|
@ -17,15 +17,12 @@ limitations under the License.
|
|||
import React from "react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { render, waitFor } from "@testing-library/react";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
|
||||
import InfoTooltip from "../../../../src/components/views/elements/InfoTooltip";
|
||||
|
||||
describe("InfoTooltip", () => {
|
||||
it("should show tooltip on hover", async () => {
|
||||
const { getByText, asFragment } = render(<InfoTooltip tooltip="Tooltip text">Trigger text</InfoTooltip>, {
|
||||
wrapper: TooltipProvider,
|
||||
});
|
||||
const { getByText, asFragment } = render(<InfoTooltip tooltip="Tooltip text">Trigger text</InfoTooltip>);
|
||||
|
||||
const trigger = getByText("Trigger text");
|
||||
expect(trigger).toBeVisible();
|
||||
|
|
|
@ -19,7 +19,6 @@ import { act, render, RenderResult, screen } from "@testing-library/react";
|
|||
import userEvent from "@testing-library/user-event";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
|
||||
import dis from "../../../../src/dispatcher/dispatcher";
|
||||
import { Pill, PillProps, PillType } from "../../../../src/components/views/elements/Pill";
|
||||
|
@ -65,7 +64,6 @@ describe("<Pill>", () => {
|
|||
<div onClick={pillParentClickHandler}>
|
||||
<Pill {...withDefault} />
|
||||
</div>,
|
||||
,
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ limitations under the License.
|
|||
|
||||
import { render } from "@testing-library/react";
|
||||
import React from "react";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
|
||||
import { mkRoom, mkRoomMember, stubClient, withClientContextRenderOptions } from "../../../test-utils";
|
||||
|
@ -33,9 +32,7 @@ describe("<RoomFacePile />", () => {
|
|||
]);
|
||||
|
||||
const { asFragment } = render(
|
||||
<TooltipProvider>
|
||||
<RoomFacePile onlyKnownUsers={false} room={room} />
|
||||
</TooltipProvider>,
|
||||
<RoomFacePile onlyKnownUsers={false} room={room} />,
|
||||
withClientContextRenderOptions(MatrixClientPeg.get()!),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue