Move ResizerNotifier into SDKContext (#30939)
* Move ResizerNotifier into SDKContext so we don't have to pass it into RoomView * Fix test * Unused import * Add tests * Remove a bunch of resizeNotifier props * Remove more resizeNotifier props * Add resizenotifier to test * Add more sdkcontext wrappers in tests * More sdkcontext wrappers * Even more sdkcontext wrappers * Add test to make sonarcloud happy * Context isn't always there unlike props * Test actual resizing too * Remove commented line
This commit is contained in:
@@ -307,6 +307,30 @@ describe("<MatrixChat />", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should notify resizenotifier when left panel hidden", async () => {
|
||||
getComponent();
|
||||
|
||||
jest.spyOn(SdkContextClass.instance.resizeNotifier, "notifyLeftHandleResized");
|
||||
|
||||
defaultDispatcher.dispatch({ action: "hide_left_panel" });
|
||||
|
||||
await waitFor(() =>
|
||||
expect(mocked(SdkContextClass.instance.resizeNotifier.notifyLeftHandleResized)).toHaveBeenCalled(),
|
||||
);
|
||||
});
|
||||
|
||||
it("should notify resizenotifier when left panel shown", async () => {
|
||||
getComponent();
|
||||
|
||||
jest.spyOn(SdkContextClass.instance.resizeNotifier, "notifyLeftHandleResized");
|
||||
|
||||
defaultDispatcher.dispatch({ action: "show_left_panel" });
|
||||
|
||||
await waitFor(() =>
|
||||
expect(mocked(SdkContextClass.instance.resizeNotifier.notifyLeftHandleResized)).toHaveBeenCalled(),
|
||||
);
|
||||
});
|
||||
|
||||
describe("when query params have a OIDC params", () => {
|
||||
const issuer = "https://auth.com/";
|
||||
const homeserverUrl = "https://matrix.org";
|
||||
|
||||
Reference in New Issue
Block a user