more test cleanups

This commit is contained in:
Half-Shot 2025-12-19 16:15:17 +00:00
parent 768a731e2d
commit 5c5f89985a
5 changed files with 8 additions and 7 deletions

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

View File

@ -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.",

View File

@ -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;

View File

@ -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);