mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 20:26:19 +02:00
more test cleanups
This commit is contained in:
parent
768a731e2d
commit
5c5f89985a
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.2 KiB |
@ -2131,7 +2131,7 @@
|
||||
"exceeded_resource_limit_description": "Please contact your service administrator to continue using the service.",
|
||||
"exceeded_resource_limit_title": "Your message wasn't sent because this homeserver has exceeded a resource limit.",
|
||||
"failed_to_create_room_title": "Could not start a chat with this user",
|
||||
"history_visible": "This room has been configured so that new members can read history. <a>Learn more</a>",
|
||||
"history_visible": "This room has been configured so that new members can read history. <a>Learn More</a>",
|
||||
"homeserver_blocked_title": "Your message wasn't sent because this homeserver has been blocked by its administrator.",
|
||||
"monthly_user_limit_reached_title": "Your message wasn't sent because this homeserver has hit its Monthly Active User Limit.",
|
||||
"requires_consent_agreement_title": "You can't send any messages until you review and agree to our terms and conditions.",
|
||||
|
||||
@ -25,7 +25,7 @@ import { MatrixClientPeg } from "../../MatrixClientPeg";
|
||||
import Resend from "../../Resend";
|
||||
import { Action } from "../../dispatcher/actions";
|
||||
import dis from "../../dispatcher/dispatcher";
|
||||
import { LocalRoom, LocalRoomState } from "../../models/LocalRoom";
|
||||
import { type LocalRoom, LocalRoomState } from "../../models/LocalRoom";
|
||||
|
||||
interface PropsWithRoom {
|
||||
room: Room | LocalRoom;
|
||||
|
||||
@ -5,19 +5,20 @@
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { RoomStatusBarViewModel } from "../../../src/viewmodels/room/RoomStatusBar";
|
||||
import { mkEvent, mkRoom, stubClient } from "../../test-utils";
|
||||
import {
|
||||
SyncState,
|
||||
MatrixError,
|
||||
ClientEvent,
|
||||
MatrixClient,
|
||||
Room,
|
||||
type MatrixClient,
|
||||
type Room,
|
||||
type MatrixEvent,
|
||||
EventStatus,
|
||||
} from "matrix-js-sdk/src/matrix";
|
||||
import { RoomStatusBarState } from "@element-hq/web-shared-components";
|
||||
import { type MockedObject } from "jest-mock";
|
||||
|
||||
import { mkEvent, mkRoom, stubClient } from "../../test-utils";
|
||||
import { RoomStatusBarViewModel } from "../../../src/viewmodels/room/RoomStatusBar";
|
||||
import { LocalRoom, LocalRoomState } from "../../../src/models/LocalRoom";
|
||||
|
||||
const userId = "@example:example.org";
|
||||
@ -66,7 +67,7 @@ describe("RoomStatusBarViewModel", () => {
|
||||
});
|
||||
|
||||
// Because we expect LoggedInView to pop a toast
|
||||
it("should resolve state to nothing if sync error is M_RESOURCE_LIMIT_EXCEEDED ", () => {
|
||||
it("should resolve state to nothing if sync error is M_RESOURCE_LIMIT_EXCEEDED", () => {
|
||||
client.getSyncState.mockReturnValue(SyncState.Error);
|
||||
client.getSyncStateData.mockReturnValue({ error: new MatrixError({ errcode: "M_RESOURCE_LIMIT_EXCEEDED" }) });
|
||||
client.emit(ClientEvent.Sync, SyncState.Error, null);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user