mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-01 01:07:04 +02:00
refactor(editor): Extract workflowHistory code to features (no-changelog) (#20587)
This commit is contained in:
parent
4e84c53a47
commit
c0157f645e
|
|
@ -89,7 +89,7 @@ import UpdatesPanel from '@/components/UpdatesPanel.vue';
|
|||
import WhatsNewModal from '@/components/WhatsNewModal.vue';
|
||||
import WorkflowActivationConflictingWebhookModal from '@/components/WorkflowActivationConflictingWebhookModal.vue';
|
||||
import WorkflowExtractionNameModal from '@/components/WorkflowExtractionNameModal.vue';
|
||||
import WorkflowHistoryVersionRestoreModal from '@/components/WorkflowHistory/WorkflowHistoryVersionRestoreModal.vue';
|
||||
import WorkflowHistoryVersionRestoreModal from '@/features/workflowHistory/components/WorkflowHistoryVersionRestoreModal.vue';
|
||||
import WorkflowSettings from '@/components/WorkflowSettings.vue';
|
||||
import WorkflowShareModal from '@/components/WorkflowShareModal.ee.vue';
|
||||
import WorkflowDiffModal from '@/features/workflow-diff/WorkflowDiffModal.vue';
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import { waitFor } from '@testing-library/vue';
|
|||
import userEvent from '@testing-library/user-event';
|
||||
import type { UserAction } from '@n8n/design-system';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import WorkflowHistoryContent from '@/components/WorkflowHistory/WorkflowHistoryContent.vue';
|
||||
import WorkflowHistoryContent from './WorkflowHistoryContent.vue';
|
||||
import type { WorkflowHistoryActionTypes } from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import { workflowVersionDataFactory } from '@/stores/__tests__/utils/workflowHistoryTestUtils';
|
||||
import { workflowVersionDataFactory } from '../__tests__/utils';
|
||||
import type { IWorkflowDb } from '@/Interface';
|
||||
import type { IUser } from 'n8n-workflow';
|
||||
import { useProjectsStore } from '@/stores/projects.store';
|
||||
|
|
@ -7,7 +7,7 @@ import type {
|
|||
WorkflowVersionId,
|
||||
} from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import WorkflowPreview from '@/components/WorkflowPreview.vue';
|
||||
import WorkflowHistoryListItem from '@/components/WorkflowHistory/WorkflowHistoryListItem.vue';
|
||||
import WorkflowHistoryListItem from './WorkflowHistoryListItem.vue';
|
||||
import { useI18n } from '@n8n/i18n';
|
||||
import type { IUser } from 'n8n-workflow';
|
||||
|
||||
|
|
@ -4,9 +4,9 @@ import { createPinia, setActivePinia } from 'pinia';
|
|||
import { faker } from '@faker-js/faker';
|
||||
import type { UserAction } from '@n8n/design-system';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import WorkflowHistoryList from '@/components/WorkflowHistory/WorkflowHistoryList.vue';
|
||||
import WorkflowHistoryList from './WorkflowHistoryList.vue';
|
||||
import type { WorkflowHistoryActionTypes } from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import { workflowHistoryDataFactory } from '@/stores/__tests__/utils/workflowHistoryTestUtils';
|
||||
import { workflowHistoryDataFactory } from '../__tests__/utils';
|
||||
import type { IUser } from 'n8n-workflow';
|
||||
|
||||
vi.stubGlobal(
|
||||
|
|
@ -8,7 +8,7 @@ import type {
|
|||
WorkflowHistoryActionTypes,
|
||||
WorkflowHistoryRequestParams,
|
||||
} from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import WorkflowHistoryListItem from '@/components/WorkflowHistory/WorkflowHistoryListItem.vue';
|
||||
import WorkflowHistoryListItem from './WorkflowHistoryListItem.vue';
|
||||
import type { IUser } from 'n8n-workflow';
|
||||
import { I18nT } from 'vue-i18n';
|
||||
|
||||
|
|
@ -2,9 +2,9 @@ import { createPinia, setActivePinia } from 'pinia';
|
|||
import userEvent from '@testing-library/user-event';
|
||||
import type { UserAction } from '@n8n/design-system';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import WorkflowHistoryListItem from '@/components/WorkflowHistory/WorkflowHistoryListItem.vue';
|
||||
import WorkflowHistoryListItem from './WorkflowHistoryListItem.vue';
|
||||
import type { WorkflowHistoryActionTypes } from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import { workflowHistoryDataFactory } from '@/stores/__tests__/utils/workflowHistoryTestUtils';
|
||||
import { workflowHistoryDataFactory } from '../__tests__/utils';
|
||||
import { type IUser } from 'n8n-workflow';
|
||||
|
||||
const actionTypes: WorkflowHistoryActionTypes = ['restore', 'clone', 'open', 'download'];
|
||||
|
|
@ -8,15 +8,12 @@ import { useRoute, useRouter } from 'vue-router';
|
|||
import { faker } from '@faker-js/faker';
|
||||
import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { SETTINGS_STORE_DEFAULT_STATE } from '@/__tests__/utils';
|
||||
import WorkflowHistoryPage from '@/views/WorkflowHistory.vue';
|
||||
import { useWorkflowHistoryStore } from '@/stores/workflowHistory.store';
|
||||
import WorkflowHistoryPage from './WorkflowHistory.vue';
|
||||
import { useWorkflowHistoryStore } from '../workflowHistory.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { STORES } from '@n8n/stores';
|
||||
import { VIEWS } from '@/constants';
|
||||
import {
|
||||
workflowHistoryDataFactory,
|
||||
workflowVersionDataFactory,
|
||||
} from '@/stores/__tests__/utils/workflowHistoryTestUtils';
|
||||
import { workflowHistoryDataFactory, workflowVersionDataFactory } from '../__tests__/utils';
|
||||
import type { WorkflowVersion } from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import type { IWorkflowDb } from '@/Interface';
|
||||
import { telemetry } from '@/plugins/telemetry';
|
||||
|
|
@ -12,9 +12,9 @@ import type {
|
|||
WorkflowHistory,
|
||||
WorkflowVersion,
|
||||
} from '@n8n/rest-api-client/api/workflowHistory';
|
||||
import WorkflowHistoryList from '@/components/WorkflowHistory/WorkflowHistoryList.vue';
|
||||
import WorkflowHistoryContent from '@/components/WorkflowHistory/WorkflowHistoryContent.vue';
|
||||
import { useWorkflowHistoryStore } from '@/stores/workflowHistory.store';
|
||||
import WorkflowHistoryList from '../components/WorkflowHistoryList.vue';
|
||||
import WorkflowHistoryContent from '../components/WorkflowHistoryContent.vue';
|
||||
import { useWorkflowHistoryStore } from '../workflowHistory.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { telemetry } from '@/plugins/telemetry';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { createPinia, setActivePinia } from 'pinia';
|
||||
import type { FrontendSettings } from '@n8n/api-types';
|
||||
import { useWorkflowHistoryStore } from '@/stores/workflowHistory.store';
|
||||
import { useWorkflowHistoryStore } from './workflowHistory.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
|
||||
describe('Workflow history store', () => {
|
||||
|
|
@ -67,7 +67,8 @@ const SettingsSourceControl = async () =>
|
|||
const SettingsExternalSecrets = async () =>
|
||||
await import('@/features/externalSecrets/views/SettingsExternalSecrets.vue');
|
||||
const WorkerView = async () => await import('./views/WorkerView.vue');
|
||||
const WorkflowHistory = async () => await import('@/views/WorkflowHistory.vue');
|
||||
const WorkflowHistory = async () =>
|
||||
await import('@/features/workflowHistory/views/WorkflowHistory.vue');
|
||||
const WorkflowOnboardingView = async () => await import('@/views/WorkflowOnboardingView.vue');
|
||||
const EvaluationsView = async () =>
|
||||
await import('@/features/evaluation.ee/views/EvaluationsView.vue');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user