Update dependency @vector-im/compound-web to v2 (#12133)
* Update dependency @vector-im/compound-web to v2 * Update Tooltip props Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Include TooltipProvider in MatrixChat Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix pillify & tooltipify Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests to use TooltipProvider where necessary Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tooltips in Modals, ContextMenus, PersistedElements, Spoiler, HtmlExport Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tooltips in HTMLExport Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Don't pass mountAsChild to DOM Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * prettier Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stabilise test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
54b71140b8
commit
56d8ef3640
51 changed files with 293 additions and 221 deletions
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||
|
||||
import React, { ComponentProps } from "react";
|
||||
import { act, fireEvent, render } from "@testing-library/react";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
|
||||
import { FilteredDeviceList } from "../../../../../src/components/views/settings/devices/FilteredDeviceList";
|
||||
import { DeviceSecurityVariation } from "../../../../../src/components/views/settings/devices/types";
|
||||
|
@ -81,7 +82,11 @@ describe("<FilteredDeviceList />", () => {
|
|||
supportsMSC3881: true,
|
||||
};
|
||||
|
||||
const getComponent = (props = {}) => <FilteredDeviceList {...defaultProps} {...props} />;
|
||||
const getComponent = (props = {}) => (
|
||||
<TooltipProvider>
|
||||
<FilteredDeviceList {...defaultProps} {...props} />
|
||||
</TooltipProvider>
|
||||
);
|
||||
|
||||
afterAll(() => {
|
||||
jest.spyOn(global.Date, "now").mockRestore();
|
||||
|
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||
|
||||
import { fireEvent, render } from "@testing-library/react";
|
||||
import React from "react";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
|
||||
import FilteredDeviceListHeader from "../../../../../src/components/views/settings/devices/FilteredDeviceListHeader";
|
||||
|
||||
|
@ -27,7 +28,11 @@ describe("<FilteredDeviceListHeader />", () => {
|
|||
children: <div>test</div>,
|
||||
["data-testid"]: "test123",
|
||||
};
|
||||
const getComponent = (props = {}) => <FilteredDeviceListHeader {...defaultProps} {...props} />;
|
||||
const getComponent = (props = {}) => (
|
||||
<TooltipProvider>
|
||||
<FilteredDeviceListHeader {...defaultProps} {...props} />
|
||||
</TooltipProvider>
|
||||
);
|
||||
|
||||
it("renders correctly when no devices are selected", () => {
|
||||
const { container } = render(getComponent());
|
||||
|
|
|
@ -35,6 +35,7 @@ import {
|
|||
MatrixClient,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { TooltipProvider } from "@vector-im/compound-web";
|
||||
|
||||
import {
|
||||
clearAllModals,
|
||||
|
@ -97,9 +98,11 @@ describe("<SessionManagerTab />", () => {
|
|||
|
||||
const defaultProps = {};
|
||||
const getComponent = (props = {}): React.ReactElement => (
|
||||
<SDKContext.Provider value={sdkContext}>
|
||||
<SessionManagerTab {...defaultProps} {...props} />
|
||||
</SDKContext.Provider>
|
||||
<TooltipProvider>
|
||||
<SDKContext.Provider value={sdkContext}>
|
||||
<SessionManagerTab {...defaultProps} {...props} />
|
||||
</SDKContext.Provider>
|
||||
</TooltipProvider>
|
||||
);
|
||||
|
||||
const toggleDeviceDetails = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue