mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 12:54:39 +00:00
Update all non-major dependencies (#29194)
* Update all non-major dependencies * Delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Prettier 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:
@@ -7,10 +7,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { Room, RoomMember, RoomType } from "matrix-js-sdk/src/matrix";
|
||||
import { type Room, type RoomMember, RoomType } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { avatarUrlForRoom } from "../../src/Avatar";
|
||||
import { Media, mediaFromMxc } from "../../src/customisations/Media";
|
||||
import { type Media, mediaFromMxc } from "../../src/customisations/Media";
|
||||
import DMRoomMap from "../../src/utils/DMRoomMap";
|
||||
|
||||
jest.mock("../../src/customisations/Media", () => ({
|
||||
|
||||
@@ -7,10 +7,15 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { ISendEventResponse, MatrixClient, RelationType, UploadResponse } from "matrix-js-sdk/src/matrix";
|
||||
import { ImageInfo } from "matrix-js-sdk/src/types";
|
||||
import {
|
||||
type ISendEventResponse,
|
||||
type MatrixClient,
|
||||
RelationType,
|
||||
type UploadResponse,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { type ImageInfo } from "matrix-js-sdk/src/types";
|
||||
import { defer } from "matrix-js-sdk/src/utils";
|
||||
import encrypt, { IEncryptedFile } from "matrix-encrypt-attachment";
|
||||
import encrypt, { type IEncryptedFile } from "matrix-encrypt-attachment";
|
||||
|
||||
import ContentMessages, { UploadCanceledError, uploadFile } from "../../src/ContentMessages";
|
||||
import { doMaybeLocalRoomAction } from "../../src/utils/local-room";
|
||||
|
||||
@@ -5,13 +5,18 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked, Mocked, MockedObject } from "jest-mock";
|
||||
import { HttpApiEvent, MatrixClient, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, type Mocked, type MockedObject } from "jest-mock";
|
||||
import { HttpApiEvent, type MatrixClient, type MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { decryptExistingEvent, mkDecryptionFailureMatrixEvent } from "matrix-js-sdk/src/testing";
|
||||
import { CryptoApi, DecryptionFailureCode, UserVerificationStatus, CryptoEvent } from "matrix-js-sdk/src/crypto-api";
|
||||
import {
|
||||
type CryptoApi,
|
||||
DecryptionFailureCode,
|
||||
UserVerificationStatus,
|
||||
CryptoEvent,
|
||||
} from "matrix-js-sdk/src/crypto-api";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
|
||||
import { DecryptionFailureTracker, ErrorProperties } from "../../src/DecryptionFailureTracker";
|
||||
import { DecryptionFailureTracker, type ErrorProperties } from "../../src/DecryptionFailureTracker";
|
||||
import { stubClient } from "../test-utils";
|
||||
import * as Lifecycle from "../../src/Lifecycle";
|
||||
|
||||
|
||||
@@ -6,17 +6,17 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { Mocked, mocked } from "jest-mock";
|
||||
import { MatrixEvent, Room, MatrixClient, Device, ClientStoppedError } from "matrix-js-sdk/src/matrix";
|
||||
import { type Mocked, mocked } from "jest-mock";
|
||||
import { MatrixEvent, type Room, type MatrixClient, Device, ClientStoppedError } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import {
|
||||
CryptoEvent,
|
||||
CrossSigningStatus,
|
||||
CryptoApi,
|
||||
type CrossSigningStatus,
|
||||
type CryptoApi,
|
||||
DeviceVerificationStatus,
|
||||
KeyBackupInfo,
|
||||
type KeyBackupInfo,
|
||||
} from "matrix-js-sdk/src/crypto-api";
|
||||
import { CryptoSessionStateChange } from "@matrix-org/analytics-events/types/typescript/CryptoSessionStateChange";
|
||||
import { type CryptoSessionStateChange } from "@matrix-org/analytics-events/types/typescript/CryptoSessionStateChange";
|
||||
|
||||
import DeviceListener from "../../src/DeviceListener";
|
||||
import { MatrixClientPeg } from "../../src/MatrixClientPeg";
|
||||
|
||||
@@ -6,10 +6,10 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ReactElement } from "react";
|
||||
import React, { type ReactElement } from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { render, screen } from "jest-matrix-react";
|
||||
import { IContent } from "matrix-js-sdk/src/matrix";
|
||||
import { type IContent } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { bodyToSpan, formatEmojis, topicToHtml } from "../../src/HtmlUtils";
|
||||
import SettingsStore from "../../src/settings/SettingsStore";
|
||||
|
||||
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { isKeyComboMatch, KeyCombo } from "../../src/KeyBindingsManager";
|
||||
import { isKeyComboMatch, type KeyCombo } from "../../src/KeyBindingsManager";
|
||||
|
||||
function mockKeyEvent(
|
||||
key: string,
|
||||
|
||||
@@ -7,11 +7,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import {
|
||||
IProtocol,
|
||||
type IProtocol,
|
||||
LOCAL_NOTIFICATION_SETTINGS_PREFIX,
|
||||
MatrixEvent,
|
||||
PushRuleKind,
|
||||
Room,
|
||||
type Room,
|
||||
RuleId,
|
||||
TweakName,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
@@ -11,7 +11,7 @@ import { logger } from "matrix-js-sdk/src/logger";
|
||||
import * as MatrixJs from "matrix-js-sdk/src/matrix";
|
||||
import { decodeBase64, encodeUnpaddedBase64 } from "matrix-js-sdk/src/matrix";
|
||||
import * as encryptAESSecretStorageItemModule from "matrix-js-sdk/src/utils/encryptAESSecretStorageItem";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
|
||||
import StorageEvictedDialog from "../../src/components/views/dialogs/StorageEvictedDialog";
|
||||
|
||||
@@ -10,7 +10,7 @@ import { logger } from "matrix-js-sdk/src/logger";
|
||||
import fetchMockJest from "fetch-mock-jest";
|
||||
|
||||
import { advanceDateAndTime, stubClient } from "../test-utils";
|
||||
import { IMatrixClientPeg, MatrixClientPeg as peg } from "../../src/MatrixClientPeg";
|
||||
import { type IMatrixClientPeg, MatrixClientPeg as peg } from "../../src/MatrixClientPeg";
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
|
||||
@@ -5,23 +5,23 @@ Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import {
|
||||
ClientEvent,
|
||||
MatrixClient,
|
||||
type MatrixClient,
|
||||
Room,
|
||||
RoomEvent,
|
||||
EventType,
|
||||
MsgType,
|
||||
IContent,
|
||||
type IContent,
|
||||
MatrixEvent,
|
||||
SyncState,
|
||||
AccountDataEvents,
|
||||
type AccountDataEvents,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { waitFor } from "jest-matrix-react";
|
||||
import { CallMembership, MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc";
|
||||
|
||||
import BasePlatform from "../../src/BasePlatform";
|
||||
import type BasePlatform from "../../src/BasePlatform";
|
||||
import Notifier from "../../src/Notifier";
|
||||
import SettingsStore from "../../src/settings/SettingsStore";
|
||||
import ToastStore from "../../src/stores/ToastStore";
|
||||
@@ -42,7 +42,7 @@ import UserActivity from "../../src/UserActivity";
|
||||
import Modal from "../../src/Modal";
|
||||
import { mkThread } from "../test-utils/threads";
|
||||
import dis from "../../src/dispatcher/dispatcher";
|
||||
import { ThreadPayload } from "../../src/dispatcher/payloads/ThreadPayload";
|
||||
import { type ThreadPayload } from "../../src/dispatcher/payloads/ThreadPayload";
|
||||
import { Action } from "../../src/dispatcher/actions";
|
||||
import { addReplyToMessageContent } from "../../src/utils/Reply";
|
||||
|
||||
|
||||
@@ -7,11 +7,16 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { PostHog } from "posthog-js";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type PostHog } from "posthog-js";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import { Anonymity, getRedactedCurrentLocation, IPosthogEvent, PosthogAnalytics } from "../../src/PosthogAnalytics";
|
||||
import {
|
||||
Anonymity,
|
||||
getRedactedCurrentLocation,
|
||||
type IPosthogEvent,
|
||||
PosthogAnalytics,
|
||||
} from "../../src/PosthogAnalytics";
|
||||
import SdkConfig from "../../src/SdkConfig";
|
||||
import { getMockClientWithEventEmitter } from "../test-utils";
|
||||
import SettingsStore from "../../src/settings/SettingsStore";
|
||||
|
||||
@@ -14,12 +14,12 @@ import {
|
||||
Room,
|
||||
EventStatus,
|
||||
EventType,
|
||||
MatrixEvent,
|
||||
type MatrixEvent,
|
||||
PendingEventOrdering,
|
||||
type MatrixClient,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
|
||||
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { mkEvent, mkRoom, mkRoomMember, muteRoom, stubClient, upsertRoomStateEvents } from "../test-utils";
|
||||
import {
|
||||
getRoomNotifsState,
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { EventType, MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { EventType, type MatrixClient, type MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { setDMRoom } from "../../src/Rooms";
|
||||
import { mkEvent, stubClient } from "../test-utils";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import ScalarAuthClient from "../../src/ScalarAuthClient";
|
||||
import { stubClient } from "../test-utils";
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import { mocked } from "jest-mock";
|
||||
import { act } from "react";
|
||||
import { Crypto } from "@peculiar/webcrypto";
|
||||
import { CryptoApi, deriveRecoveryKeyFromPassphrase } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type CryptoApi, deriveRecoveryKeyFromPassphrase } from "matrix-js-sdk/src/crypto-api";
|
||||
import { SecretStorage } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { accessSecretStorage, crossSigningCallbacks } from "../../src/SecurityManager";
|
||||
@@ -17,7 +17,7 @@ import { filterConsole, stubClient } from "../test-utils";
|
||||
import Modal from "../../src/Modal.tsx";
|
||||
import {
|
||||
default as AccessSecretStorageDialog,
|
||||
KeyParams,
|
||||
type KeyParams,
|
||||
} from "../../src/components/views/dialogs/security/AccessSecretStorageDialog.tsx";
|
||||
|
||||
jest.mock("react", () => {
|
||||
|
||||
@@ -6,11 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { MatrixClient, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import { mocked } from "jest-mock";
|
||||
|
||||
import { Command, Commands, getCommand } from "../../src/SlashCommands";
|
||||
import { type Command, Commands, getCommand } from "../../src/SlashCommands";
|
||||
import { createTestClient } from "../test-utils";
|
||||
import { LocalRoom, LOCAL_ROOM_ID_PREFIX } from "../../src/models/LocalRoom";
|
||||
import SettingsStore from "../../src/settings/SettingsStore";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { SlidingSync } from "matrix-js-sdk/src/sliding-sync";
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import fetchMockJest from "fetch-mock-jest";
|
||||
|
||||
import { SlidingSyncManager } from "../../src/SlidingSyncManager";
|
||||
|
||||
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { EventType, MatrixEvent, Policy, SERVICE_TYPES, Terms } from "matrix-js-sdk/src/matrix";
|
||||
import { EventType, MatrixEvent, type Policy, SERVICE_TYPES, type Terms } from "matrix-js-sdk/src/matrix";
|
||||
import { screen, within } from "jest-matrix-react";
|
||||
|
||||
import { dialogTermsInteractionCallback, Service, startTermsFlow } from "../../src/Terms";
|
||||
|
||||
@@ -7,15 +7,15 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { SdkContextClass } from "../../src/contexts/SDKContext";
|
||||
import { PosthogAnalytics } from "../../src/PosthogAnalytics";
|
||||
import { SlidingSyncManager } from "../../src/SlidingSyncManager";
|
||||
import { RoomNotificationStateStore } from "../../src/stores/notifications/RoomNotificationStateStore";
|
||||
import RightPanelStore from "../../src/stores/right-panel/RightPanelStore";
|
||||
import { RoomViewStore } from "../../src/stores/RoomViewStore";
|
||||
import { SpaceStoreClass } from "../../src/stores/spaces/SpaceStore";
|
||||
import { WidgetLayoutStore } from "../../src/stores/widgets/WidgetLayoutStore";
|
||||
import { WidgetPermissionStore } from "../../src/stores/widgets/WidgetPermissionStore";
|
||||
import WidgetStore from "../../src/stores/WidgetStore";
|
||||
import { type PosthogAnalytics } from "../../src/PosthogAnalytics";
|
||||
import { type SlidingSyncManager } from "../../src/SlidingSyncManager";
|
||||
import { type RoomNotificationStateStore } from "../../src/stores/notifications/RoomNotificationStateStore";
|
||||
import type RightPanelStore from "../../src/stores/right-panel/RightPanelStore";
|
||||
import { type RoomViewStore } from "../../src/stores/RoomViewStore";
|
||||
import { type SpaceStoreClass } from "../../src/stores/spaces/SpaceStore";
|
||||
import { type WidgetLayoutStore } from "../../src/stores/widgets/WidgetLayoutStore";
|
||||
import { type WidgetPermissionStore } from "../../src/stores/widgets/WidgetPermissionStore";
|
||||
import type WidgetStore from "../../src/stores/WidgetStore";
|
||||
|
||||
/**
|
||||
* A class which provides the same API as SdkContextClass but adds additional unsafe setters which can
|
||||
|
||||
@@ -10,16 +10,16 @@ import {
|
||||
EventType,
|
||||
HistoryVisibility,
|
||||
JoinRule,
|
||||
MatrixClient,
|
||||
type MatrixClient,
|
||||
MatrixEvent,
|
||||
MRoomTopicEventContent,
|
||||
type MRoomTopicEventContent,
|
||||
Room,
|
||||
RoomMember,
|
||||
type RoomMember,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import { render } from "jest-matrix-react";
|
||||
import { ReactElement } from "react";
|
||||
import { Mocked, mocked } from "jest-mock";
|
||||
import { type ReactElement } from "react";
|
||||
import { type Mocked, mocked } from "jest-mock";
|
||||
|
||||
import { textForEvent } from "../../src/TextForEvent";
|
||||
import SettingsStore from "../../src/settings/SettingsStore";
|
||||
|
||||
@@ -6,12 +6,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { HTMLAttributes } from "react";
|
||||
import React, { type HTMLAttributes } from "react";
|
||||
import { act, render } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import {
|
||||
IState,
|
||||
type IState,
|
||||
reducer,
|
||||
RovingTabIndexProvider,
|
||||
RovingTabIndexWrapper,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { render, screen, act } from "jest-matrix-react";
|
||||
import { waitFor } from "@testing-library/dom";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
@@ -7,11 +7,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { UploadOpts, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { EncryptedFile } from "matrix-js-sdk/src/types";
|
||||
import { type UploadOpts, type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type EncryptedFile } from "matrix-js-sdk/src/types";
|
||||
|
||||
import { createVoiceMessageRecording, VoiceMessageRecording } from "../../../src/audio/VoiceMessageRecording";
|
||||
import { RecordingState, VoiceRecording } from "../../../src/audio/VoiceRecording";
|
||||
import { RecordingState, type VoiceRecording } from "../../../src/audio/VoiceRecording";
|
||||
import { uploadFile } from "../../../src/ContentMessages";
|
||||
import { stubClient } from "../../test-utils";
|
||||
import { Playback } from "../../../src/audio/Playback";
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, type Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import RoomProvider from "../../../src/autocomplete/RoomProvider";
|
||||
import SettingsStore from "../../../src/settings/SettingsStore";
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, type Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import SpaceProvider from "../../../src/autocomplete/SpaceProvider";
|
||||
import SettingsStore from "../../../src/settings/SettingsStore";
|
||||
|
||||
@@ -10,8 +10,8 @@ import React from "react";
|
||||
import { screen, render, fireEvent, waitFor, within, act } from "jest-matrix-react";
|
||||
|
||||
import * as TestUtils from "../../../test-utils";
|
||||
import AutocompleteProvider from "../../../../src/autocomplete/AutocompleteProvider";
|
||||
import { ICompletion } from "../../../../src/autocomplete/Autocompleter";
|
||||
import type AutocompleteProvider from "../../../../src/autocomplete/AutocompleteProvider";
|
||||
import { type ICompletion } from "../../../../src/autocomplete/Autocompleter";
|
||||
import { AutocompleteInput } from "../../../../src/components/structures/AutocompleteInput";
|
||||
|
||||
describe("AutocompleteInput", () => {
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render, RenderResult, screen } from "jest-matrix-react";
|
||||
import { render, type RenderResult, screen } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
|
||||
import LeftPanel from "../../../../src/components/structures/LeftPanel";
|
||||
|
||||
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { MatrixClient, MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, type MatrixEvent, EventType } from "matrix-js-sdk/src/matrix";
|
||||
import { CallState } from "matrix-js-sdk/src/webrtc/call";
|
||||
|
||||
import { stubClient } from "../../../test-utils";
|
||||
|
||||
@@ -7,8 +7,15 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render, RenderResult } from "jest-matrix-react";
|
||||
import { ConditionKind, EventType, IPushRule, MatrixEvent, ClientEvent, PushRuleKind } from "matrix-js-sdk/src/matrix";
|
||||
import { render, type RenderResult } from "jest-matrix-react";
|
||||
import {
|
||||
ConditionKind,
|
||||
EventType,
|
||||
type IPushRule,
|
||||
MatrixEvent,
|
||||
ClientEvent,
|
||||
PushRuleKind,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
@@ -10,18 +10,18 @@ Please see LICENSE files in the repository root for full details.
|
||||
// https://github.com/dumbmatter/fakeIndexedDB?tab=readme-ov-file#jsdom-often-used-with-jest
|
||||
import "core-js/stable/structured-clone";
|
||||
import "fake-indexeddb/auto";
|
||||
import React, { ComponentProps } from "react";
|
||||
import { fireEvent, render, RenderResult, screen, waitFor, within, act } from "jest-matrix-react";
|
||||
import React, { type ComponentProps } from "react";
|
||||
import { fireEvent, render, type RenderResult, screen, waitFor, within, act } from "jest-matrix-react";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
import { Mocked, mocked } from "jest-mock";
|
||||
import { ClientEvent, MatrixClient, MatrixEvent, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||
import { type Mocked, mocked } from "jest-mock";
|
||||
import { ClientEvent, type MatrixClient, MatrixEvent, Room, SyncState } from "matrix-js-sdk/src/matrix";
|
||||
import { type MediaHandler } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||
import * as MatrixJs from "matrix-js-sdk/src/matrix";
|
||||
import { completeAuthorizationCodeGrant } from "matrix-js-sdk/src/oidc/authorize";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { OidcError } from "matrix-js-sdk/src/oidc/error";
|
||||
import { BearerTokenResponse } from "matrix-js-sdk/src/oidc/validate";
|
||||
import { defer, IDeferred, sleep } from "matrix-js-sdk/src/utils";
|
||||
import { type BearerTokenResponse } from "matrix-js-sdk/src/oidc/validate";
|
||||
import { defer, type IDeferred, sleep } from "matrix-js-sdk/src/utils";
|
||||
import { CryptoEvent, UserVerificationStatus } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import MatrixChat from "../../../../src/components/structures/MatrixChat";
|
||||
@@ -46,7 +46,7 @@ import * as leaveRoomUtils from "../../../../src/utils/leave-behaviour";
|
||||
import { OidcClientError } from "../../../../src/utils/oidc/error";
|
||||
import LegacyCallHandler from "../../../../src/LegacyCallHandler";
|
||||
import { CallStore } from "../../../../src/stores/CallStore";
|
||||
import { Call } from "../../../../src/models/Call";
|
||||
import { type Call } from "../../../../src/models/Call";
|
||||
import { PosthogAnalytics } from "../../../../src/PosthogAnalytics";
|
||||
import PlatformPeg from "../../../../src/PlatformPeg";
|
||||
import EventIndexPeg from "../../../../src/indexing/EventIndexPeg";
|
||||
@@ -60,7 +60,7 @@ import { ReleaseAnnouncementStore } from "../../../../src/stores/ReleaseAnnounce
|
||||
import { DRAFT_LAST_CLEANUP_KEY } from "../../../../src/DraftCleaner";
|
||||
import { UIFeature } from "../../../../src/settings/UIFeature";
|
||||
import AutoDiscoveryUtils from "../../../../src/utils/AutoDiscoveryUtils";
|
||||
import { ValidatedServerConfig } from "../../../../src/utils/ValidatedServerConfig";
|
||||
import { type ValidatedServerConfig } from "../../../../src/utils/ValidatedServerConfig";
|
||||
import Modal from "../../../../src/Modal.tsx";
|
||||
|
||||
jest.mock("matrix-js-sdk/src/oidc/authorize", () => ({
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { act, render } from "jest-matrix-react";
|
||||
import React, { useContext } from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoEvent, UserVerificationStatus } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import MatrixClientContext from "../../../../src/contexts/MatrixClientContext";
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { EventEmitter } from "events";
|
||||
import { MatrixEvent, Room, RoomMember, Thread, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixEvent, Room, RoomMember, type Thread, ReceiptType } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import { render } from "jest-matrix-react";
|
||||
|
||||
@@ -27,8 +27,8 @@ import {
|
||||
mockClientMethodsEvents,
|
||||
mockClientMethodsUser,
|
||||
} from "../../../test-utils";
|
||||
import ResizeNotifier from "../../../../src/utils/ResizeNotifier";
|
||||
import { IRoomState } from "../../../../src/components/structures/RoomView";
|
||||
import type ResizeNotifier from "../../../../src/utils/ResizeNotifier";
|
||||
import { type IRoomState } from "../../../../src/components/structures/RoomView";
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
import { ScopedRoomContextProvider } from "../../../../src/contexts/ScopedRoomContext.tsx";
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { MouseEventHandler } from "react";
|
||||
import { screen, render, RenderResult } from "jest-matrix-react";
|
||||
import React, { type MouseEventHandler } from "react";
|
||||
import { screen, render, type RenderResult } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import PictureInPictureDragger, {
|
||||
CreatePipChildren,
|
||||
type CreatePipChildren,
|
||||
} from "../../../../src/components/structures/PictureInPictureDragger";
|
||||
|
||||
describe("PictureInPictureDragger", () => {
|
||||
|
||||
@@ -7,14 +7,19 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { mocked, type Mocked } from "jest-mock";
|
||||
import { screen, render, act, cleanup } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { MatrixClient, PendingEventOrdering, Room, RoomStateEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { Widget, ClientWidgetApi } from "matrix-widget-api";
|
||||
import { UserEvent } from "@testing-library/user-event/dist/types/setup/setup";
|
||||
import {
|
||||
type MatrixClient,
|
||||
PendingEventOrdering,
|
||||
Room,
|
||||
RoomStateEvent,
|
||||
type RoomMember,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { Widget, type ClientWidgetApi } from "matrix-widget-api";
|
||||
import { type UserEvent } from "@testing-library/user-event/dist/types/setup/setup";
|
||||
|
||||
import type { RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import {
|
||||
useMockedCalls,
|
||||
MockedCall,
|
||||
@@ -36,7 +41,7 @@ import ActiveWidgetStore from "../../../../src/stores/ActiveWidgetStore";
|
||||
import DMRoomMap from "../../../../src/utils/DMRoomMap";
|
||||
import defaultDispatcher from "../../../../src/dispatcher/dispatcher";
|
||||
import { Action } from "../../../../src/dispatcher/actions";
|
||||
import { ViewRoomPayload } from "../../../../src/dispatcher/payloads/ViewRoomPayload";
|
||||
import { type ViewRoomPayload } from "../../../../src/dispatcher/payloads/ViewRoomPayload";
|
||||
import { TestSdkContext } from "../../TestSdkContext";
|
||||
import { RoomViewStore } from "../../../../src/stores/RoomViewStore";
|
||||
import { Container, WidgetLayoutStore } from "../../../../src/stores/widgets/WidgetLayoutStore";
|
||||
|
||||
@@ -8,8 +8,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { render, screen, waitFor } from "jest-matrix-react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import _RightPanel from "../../../../src/components/structures/RightPanel";
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
|
||||
@@ -11,12 +11,12 @@ import { mocked } from "jest-mock";
|
||||
import { render, screen } from "jest-matrix-react";
|
||||
import {
|
||||
Room,
|
||||
MatrixClient,
|
||||
IEvent,
|
||||
type MatrixClient,
|
||||
type IEvent,
|
||||
MatrixEvent,
|
||||
EventType,
|
||||
SearchResult,
|
||||
ISearchResults,
|
||||
type ISearchResults,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { defer } from "matrix-js-sdk/src/utils";
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { render } from "jest-matrix-react";
|
||||
import {
|
||||
MatrixClient,
|
||||
type MatrixClient,
|
||||
PendingEventOrdering,
|
||||
EventStatus,
|
||||
MatrixEvent,
|
||||
type MatrixEvent,
|
||||
Room,
|
||||
MatrixError,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
@@ -6,15 +6,15 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { createRef, RefObject } from "react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import React, { createRef, type RefObject } from "react";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import {
|
||||
ClientEvent,
|
||||
EventTimeline,
|
||||
EventType,
|
||||
IEvent,
|
||||
type IEvent,
|
||||
JoinRule,
|
||||
MatrixClient,
|
||||
type MatrixClient,
|
||||
MatrixError,
|
||||
MatrixEvent,
|
||||
Room,
|
||||
@@ -22,13 +22,13 @@ import {
|
||||
RoomStateEvent,
|
||||
SearchResult,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoApi, UserVerificationStatus, CryptoEvent } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type CryptoApi, UserVerificationStatus, CryptoEvent } from "matrix-js-sdk/src/crypto-api";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import {
|
||||
fireEvent,
|
||||
render,
|
||||
screen,
|
||||
RenderResult,
|
||||
type RenderResult,
|
||||
waitForElementToBeRemoved,
|
||||
waitFor,
|
||||
act,
|
||||
@@ -54,7 +54,7 @@ import {
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
import { Action } from "../../../../src/dispatcher/actions";
|
||||
import defaultDispatcher from "../../../../src/dispatcher/dispatcher";
|
||||
import { ViewRoomPayload } from "../../../../src/dispatcher/payloads/ViewRoomPayload";
|
||||
import { type ViewRoomPayload } from "../../../../src/dispatcher/payloads/ViewRoomPayload";
|
||||
import { RoomView } from "../../../../src/components/structures/RoomView";
|
||||
import ResizeNotifier from "../../../../src/utils/ResizeNotifier";
|
||||
import SettingsStore from "../../../../src/settings/SettingsStore";
|
||||
@@ -62,7 +62,7 @@ import { SettingLevel } from "../../../../src/settings/SettingLevel";
|
||||
import DMRoomMap from "../../../../src/utils/DMRoomMap";
|
||||
import { NotificationState } from "../../../../src/stores/notifications/NotificationState";
|
||||
import { RightPanelPhases } from "../../../../src/stores/right-panel/RightPanelStorePhases";
|
||||
import { LocalRoom, LocalRoomState } from "../../../../src/models/LocalRoom";
|
||||
import { type LocalRoom, LocalRoomState } from "../../../../src/models/LocalRoom";
|
||||
import { DirectoryMember } from "../../../../src/utils/direct-messages";
|
||||
import { createDmLocalRoom } from "../../../../src/utils/dm/createDmLocalRoom";
|
||||
import { UPDATE_EVENT } from "../../../../src/stores/AsyncStore";
|
||||
@@ -71,11 +71,11 @@ import VoipUserMapper from "../../../../src/VoipUserMapper";
|
||||
import WidgetUtils from "../../../../src/utils/WidgetUtils";
|
||||
import { WidgetType } from "../../../../src/widgets/WidgetType";
|
||||
import WidgetStore from "../../../../src/stores/WidgetStore";
|
||||
import { ViewRoomErrorPayload } from "../../../../src/dispatcher/payloads/ViewRoomErrorPayload";
|
||||
import { type ViewRoomErrorPayload } from "../../../../src/dispatcher/payloads/ViewRoomErrorPayload";
|
||||
import { SearchScope } from "../../../../src/Searching";
|
||||
import { MEGOLM_ENCRYPTION_ALGORITHM } from "../../../../src/utils/crypto";
|
||||
import MatrixClientContext from "../../../../src/contexts/MatrixClientContext";
|
||||
import { ViewUserPayload } from "../../../../src/dispatcher/payloads/ViewUserPayload.ts";
|
||||
import { type ViewUserPayload } from "../../../../src/dispatcher/payloads/ViewUserPayload.ts";
|
||||
|
||||
describe("RoomView", () => {
|
||||
let cli: MockedObject<MatrixClient>;
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { fireEvent, render, screen, waitFor, waitForElementToBeRemoved } from "jest-matrix-react";
|
||||
import { HierarchyRoom, JoinRule, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type HierarchyRoom, JoinRule, type MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import { RoomHierarchy } from "matrix-js-sdk/src/room-hierarchy";
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import { type MatrixClient, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { render, cleanup, screen, fireEvent } from "jest-matrix-react";
|
||||
|
||||
import { stubClient, mockPlatformPeg, unmockPlatformPeg, withClientContextRenderOptions } from "../../../test-utils";
|
||||
|
||||
@@ -10,7 +10,7 @@ import React from "react";
|
||||
import { act, fireEvent, render } from "jest-matrix-react";
|
||||
|
||||
import TabbedView, { Tab, TabLocation } from "../../../../src/components/structures/TabbedView";
|
||||
import { NonEmptyArray } from "../../../../src/@types/common";
|
||||
import { type NonEmptyArray } from "../../../../src/@types/common";
|
||||
import { _t } from "../../../../src/languageHandler";
|
||||
|
||||
describe("<TabbedView />", () => {
|
||||
|
||||
@@ -10,8 +10,8 @@ import React from "react";
|
||||
import { render, screen, fireEvent, waitFor, getByRole } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import {
|
||||
MatrixClient,
|
||||
MatrixEvent,
|
||||
type MatrixClient,
|
||||
type MatrixEvent,
|
||||
PendingEventOrdering,
|
||||
Room,
|
||||
FeatureSupport,
|
||||
@@ -26,7 +26,7 @@ import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalink
|
||||
import ResizeNotifier from "../../../../src/utils/ResizeNotifier";
|
||||
import { createTestClient, getRoomContext, mkRoom, mockPlatformPeg, stubClient } from "../../../test-utils";
|
||||
import { mkThread } from "../../../test-utils/threads";
|
||||
import { IRoomState } from "../../../../src/components/structures/RoomView";
|
||||
import { type IRoomState } from "../../../../src/components/structures/RoomView";
|
||||
import { ScopedRoomContextProvider } from "../../../../src/contexts/ScopedRoomContext.tsx";
|
||||
|
||||
jest.mock("../../../../src/utils/Feedback");
|
||||
|
||||
@@ -6,16 +6,16 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { act, getByTestId, render, RenderResult, waitFor } from "jest-matrix-react";
|
||||
import { act, getByTestId, render, type RenderResult, waitFor } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { mocked } from "jest-mock";
|
||||
import {
|
||||
MsgType,
|
||||
RelationType,
|
||||
EventStatus,
|
||||
MatrixEvent,
|
||||
type MatrixEvent,
|
||||
Room,
|
||||
MatrixClient,
|
||||
type MatrixClient,
|
||||
PendingEventOrdering,
|
||||
THREAD_RELATION_TYPE,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
ReceiptType,
|
||||
EventTimelineSet,
|
||||
EventType,
|
||||
MatrixClient,
|
||||
type MatrixClient,
|
||||
MatrixEvent,
|
||||
PendingEventOrdering,
|
||||
RelationType,
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import React from "react";
|
||||
import { Mocked, mocked } from "jest-mock";
|
||||
import { type Mocked, mocked } from "jest-mock";
|
||||
import { forEachRight } from "lodash";
|
||||
|
||||
import TimelinePanel from "../../../../src/components/structures/TimelinePanel";
|
||||
|
||||
@@ -8,8 +8,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { render, screen, waitFor } from "jest-matrix-react";
|
||||
import { DEVICE_CODE_SCOPE, MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
import { DEVICE_CODE_SCOPE, type MatrixClient, type Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
import { mocked } from "jest-mock";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { render, RenderResult, screen, waitFor, cleanup } from "jest-matrix-react";
|
||||
import { render, type RenderResult, screen, waitFor, cleanup } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { MatrixClient, createClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, createClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import ForgotPassword from "../../../../../src/components/structures/auth/ForgotPassword";
|
||||
import { ValidatedServerConfig } from "../../../../../src/utils/ValidatedServerConfig";
|
||||
import { type ValidatedServerConfig } from "../../../../../src/utils/ValidatedServerConfig";
|
||||
import { clearAllModals, filterConsole, stubClient, waitEnoughCyclesForModal } from "../../../../test-utils";
|
||||
import AutoDiscoveryUtils from "../../../../../src/utils/AutoDiscoveryUtils";
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, screen, waitForElementToBeRemoved } from "jest-matrix-react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
import { DELEGATED_OIDC_COMPATIBILITY, IdentityProviderBrand, OidcClientConfig } from "matrix-js-sdk/src/matrix";
|
||||
import { DELEGATED_OIDC_COMPATIBILITY, IdentityProviderBrand, type OidcClientConfig } from "matrix-js-sdk/src/matrix";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import * as Matrix from "matrix-js-sdk/src/matrix";
|
||||
import { OidcError } from "matrix-js-sdk/src/oidc/error";
|
||||
@@ -17,7 +17,7 @@ import { OidcError } from "matrix-js-sdk/src/oidc/error";
|
||||
import SdkConfig from "../../../../../src/SdkConfig";
|
||||
import { mkServerConfig, mockPlatformPeg, unmockPlatformPeg } from "../../../../test-utils";
|
||||
import Login from "../../../../../src/components/structures/auth/Login";
|
||||
import BasePlatform from "../../../../../src/BasePlatform";
|
||||
import type BasePlatform from "../../../../../src/BasePlatform";
|
||||
import SettingsStore from "../../../../../src/settings/SettingsStore";
|
||||
import * as registerClientUtils from "../../../../../src/utils/oidc/registerClient";
|
||||
import { makeDelegatedAuthConfig } from "../../../../test-utils/oidc";
|
||||
|
||||
@@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { act, render, RenderResult } from "jest-matrix-react";
|
||||
import React, { ComponentProps } from "react";
|
||||
import { act, render, type RenderResult } from "jest-matrix-react";
|
||||
import React, { type ComponentProps } from "react";
|
||||
import EventEmitter from "events";
|
||||
import { CryptoEvent } from "matrix-js-sdk/src/crypto-api";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
|
||||
@@ -9,8 +9,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, screen, waitFor, waitForElementToBeRemoved } from "jest-matrix-react";
|
||||
import { createClient, MatrixClient, MatrixError, OidcClientConfig } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { createClient, type MatrixClient, MatrixError, type OidcClientConfig } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import fetchMock from "fetch-mock-jest";
|
||||
|
||||
import SdkConfig, { DEFAULTS } from "../../../../../src/SdkConfig";
|
||||
|
||||
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { EmojiMapping } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type EmojiMapping } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import { tEmoji } from "../../../../src/components/views/verification/VerificationShowSas";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { fireEvent, render, RenderResult } from "jest-matrix-react";
|
||||
import { fireEvent, render, type RenderResult } from "jest-matrix-react";
|
||||
|
||||
import RecordingPlayback, {
|
||||
PlaybackLayout,
|
||||
@@ -18,7 +18,7 @@ import { Playback } from "../../../../../src/audio/Playback";
|
||||
import { TimelineRenderingType } from "../../../../../src/contexts/RoomContext";
|
||||
import { createAudioContext } from "../../../../../src/audio/compat";
|
||||
import { flushPromises } from "../../../../test-utils";
|
||||
import { IRoomState } from "../../../../../src/components/structures/RoomView";
|
||||
import { type IRoomState } from "../../../../../src/components/structures/RoomView";
|
||||
import { ScopedRoomContextProvider } from "../../../../../src/contexts/ScopedRoomContext.tsx";
|
||||
|
||||
jest.mock("../../../../../src/WorkerManager", () => ({
|
||||
|
||||
@@ -6,11 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { createRef, RefObject } from "react";
|
||||
import React, { createRef, type RefObject } from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { act, fireEvent, render, RenderResult } from "jest-matrix-react";
|
||||
import { act, fireEvent, render, type RenderResult } from "jest-matrix-react";
|
||||
|
||||
import { Playback } from "../../../../../src/audio/Playback";
|
||||
import { type Playback } from "../../../../../src/audio/Playback";
|
||||
import { createTestPlayback } from "../../../../test-utils/audio";
|
||||
import SeekBar from "../../../../../src/components/views/audio_messages/SeekBar";
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import React from "react";
|
||||
import { render, screen, waitFor, act, fireEvent } from "jest-matrix-react";
|
||||
import { AuthType } from "matrix-js-sdk/src/interactive-auth";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { Policy } from "matrix-js-sdk/src/matrix";
|
||||
import { type Policy } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import {
|
||||
EmailIdentityAuthEntry,
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, RenderResult } from "jest-matrix-react";
|
||||
import { fireEvent, render, type RenderResult } from "jest-matrix-react";
|
||||
|
||||
import InteractiveAuthComponent from "../../../../../src/components/structures/InteractiveAuth";
|
||||
import { flushPromises, getMockClientWithEventEmitter, unmockClientPeg } from "../../../../test-utils";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { render, waitFor } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { JoinRule, MatrixClient, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { JoinRule, type MatrixClient, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
||||
import React from "react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { getByTestId, render, waitFor } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, PendingEventOrdering, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import React, { ComponentProps } from "react";
|
||||
import { type MatrixClient, PendingEventOrdering, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import React, { type ComponentProps } from "react";
|
||||
|
||||
import MemberAvatar from "../../../../../src/components/views/avatars/MemberAvatar";
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { render } from "jest-matrix-react";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked } from "jest-mock";
|
||||
|
||||
import RoomAvatar from "../../../../../src/components/views/avatars/RoomAvatar";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { render, waitFor } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, PendingEventOrdering, Room, RoomMember, User } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, PendingEventOrdering, Room, RoomMember, User } from "matrix-js-sdk/src/matrix";
|
||||
import React from "react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { act, fireEvent, render } from "jest-matrix-react";
|
||||
import { Beacon, RoomMember, MatrixEvent, LocationAssetType } from "matrix-js-sdk/src/matrix";
|
||||
import { Beacon, RoomMember, type MatrixEvent, LocationAssetType } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import BeaconListItem from "../../../../../src/components/views/beacon/BeaconListItem";
|
||||
import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext";
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { act, render, screen, waitFor } from "jest-matrix-react";
|
||||
import * as maplibregl from "maplibre-gl";
|
||||
import { Beacon, Room, RoomMember, MatrixEvent, getBeaconInfoIdentifier } from "matrix-js-sdk/src/matrix";
|
||||
import { Beacon, type Room, RoomMember, type MatrixEvent, getBeaconInfoIdentifier } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import BeaconMarker from "../../../../../src/components/views/beacon/BeaconMarker";
|
||||
import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext";
|
||||
|
||||
@@ -7,8 +7,14 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { act, fireEvent, render, RenderResult, waitFor } from "jest-matrix-react";
|
||||
import { MatrixClient, MatrixEvent, Room, RoomMember, getBeaconInfoIdentifier } from "matrix-js-sdk/src/matrix";
|
||||
import { act, fireEvent, render, type RenderResult, waitFor } from "jest-matrix-react";
|
||||
import {
|
||||
type MatrixClient,
|
||||
type MatrixEvent,
|
||||
type Room,
|
||||
RoomMember,
|
||||
getBeaconInfoIdentifier,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import * as maplibregl from "maplibre-gl";
|
||||
import { mocked } from "jest-mock";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ComponentProps } from "react";
|
||||
import React, { type ComponentProps } from "react";
|
||||
import { act, fireEvent, render } from "jest-matrix-react";
|
||||
|
||||
import DialogSidebar from "../../../../../src/components/views/beacon/DialogSidebar";
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { act, fireEvent, render } from "jest-matrix-react";
|
||||
import { Beacon, BeaconIdentifier } from "matrix-js-sdk/src/matrix";
|
||||
import { Beacon, type BeaconIdentifier } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import LeftPanelLiveShareWarning from "../../../../../src/components/views/beacon/LeftPanelLiveShareWarning";
|
||||
import { OwnBeaconStore, OwnBeaconStoreEvent } from "../../../../../src/stores/OwnBeaconStore";
|
||||
|
||||
@@ -7,10 +7,16 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { Room, PendingEventOrdering, MatrixClient, RoomMember, RoomStateEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { ClientWidgetApi, Widget } from "matrix-widget-api";
|
||||
import {
|
||||
Room,
|
||||
PendingEventOrdering,
|
||||
type MatrixClient,
|
||||
type RoomMember,
|
||||
RoomStateEvent,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { type ClientWidgetApi, Widget } from "matrix-widget-api";
|
||||
import { act, cleanup, render, screen } from "jest-matrix-react";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { mocked, type Mocked } from "jest-mock";
|
||||
|
||||
import {
|
||||
mkRoomMember,
|
||||
|
||||
@@ -13,8 +13,8 @@ import { render, screen } from "jest-matrix-react";
|
||||
import { shouldShowFeedback } from "../../../../../src/utils/Feedback";
|
||||
import BetaCard from "../../../../../src/components/views/beta/BetaCard";
|
||||
import SettingsStore from "../../../../../src/settings/SettingsStore";
|
||||
import { TranslationKey } from "../../../../../src/languageHandler";
|
||||
import { FeatureSettingKey } from "../../../../../src/settings/Settings.tsx";
|
||||
import { type TranslationKey } from "../../../../../src/languageHandler";
|
||||
import { type FeatureSettingKey } from "../../../../../src/settings/Settings.tsx";
|
||||
|
||||
jest.mock("../../../../../src/utils/Feedback");
|
||||
jest.mock("../../../../../src/settings/SettingsStore");
|
||||
|
||||
@@ -7,13 +7,13 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, RenderResult, screen, waitFor } from "jest-matrix-react";
|
||||
import { fireEvent, render, type RenderResult, screen, waitFor } from "jest-matrix-react";
|
||||
import {
|
||||
EventStatus,
|
||||
MatrixEvent,
|
||||
Room,
|
||||
PendingEventOrdering,
|
||||
BeaconIdentifier,
|
||||
type BeaconIdentifier,
|
||||
Beacon,
|
||||
getBeaconInfoIdentifier,
|
||||
EventType,
|
||||
@@ -28,7 +28,7 @@ import userEvent from "@testing-library/user-event";
|
||||
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
import { TimelineRenderingType } from "../../../../../src/contexts/RoomContext";
|
||||
import { IRoomState } from "../../../../../src/components/structures/RoomView";
|
||||
import { type IRoomState } from "../../../../../src/components/structures/RoomView";
|
||||
import { canEditContent } from "../../../../../src/utils/EventUtils";
|
||||
import { copyPlaintext, getSelectedText } from "../../../../../src/utils/strings";
|
||||
import MessageContextMenu from "../../../../../src/components/views/context_menus/MessageContextMenu";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { fireEvent, getByLabelText, render, screen } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { ReceiptType, MatrixClient, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { ReceiptType, type MatrixClient, PendingEventOrdering, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import React from "react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
@@ -17,7 +17,7 @@ import { sleep } from "matrix-js-sdk/src/utils";
|
||||
import { ChevronFace } from "../../../../../src/components/structures/ContextMenu";
|
||||
import {
|
||||
RoomGeneralContextMenu,
|
||||
RoomGeneralContextMenuProps,
|
||||
type RoomGeneralContextMenuProps,
|
||||
} from "../../../../../src/components/views/context_menus/RoomGeneralContextMenu";
|
||||
import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext";
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
|
||||
@@ -7,9 +7,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { Mocked, mocked } from "jest-mock";
|
||||
import { prettyDOM, render, RenderResult, screen } from "jest-matrix-react";
|
||||
import { type MatrixClient, type Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type Mocked, mocked } from "jest-mock";
|
||||
import { prettyDOM, render, type RenderResult, screen } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import SpaceContextMenu from "../../../../../src/components/views/context_menus/SpaceContextMenu";
|
||||
|
||||
@@ -9,11 +9,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
import { getByTestId, render, screen } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { mocked } from "jest-mock";
|
||||
import { MatrixClient, PendingEventOrdering, MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, PendingEventOrdering, type MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
import React from "react";
|
||||
|
||||
import ThreadListContextMenu, {
|
||||
ThreadListContextMenuProps,
|
||||
type ThreadListContextMenuProps,
|
||||
} from "../../../../../src/components/views/context_menus/ThreadListContextMenu";
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
import { RoomPermalinkCreator } from "../../../../../src/utils/permalinks/Permalinks";
|
||||
|
||||
@@ -7,19 +7,19 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ComponentProps } from "react";
|
||||
import React, { type ComponentProps } from "react";
|
||||
import { screen, render } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixWidgetType } from "matrix-widget-api";
|
||||
import {
|
||||
ApprovalOpts,
|
||||
WidgetInfo,
|
||||
type ApprovalOpts,
|
||||
type WidgetInfo,
|
||||
WidgetLifecycle,
|
||||
} from "@matrix-org/react-sdk-module-api/lib/lifecycles/WidgetLifecycle";
|
||||
|
||||
import { WidgetContextMenu } from "../../../../../src/components/views/context_menus/WidgetContextMenu";
|
||||
import { IApp } from "../../../../../src/stores/WidgetStore";
|
||||
import { type IApp } from "../../../../../src/stores/WidgetStore";
|
||||
import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext";
|
||||
import WidgetUtils from "../../../../../src/utils/WidgetUtils";
|
||||
import { ModuleRunner } from "../../../../../src/modules/ModuleRunner";
|
||||
|
||||
@@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ComponentProps } from "react";
|
||||
import { SecretStorage, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import React, { type ComponentProps } from "react";
|
||||
import { type SecretStorage, type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { act, fireEvent, render, screen } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { getByText, render, RenderResult } from "jest-matrix-react";
|
||||
import { getByText, render, type RenderResult } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import React from "react";
|
||||
|
||||
import AskInviteAnywayDialog, {
|
||||
AskInviteAnywayDialogProps,
|
||||
type AskInviteAnywayDialogProps,
|
||||
} from "../../../../../src/components/views/dialogs/AskInviteAnywayDialog";
|
||||
import SettingsStore from "../../../../../src/settings/SettingsStore";
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import fetchMock from "fetch-mock-jest";
|
||||
import { render, screen, waitForElementToBeRemoved } from "jest-matrix-react";
|
||||
|
||||
import ChangelogDialog, {
|
||||
DevelopVersionString,
|
||||
type DevelopVersionString,
|
||||
parseVersion,
|
||||
} from "../../../../../src/components/views/dialogs/ChangelogDialog";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, type MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { screen, act } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { getByLabelText, getAllByLabelText, render } from "jest-matrix-react";
|
||||
import { Room, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { Room, type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import { stubClient } from "../../../../test-utils";
|
||||
|
||||
@@ -7,9 +7,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, RenderResult, waitFor } from "jest-matrix-react";
|
||||
import { fireEvent, render, type RenderResult, waitFor } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { Room } from "matrix-js-sdk/src/matrix";
|
||||
import { type Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import ExportDialog from "../../../../../src/components/views/dialogs/ExportDialog";
|
||||
import { ExportType, ExportFormat } from "../../../../../src/utils/exportUtils/exportUtils";
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
M_TIMESTAMP,
|
||||
M_TEXT,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { act, fireEvent, getByTestId, render, RenderResult, screen, waitFor } from "jest-matrix-react";
|
||||
import { act, fireEvent, getByTestId, render, type RenderResult, screen, waitFor } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import { act, render } from "jest-matrix-react";
|
||||
import React from "react";
|
||||
import { Mocked } from "jest-mock";
|
||||
import { type Mocked } from "jest-mock";
|
||||
import {
|
||||
EmojiMapping,
|
||||
ShowSasCallbacks,
|
||||
Verifier,
|
||||
type EmojiMapping,
|
||||
type ShowSasCallbacks,
|
||||
type Verifier,
|
||||
VerifierEvent,
|
||||
VerifierEventHandlerMap,
|
||||
type VerifierEventHandlerMap,
|
||||
} from "matrix-js-sdk/src/crypto-api";
|
||||
import { TypedEventEmitter } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { fireEvent, render, screen } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { RoomType, MatrixClient, MatrixError, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomType, type MatrixClient, MatrixError, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { mocked, type Mocked } from "jest-mock";
|
||||
|
||||
import InviteDialog from "../../../../../src/components/views/dialogs/InviteDialog";
|
||||
import { InviteKind } from "../../../../../src/components/views/dialogs/InviteDialogTypes";
|
||||
@@ -27,10 +27,10 @@ import {
|
||||
} from "../../../../test-utils";
|
||||
import DMRoomMap from "../../../../../src/utils/DMRoomMap";
|
||||
import SdkConfig from "../../../../../src/SdkConfig";
|
||||
import { ValidatedServerConfig } from "../../../../../src/utils/ValidatedServerConfig";
|
||||
import { IConfigOptions } from "../../../../../src/IConfigOptions";
|
||||
import { type ValidatedServerConfig } from "../../../../../src/utils/ValidatedServerConfig";
|
||||
import { type IConfigOptions } from "../../../../../src/IConfigOptions";
|
||||
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
|
||||
import { IProfileInfo } from "../../../../../src/hooks/useProfileInfo";
|
||||
import { type IProfileInfo } from "../../../../../src/hooks/useProfileInfo";
|
||||
import { DirectoryMember, startDmOnFirstMessage } from "../../../../../src/utils/direct-messages";
|
||||
import SettingsStore from "../../../../../src/settings/SettingsStore";
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoApi, KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
|
||||
import { fireEvent, render, RenderResult, screen } from "jest-matrix-react";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type CryptoApi, type KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
|
||||
import { fireEvent, render, type RenderResult, screen } from "jest-matrix-react";
|
||||
|
||||
import { filterConsole, getMockClientWithEventEmitter, mockClientMethodsCrypto } from "../../../../test-utils";
|
||||
import LogoutDialog from "../../../../../src/components/views/dialogs/LogoutDialog";
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render, RenderResult, waitForElementToBeRemoved } from "jest-matrix-react";
|
||||
import { render, type RenderResult, waitForElementToBeRemoved } from "jest-matrix-react";
|
||||
import { EventType, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
@@ -13,7 +13,7 @@ import fetchMock from "fetch-mock-jest";
|
||||
import ServerPickerDialog from "../../../../../src/components/views/dialogs/ServerPickerDialog";
|
||||
import SdkConfig from "../../../../../src/SdkConfig";
|
||||
import { flushPromises } from "../../../../test-utils";
|
||||
import { ValidatedServerConfig } from "../../../../../src/utils/ValidatedServerConfig";
|
||||
import { type ValidatedServerConfig } from "../../../../../src/utils/ValidatedServerConfig";
|
||||
|
||||
/** The matrix versions our mock server claims to support */
|
||||
const SERVER_SUPPORTED_MATRIX_VERSIONS = ["v1.1", "v1.5", "v1.6", "v1.8", "v1.9"];
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient, MatrixEvent, Room, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { render, screen, act } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { waitFor } from "@testing-library/dom";
|
||||
|
||||
@@ -10,11 +10,11 @@ import React from "react";
|
||||
import { mocked } from "jest-mock";
|
||||
import {
|
||||
ConnectionError,
|
||||
IProtocol,
|
||||
IPublicRoomsChunkRoom,
|
||||
type IProtocol,
|
||||
type IPublicRoomsChunkRoom,
|
||||
JoinRule,
|
||||
MatrixClient,
|
||||
Room,
|
||||
type MatrixClient,
|
||||
type Room,
|
||||
RoomMember,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership } from "matrix-js-sdk/src/types";
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { Device, MatrixClient, User } from "matrix-js-sdk/src/matrix";
|
||||
import { Device, type MatrixClient, User } from "matrix-js-sdk/src/matrix";
|
||||
import { render, screen } from "jest-matrix-react";
|
||||
|
||||
import { stubClient } from "../../../../test-utils";
|
||||
|
||||
@@ -6,12 +6,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ReactElement } from "react";
|
||||
import React, { type ReactElement } from "react";
|
||||
import { render, screen } from "jest-matrix-react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import SettingsStore, { CallbackFn } from "../../../../../src/settings/SettingsStore";
|
||||
import SettingsStore, { type CallbackFn } from "../../../../../src/settings/SettingsStore";
|
||||
import SdkConfig from "../../../../../src/SdkConfig";
|
||||
import { UserTab } from "../../../../../src/components/views/dialogs/UserTab";
|
||||
import UserSettingsDialog from "../../../../../src/components/views/dialogs/UserSettingsDialog";
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
import { UIFeature } from "../../../../../src/settings/UIFeature";
|
||||
import { SettingLevel } from "../../../../../src/settings/SettingLevel";
|
||||
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
|
||||
import { FeatureSettingKey } from "../../../../../src/settings/Settings.tsx";
|
||||
import { type FeatureSettingKey } from "../../../../../src/settings/Settings.tsx";
|
||||
|
||||
mockPlatformPeg({
|
||||
supportsSpellCheckSettings: jest.fn().mockReturnValue(false),
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { render, screen, waitFor } from "jest-matrix-react";
|
||||
import { KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import { createTestClient, withClientContextRenderOptions } from "../../../../../test-utils";
|
||||
import { Crypto } from "../../../../../../src/components/views/dialogs/devtools/Crypto";
|
||||
|
||||
+3
-3
@@ -6,11 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { render, RenderResult, screen } from "jest-matrix-react";
|
||||
import { render, type RenderResult, screen } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import React from "react";
|
||||
import { mocked, MockedObject } from "jest-mock";
|
||||
import { MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked, type MockedObject } from "jest-mock";
|
||||
import { type MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix";
|
||||
import { sleep } from "matrix-js-sdk/src/utils";
|
||||
|
||||
import { filterConsole, flushPromises, stubClient } from "../../../../../test-utils";
|
||||
|
||||
@@ -9,8 +9,8 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { screen, fireEvent, render, waitFor, act } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { IMegolmSessionData } from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type IMegolmSessionData } from "matrix-js-sdk/src/matrix";
|
||||
import { type CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import * as MegolmExportEncryption from "../../../../../../src/utils/MegolmExportEncryption";
|
||||
import ExportE2eKeysDialog from "../../../../../../src/async-components/views/dialogs/security/ExportE2eKeysDialog";
|
||||
|
||||
@@ -9,7 +9,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
import React from "react";
|
||||
import { fireEvent, render, waitFor } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type CryptoApi } from "matrix-js-sdk/src/crypto-api";
|
||||
|
||||
import ImportE2eKeysDialog from "../../../../../../src/async-components/views/dialogs/security/ImportE2eKeysDialog";
|
||||
import * as MegolmExportEncryption from "../../../../../../src/utils/MegolmExportEncryption";
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
import React from "react";
|
||||
import { screen, render, waitFor } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
|
||||
import { type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
|
||||
// Needed to be able to mock decodeRecoveryKey
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import * as recoveryKeyModule from "matrix-js-sdk/src/crypto-api/recovery-key";
|
||||
|
||||
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
import React from "react";
|
||||
import { render } from "jest-matrix-react";
|
||||
import { IPublicRoomsChunkRoom } from "matrix-js-sdk/src/matrix";
|
||||
import { type IPublicRoomsChunkRoom } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { PublicRoomResultDetails } from "../../../../../../src/components/views/dialogs/spotlight/PublicRoomResultDetails";
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render, screen, RenderResult } from "jest-matrix-react";
|
||||
import { render, screen, type RenderResult } from "jest-matrix-react";
|
||||
import { mocked } from "jest-mock";
|
||||
import { Room, MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
|
||||
import { Room, type MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { RoomResultContextMenus } from "../../../../../../src/components/views/dialogs/spotlight/RoomResultContextMenus";
|
||||
import { filterConsole, stubClient } from "../../../../../test-utils";
|
||||
|
||||
@@ -7,14 +7,14 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { Room, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { ClientWidgetApi, IWidget, MatrixWidgetType } from "matrix-widget-api";
|
||||
import { Optional } from "matrix-events-sdk";
|
||||
import { act, render, RenderResult, waitForElementToBeRemoved, waitFor } from "jest-matrix-react";
|
||||
import { Room, type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { type ClientWidgetApi, type IWidget, MatrixWidgetType } from "matrix-widget-api";
|
||||
import { type Optional } from "matrix-events-sdk";
|
||||
import { act, render, type RenderResult, waitForElementToBeRemoved, waitFor } from "jest-matrix-react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import {
|
||||
ApprovalOpts,
|
||||
WidgetInfo,
|
||||
type ApprovalOpts,
|
||||
type WidgetInfo,
|
||||
WidgetLifecycle,
|
||||
} from "@matrix-org/react-sdk-module-api/lib/lifecycles/WidgetLifecycle";
|
||||
|
||||
@@ -29,7 +29,7 @@ import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext
|
||||
import SettingsStore from "../../../../../src/settings/SettingsStore";
|
||||
import { RightPanelPhases } from "../../../../../src/stores/right-panel/RightPanelStorePhases";
|
||||
import RightPanelStore from "../../../../../src/stores/right-panel/RightPanelStore";
|
||||
import WidgetStore, { IApp } from "../../../../../src/stores/WidgetStore";
|
||||
import WidgetStore, { type IApp } from "../../../../../src/stores/WidgetStore";
|
||||
import ActiveWidgetStore from "../../../../../src/stores/ActiveWidgetStore";
|
||||
import AppTile from "../../../../../src/components/views/elements/AppTile";
|
||||
import { Container, WidgetLayoutStore } from "../../../../../src/stores/widgets/WidgetLayoutStore";
|
||||
|
||||
@@ -12,7 +12,7 @@ import userEvent from "@testing-library/user-event";
|
||||
|
||||
import DesktopCapturerSourcePicker from "../../../../../src/components/views/elements/DesktopCapturerSourcePicker";
|
||||
import PlatformPeg from "../../../../../src/PlatformPeg";
|
||||
import BasePlatform from "../../../../../src/BasePlatform";
|
||||
import type BasePlatform from "../../../../../src/BasePlatform";
|
||||
|
||||
const SOURCES = [
|
||||
{
|
||||
|
||||
@@ -6,10 +6,10 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
|
||||
Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React, { ComponentProps } from "react";
|
||||
import { render, RenderResult } from "jest-matrix-react";
|
||||
import { MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership, Membership } from "matrix-js-sdk/src/types";
|
||||
import React, { type ComponentProps } from "react";
|
||||
import { render, type RenderResult } from "jest-matrix-react";
|
||||
import { type MatrixEvent, RoomMember } from "matrix-js-sdk/src/matrix";
|
||||
import { KnownMembership, type Membership } from "matrix-js-sdk/src/types";
|
||||
|
||||
import {
|
||||
getMockClientWithEventEmitter,
|
||||
|
||||
@@ -7,13 +7,13 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { render, RenderResult, screen } from "jest-matrix-react";
|
||||
import { render, type RenderResult, screen } from "jest-matrix-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 { mocked, type Mocked } from "jest-mock";
|
||||
import { type MatrixClient, type MatrixEvent, Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import dis from "../../../../../src/dispatcher/dispatcher";
|
||||
import { Pill, PillProps, PillType } from "../../../../../src/components/views/elements/Pill";
|
||||
import { Pill, type PillProps, PillType } from "../../../../../src/components/views/elements/Pill";
|
||||
import {
|
||||
filterConsole,
|
||||
flushPromises,
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
} from "../../../../test-utils";
|
||||
import DMRoomMap from "../../../../../src/utils/DMRoomMap";
|
||||
import { Action } from "../../../../../src/dispatcher/actions";
|
||||
import { ButtonEvent } from "../../../../../src/components/views/elements/AccessibleButton";
|
||||
import { type ButtonEvent } from "../../../../../src/components/views/elements/AccessibleButton";
|
||||
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
|
||||
|
||||
describe("<Pill>", () => {
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, RenderResult } from "jest-matrix-react";
|
||||
import { fireEvent, render, type RenderResult } from "jest-matrix-react";
|
||||
import {
|
||||
Room,
|
||||
MatrixEvent,
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
M_TEXT,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { PollStartEvent } from "matrix-js-sdk/src/extensible_events_v1/PollStartEvent";
|
||||
import { ReplacementEvent } from "matrix-js-sdk/src/types";
|
||||
import { type ReplacementEvent } from "matrix-js-sdk/src/types";
|
||||
|
||||
import { getMockClientWithEventEmitter } from "../../../../test-utils";
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
|
||||
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { fireEvent, render, RenderResult } from "jest-matrix-react";
|
||||
import { fireEvent, render, type RenderResult } from "jest-matrix-react";
|
||||
|
||||
import StyledRadioGroup from "../../../../../src/components/views/elements/StyledRadioGroup";
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import { act, fireEvent, render, RenderResult } from "jest-matrix-react";
|
||||
import { act, fireEvent, render, type RenderResult } from "jest-matrix-react";
|
||||
import * as maplibregl from "maplibre-gl";
|
||||
import { RoomMember, MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomMember, type MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { mocked } from "jest-mock";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user