Remove Piwik support (#8835)
* Remove all mentions of Piwik * Kill off all consumer of the old Piwik Analytics module * Simplify ModalManager interface * i18n * Attempt to fix old e2e tests * Remove unused component * Iterate PR
This commit is contained in:
parent
7d14d15ba6
commit
3c5c2bef6d
142 changed files with 446 additions and 1412 deletions
|
@ -66,7 +66,7 @@ jest.mock('../../../../src/stores/OwnProfileStore', () => ({
|
|||
}));
|
||||
|
||||
jest.mock('../../../../src/Modal', () => ({
|
||||
createTrackedDialog: jest.fn(),
|
||||
createDialog: jest.fn(),
|
||||
}));
|
||||
|
||||
describe('<LocationShareMenu />', () => {
|
||||
|
@ -121,7 +121,7 @@ describe('<LocationShareMenu />', () => {
|
|||
mockClient.sendMessage.mockClear();
|
||||
mockClient.unstable_createLiveBeacon.mockClear().mockResolvedValue({ event_id: '1' });
|
||||
jest.spyOn(MatrixClientPeg, 'get').mockReturnValue(mockClient as unknown as MatrixClient);
|
||||
mocked(Modal).createTrackedDialog.mockClear();
|
||||
mocked(Modal).createDialog.mockClear();
|
||||
|
||||
jest.clearAllMocks();
|
||||
|
||||
|
@ -433,7 +433,7 @@ describe('<LocationShareMenu />', () => {
|
|||
await flushPromisesWithFakeTimers();
|
||||
|
||||
expect(logSpy).toHaveBeenCalledWith("We couldn't start sharing your live location", error);
|
||||
expect(mocked(Modal).createTrackedDialog).toHaveBeenCalled();
|
||||
expect(mocked(Modal).createDialog).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -78,7 +78,7 @@ describe('<MBeaconBody />', () => {
|
|||
wrappingComponentProps: { value: mockClient },
|
||||
});
|
||||
|
||||
const modalSpy = jest.spyOn(Modal, 'createTrackedDialog').mockReturnValue(undefined);
|
||||
const modalSpy = jest.spyOn(Modal, 'createDialog').mockReturnValue(undefined);
|
||||
|
||||
beforeAll(() => {
|
||||
maplibregl.AttributionControl = jest.fn();
|
||||
|
|
|
@ -127,7 +127,7 @@ describe("MLocationBody", () => {
|
|||
});
|
||||
|
||||
it('opens map dialog on click', () => {
|
||||
const modalSpy = jest.spyOn(Modal, 'createTrackedDialog').mockReturnValue(undefined);
|
||||
const modalSpy = jest.spyOn(Modal, 'createDialog').mockReturnValue(undefined);
|
||||
const component = getComponent();
|
||||
|
||||
act(() => {
|
||||
|
|
|
@ -18,11 +18,9 @@
|
|||
"localhost:5005"
|
||||
]
|
||||
},
|
||||
"piwik": {
|
||||
"url": "https://piwik.riot.im/",
|
||||
"whitelistedHSUrls": ["http://localhost:5005"],
|
||||
"whitelistedISUrls": ["https://vector.im", "https://matrix.org"],
|
||||
"siteId": 1
|
||||
"posthog": {
|
||||
"projectApiKey": "not-a-real-api-key",
|
||||
"apiHost": "http://localhost:5005"
|
||||
},
|
||||
"enable_presence_by_hs_url": {
|
||||
"https://matrix.org": false
|
||||
|
|
|
@ -36,7 +36,7 @@ const MXID_PROFILE_STATES = {
|
|||
};
|
||||
|
||||
jest.mock('../../src/Modal', () => ({
|
||||
createTrackedDialog: jest.fn(),
|
||||
createDialog: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('../../src/settings/SettingsStore', () => ({
|
||||
|
@ -54,12 +54,8 @@ const mockPromptBeforeInviteUnknownUsers = (value: boolean) => {
|
|||
};
|
||||
|
||||
const mockCreateTrackedDialog = (callbackName: 'onInviteAnyways'|'onGiveUp') => {
|
||||
mocked(Modal.createTrackedDialog).mockImplementation(
|
||||
(
|
||||
_analyticsAction: string,
|
||||
_analyticsInfo: string,
|
||||
...rest: Parameters<ModalManager['createDialog']>
|
||||
): any => {
|
||||
mocked(Modal.createDialog).mockImplementation(
|
||||
(...rest: Parameters<ModalManager['createDialog']>): any => {
|
||||
rest[1][callbackName]();
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue