mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
test: Migrate 2929 test to Playwright (#18425)
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import {
|
||||
deleteNode,
|
||||
getCanvasNodes,
|
||||
navigateToNewWorkflowPage,
|
||||
pasteWorkflow,
|
||||
} from '../composables/workflow';
|
||||
import Workflow from '../fixtures/Switch_node_with_null_connection.json';
|
||||
|
||||
describe('ADO-2929 can load Switch nodes', () => {
|
||||
it('can load workflows with Switch nodes with null at connection index', () => {
|
||||
navigateToNewWorkflowPage();
|
||||
pasteWorkflow(Workflow);
|
||||
getCanvasNodes().should('have.length', 3);
|
||||
deleteNode('Switch');
|
||||
getCanvasNodes().should('have.length', 2);
|
||||
});
|
||||
});
|
||||
@@ -259,4 +259,8 @@ export class CanvasPage extends BasePage {
|
||||
async clickProductionChecklistAction(actionText: string): Promise<void> {
|
||||
await this.getProductionChecklistActionItem(actionText).click();
|
||||
}
|
||||
|
||||
getCanvasNodes() {
|
||||
return this.page.getByTestId('canvas-node');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { test, expect } from '../../fixtures/base';
|
||||
import type { TestRequirements } from '../../Types';
|
||||
|
||||
const requirements: TestRequirements = {
|
||||
workflow: {
|
||||
'Switch_node_with_null_connection.json': 'Switch Node with Null Connection',
|
||||
},
|
||||
};
|
||||
|
||||
test.describe('ADO-2929 can load Switch nodes', () => {
|
||||
test('can load workflows with Switch nodes with null at connection index @auth:owner', async ({
|
||||
n8n,
|
||||
setupRequirements,
|
||||
}) => {
|
||||
await setupRequirements(requirements);
|
||||
await expect(n8n.canvas.getCanvasNodes()).toHaveCount(3);
|
||||
await n8n.canvas.deleteNodeByName('Switch');
|
||||
await expect(n8n.canvas.getCanvasNodes()).toHaveCount(2);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user