test: Migrate cypress tests batch 1 to playwright (#19569)

This commit is contained in:
Artem Sorokin
2025-09-16 16:11:51 +02:00
committed by GitHub
parent b480f495d9
commit a4fc24371d
19 changed files with 2573 additions and 239 deletions

View File

@@ -0,0 +1,42 @@
import { test, expect } from '../../fixtures/base';
const NOTIFICATIONS = {
WORKFLOW_CREATED: 'Workflow successfully created',
};
test.describe('Editor zoom should work after route changes', () => {
test.beforeEach(async ({ n8n, api }) => {
await api.enableFeature('debugInEditor');
await api.enableFeature('workflowHistory');
await n8n.workflowComposer.createWorkflowFromJsonFile(
'Lots_of_nodes.json',
'Lots of nodes test',
);
await n8n.notifications.waitForNotificationAndClose(NOTIFICATIONS.WORKFLOW_CREATED);
});
test('should maintain zoom functionality after switching between Editor and Workflow history and Workflow list', async ({
n8n,
}) => {
const initialNodeCount = await n8n.canvas.getCanvasNodes().count();
expect(initialNodeCount).toBeGreaterThan(0);
await n8n.canvasComposer.switchBetweenEditorAndHistory();
await n8n.canvasComposer.zoomInAndCheckNodes();
await n8n.canvasComposer.switchBetweenEditorAndHistory();
await n8n.canvasComposer.switchBetweenEditorAndHistory();
await n8n.canvasComposer.zoomInAndCheckNodes();
await n8n.canvasComposer.switchBetweenEditorAndWorkflowList();
await n8n.canvasComposer.zoomInAndCheckNodes();
await n8n.canvasComposer.switchBetweenEditorAndWorkflowList();
await n8n.canvasComposer.switchBetweenEditorAndWorkflowList();
await n8n.canvasComposer.zoomInAndCheckNodes();
await n8n.canvasComposer.switchBetweenEditorAndHistory();
await n8n.canvasComposer.switchBetweenEditorAndWorkflowList();
});
});