Switch to importing models/Room from main js-sdk export (#11361)
* Switch to importing TypedEventEmitter from main js-sdk export * Switch to importing js-sdk/matrix in cypress * Remove duplicated imports * Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess * Add lint rule * Switch to importing models/Room from main js-sdk export * Fix cypress-axe import * Fix more imports * Fix cypress-axe import * Fix duplicated lint rule
This commit is contained in:
parent
5ee8e61bf5
commit
e67ca33c4a
233 changed files with 282 additions and 314 deletions
|
@ -19,9 +19,8 @@ import { render, waitFor, screen, act, fireEvent } from "@testing-library/react"
|
|||
import { mocked } from "jest-mock";
|
||||
import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||
import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client";
|
||||
import { CryptoApi, TweakName } from "matrix-js-sdk/src/matrix";
|
||||
import { CryptoApi, TweakName, NotificationCountType, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||
import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room";
|
||||
import { DeviceTrustLevel, UserTrustLevel } from "matrix-js-sdk/src/crypto/CrossSigning";
|
||||
import { DeviceInfo } from "matrix-js-sdk/src/crypto/deviceinfo";
|
||||
import { IEncryptedEventInfo } from "matrix-js-sdk/src/crypto/api";
|
||||
|
|
|
@ -18,7 +18,7 @@ import React from "react";
|
|||
import { render, screen, act, fireEvent, waitFor, getByRole, RenderResult } from "@testing-library/react";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { EventType, RoomType } from "matrix-js-sdk/src/@types/event";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { Room } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
|
||||
import { PendingEventOrdering } from "matrix-js-sdk/src/client";
|
||||
import { CallType } from "matrix-js-sdk/src/webrtc/call";
|
||||
|
|
|
@ -17,11 +17,10 @@ limitations under the License.
|
|||
|
||||
import React from "react";
|
||||
import { act, render, RenderResult } from "@testing-library/react";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { Room, MatrixClient, RoomState } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
import { User } from "matrix-js-sdk/src/models/user";
|
||||
import { compare } from "matrix-js-sdk/src/utils";
|
||||
import { MatrixClient, RoomState } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
|
||||
import * as TestUtils from "../../../test-utils";
|
||||
|
|
|
@ -17,9 +17,8 @@ limitations under the License.
|
|||
import React from "react";
|
||||
import "jest-mock";
|
||||
import { screen, act, render } from "@testing-library/react";
|
||||
import { MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix";
|
||||
import { MatrixEvent, MsgType, RelationType, NotificationCountType, Room } from "matrix-js-sdk/src/matrix";
|
||||
import { PendingEventOrdering } from "matrix-js-sdk/src/client";
|
||||
import { NotificationCountType, Room } from "matrix-js-sdk/src/models/room";
|
||||
import { EventStatus } from "matrix-js-sdk/src/models/event-status";
|
||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@ limitations under the License.
|
|||
|
||||
import React from "react";
|
||||
import { render } from "@testing-library/react";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { EventType, MatrixEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
|
||||
import { Room, EventType, MatrixEvent, PendingEventOrdering } from "matrix-js-sdk/src/matrix";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
|
||||
import { stubClient } from "../../../test-utils";
|
||||
|
|
|
@ -19,7 +19,7 @@ import React, { ComponentProps } from "react";
|
|||
import { render, screen, within } from "@testing-library/react";
|
||||
import userEvent from "@testing-library/user-event";
|
||||
import { mocked } from "jest-mock";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import RoomList from "../../../../src/components/views/rooms/RoomList";
|
||||
import ResizeNotifier from "../../../../src/utils/ResizeNotifier";
|
||||
|
|
|
@ -18,7 +18,7 @@ import React from "react";
|
|||
import { mocked, Mocked } from "jest-mock";
|
||||
import { render, screen, act } from "@testing-library/react";
|
||||
import { PendingEventOrdering } from "matrix-js-sdk/src/client";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { Room } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
|
||||
import { RoomType } from "matrix-js-sdk/src/@types/event";
|
||||
|
||||
|
|
|
@ -18,10 +18,9 @@ import React from "react";
|
|||
import { render, screen, act, RenderResult } from "@testing-library/react";
|
||||
import { mocked, Mocked } from "jest-mock";
|
||||
import { MatrixClient, PendingEventOrdering } from "matrix-js-sdk/src/client";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
|
||||
import { Widget } from "matrix-widget-api";
|
||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
||||
import { Thread } from "matrix-js-sdk/src/models/thread";
|
||||
|
||||
import type { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
|
|
|
@ -18,7 +18,7 @@ import * as React from "react";
|
|||
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||
import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||
import { render, type RenderResult } from "@testing-library/react";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { Room } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import { stubClient } from "../../../test-utils";
|
||||
import SearchResultTile from "../../../../src/components/views/rooms/SearchResultTile";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue