Replace focus_room_filter dispatch by Action.OpenSpotlight (#29259)
* refactor(room search): replace `focus_room_filter` dispatch by `Action.OpenSpotlight` * test(LoggedInView): add test to Ctrl+k shortcut
This commit is contained in:
@@ -421,6 +421,14 @@ describe("<LoggedInView />", () => {
|
||||
expect(defaultDispatcher.dispatch).not.toHaveBeenCalledWith({ action: Action.ViewHomePage });
|
||||
});
|
||||
|
||||
it("should open spotlight when Ctrl+k is fired", async () => {
|
||||
jest.spyOn(defaultDispatcher, "fire");
|
||||
|
||||
getComponent();
|
||||
await userEvent.keyboard("{Control>}k{/Control}");
|
||||
expect(defaultDispatcher.fire).toHaveBeenCalledWith(Action.OpenSpotlight);
|
||||
});
|
||||
|
||||
describe("timezone updates", () => {
|
||||
const userTimezone = "Europe/London";
|
||||
const originalController = SETTINGS["userTimezonePublish"].controller;
|
||||
|
||||
Reference in New Issue
Block a user