refactor(core): Delete all collaboration related code (no-changelog) (#9929)
This commit is contained in:
committed by
GitHub
parent
24091dfd9b
commit
22990342df
@@ -2,7 +2,6 @@ import { usePushConnection } from '@/composables/usePushConnection';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { createPinia, setActivePinia } from 'pinia';
|
||||
import { usePushConnectionStore } from '@/stores/pushConnection.store';
|
||||
import { useCollaborationStore } from '@/stores/collaboration.store';
|
||||
import type { IPushData, PushDataWorkerStatusMessage } from '@/Interface';
|
||||
import { useOrchestrationStore } from '@/stores/orchestration.store';
|
||||
|
||||
@@ -21,7 +20,6 @@ vi.useFakeTimers();
|
||||
describe('usePushConnection()', () => {
|
||||
let router: ReturnType<typeof useRouter>;
|
||||
let pushStore: ReturnType<typeof usePushConnectionStore>;
|
||||
let collaborationStore: ReturnType<typeof useCollaborationStore>;
|
||||
let orchestrationStore: ReturnType<typeof useOrchestrationStore>;
|
||||
let pushConnection: ReturnType<typeof usePushConnection>;
|
||||
|
||||
@@ -30,7 +28,6 @@ describe('usePushConnection()', () => {
|
||||
|
||||
router = vi.mocked(useRouter)();
|
||||
pushStore = usePushConnectionStore();
|
||||
collaborationStore = useCollaborationStore();
|
||||
orchestrationStore = useOrchestrationStore();
|
||||
pushConnection = usePushConnection({ router });
|
||||
});
|
||||
@@ -43,12 +40,6 @@ describe('usePushConnection()', () => {
|
||||
|
||||
expect(spy).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should initialize collaborationStore', () => {
|
||||
const spy = vi.spyOn(collaborationStore, 'initialize').mockImplementation(() => {});
|
||||
pushConnection.initialize();
|
||||
expect(spy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('terminate()', () => {
|
||||
@@ -61,12 +52,6 @@ describe('usePushConnection()', () => {
|
||||
|
||||
expect(returnFn).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should terminate collaborationStore', () => {
|
||||
const spy = vi.spyOn(collaborationStore, 'terminate').mockImplementation(() => {});
|
||||
pushConnection.terminate();
|
||||
expect(spy).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('queuePushMessage()', () => {
|
||||
|
||||
@@ -35,7 +35,6 @@ import { parse } from 'flatted';
|
||||
import { ref } from 'vue';
|
||||
import { useOrchestrationStore } from '@/stores/orchestration.store';
|
||||
import { usePushConnectionStore } from '@/stores/pushConnection.store';
|
||||
import { useCollaborationStore } from '@/stores/collaboration.store';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import type { useRouter } from 'vue-router';
|
||||
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
|
||||
@@ -51,7 +50,6 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
|
||||
const i18n = useI18n();
|
||||
const telemetry = useTelemetry();
|
||||
|
||||
const collaborationStore = useCollaborationStore();
|
||||
const credentialsStore = useCredentialsStore();
|
||||
const nodeTypesStore = useNodeTypesStore();
|
||||
const orchestrationManagerStore = useOrchestrationStore();
|
||||
@@ -68,11 +66,9 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
|
||||
removeEventListener.value = pushStore.addEventListener((message) => {
|
||||
void pushMessageReceived(message);
|
||||
});
|
||||
collaborationStore.initialize();
|
||||
}
|
||||
|
||||
function terminate() {
|
||||
collaborationStore.terminate();
|
||||
if (typeof removeEventListener.value === 'function') {
|
||||
removeEventListener.value();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user