mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Add back prompt requesting to save unsaved changes (no-changelog) (#10190)
This commit is contained in:
@@ -4,13 +4,12 @@ import type { IConnection, Workflow } from 'n8n-workflow';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
import { useCanvasOperations } from '@/composables/useCanvasOperations';
|
||||
import type { CanvasNode } from '@/types';
|
||||
import type { ICredentialsResponse, INodeUi, IWorkflowDb, XYPosition } from '@/Interface';
|
||||
import type { ICredentialsResponse, INodeUi, IWorkflowDb } from '@/Interface';
|
||||
import { RemoveNodeCommand } from '@/models/history';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useHistoryStore } from '@/stores/history.store';
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
import { ref } from 'vue';
|
||||
import {
|
||||
createTestNode,
|
||||
createTestWorkflowObject,
|
||||
@@ -49,7 +48,6 @@ describe('useCanvasOperations', () => {
|
||||
let canvasOperations: ReturnType<typeof useCanvasOperations>;
|
||||
let workflowHelpers: ReturnType<typeof useWorkflowHelpers>;
|
||||
|
||||
const lastClickPosition = ref<XYPosition>([450, 450]);
|
||||
const router = useRouter();
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -77,7 +75,7 @@ describe('useCanvasOperations', () => {
|
||||
workflowsStore.resetState();
|
||||
workflowHelpers.initState(workflow);
|
||||
|
||||
canvasOperations = useCanvasOperations({ router, lastClickPosition });
|
||||
canvasOperations = useCanvasOperations({ router });
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
@@ -135,7 +133,7 @@ describe('useCanvasOperations', () => {
|
||||
mockNodeTypeDescription({ name: 'type' }),
|
||||
);
|
||||
|
||||
expect(result.position).toEqual([460, 460]); // Default last click position
|
||||
expect(result.position).toEqual([0, 0]); // Default last click position
|
||||
});
|
||||
|
||||
it('should create node with provided position when position is provided', () => {
|
||||
|
||||
Reference in New Issue
Block a user