Skip to content

Commit 8a9b561

Browse files
committed
cleanup
1 parent 3d9a698 commit 8a9b561

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

apps/web/test/test-utils/test-utils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import { type ValidatedServerConfig } from "../../src/utils/ValidatedServerConfi
4848
import { EnhancedMap } from "../../src/utils/maps";
4949
import { type AsyncStoreWithClient } from "../../src/stores/AsyncStoreWithClient";
5050
import MatrixClientBackedSettingsHandler from "../../src/settings/handlers/MatrixClientBackedSettingsHandler";
51+
import MatrixClientBackedController from "../../src/settings/controllers/MatrixClientBackedController";
5152

5253
/**
5354
* Stub out the MatrixClient, and configure the MatrixClientPeg object to
@@ -75,6 +76,7 @@ export function stubClient(): MatrixClient {
7576
peg.get = () => client;
7677
peg.safeGet = () => client;
7778
MatrixClientBackedSettingsHandler.matrixClient = client;
79+
MatrixClientBackedController.matrixClient = client;
7880
return client;
7981
}
8082

@@ -249,7 +251,7 @@ export function createTestClient(): MatrixClient {
249251
decryptEventIfNeeded: () => Promise.resolve(),
250252
isUserIgnored: jest.fn().mockReturnValue(false),
251253
getCapabilities: jest.fn().mockResolvedValue({}),
252-
getCachedCapabilities: jest.fn().mockResolvedValue({}),
254+
getCachedCapabilities: jest.fn().mockReturnValue({}),
253255
supportsThreads: jest.fn().mockReturnValue(false),
254256
supportsIntentionalMentions: jest.fn().mockReturnValue(false),
255257
getRoomUpgradeHistory: jest.fn().mockReturnValue([]),

apps/web/test/unit-tests/components/structures/__snapshots__/RoomView-test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
213213
</div>
214214
<div
215215
aria-labelledby="_r_1c3_"
216-
class="_banner_193k4_8"
216+
class="_banner_n7ud0_8"
217217
data-type="critical"
218218
role="status"
219219
>
220220
<div
221-
class="_icon_193k4_50"
221+
class="_icon_n7ud0_50"
222222
>
223223
<svg
224224
fill="currentColor"
@@ -234,7 +234,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
234234
</svg>
235235
</div>
236236
<div
237-
class="_content_193k4_38"
237+
class="_content_n7ud0_38"
238238
>
239239
<p
240240
class="_typography_6v6n8_153 _font-body-md-medium_6v6n8_60 _title_1xryk_24"
@@ -244,7 +244,7 @@ exports[`RoomView for a local room in state ERROR should match the snapshot 1`]
244244
</p>
245245
</div>
246246
<div
247-
class="_actions_193k4_60"
247+
class="_actions_n7ud0_61"
248248
>
249249
<button
250250
class="_button_13vu4_8 _primaryAction_1xryk_20 _has-icon_13vu4_60"

0 commit comments

Comments
 (0)