Switch to importing matrix-js-sdk from its main export (#11360)

* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Fix cypress-axe import

* Fix cypress-axe import
This commit is contained in:
Michael Telatynski 2023-08-03 13:56:30 +01:00 committed by GitHub
parent 44f51fd1cb
commit 47877ba2da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 82 additions and 87 deletions

View file

@ -39,7 +39,6 @@ import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalink
import { mockPlatformPeg } from "../../../test-utils/platform";
import { doMaybeLocalRoomAction } from "../../../../src/utils/local-room";
import { addTextToComposer } from "../../../test-utils/composer";
import dis from "../../../../src/dispatcher/dispatcher";
import SettingsStore from "../../../../src/settings/SettingsStore";
jest.mock("../../../../src/utils/local-room", () => ({
@ -510,7 +509,7 @@ describe("<SendMessageComposer/>", () => {
msgtype: MsgType.Text,
});
expect(dis.dispatch).toHaveBeenCalledWith({ action: `effects.confetti` });
expect(defaultDispatcher.dispatch).toHaveBeenCalledWith({ action: `effects.confetti` });
});
it("not to send chat effects on message sending for threads", () => {
@ -537,7 +536,7 @@ describe("<SendMessageComposer/>", () => {
msgtype: MsgType.Text,
});
expect(dis.dispatch).not.toHaveBeenCalledWith({ action: `effects.confetti` });
expect(defaultDispatcher.dispatch).not.toHaveBeenCalledWith({ action: `effects.confetti` });
});
});