mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
test: Add credential helper and ndv helper (#18636)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { test, expect } from '../../../fixtures/base';
|
||||
|
||||
test.describe('Core UI Patterns - Building Blocks', () => {
|
||||
test.describe('01 - UI Test Entry Points', () => {
|
||||
test.describe('Entry Point: Home Page', () => {
|
||||
test('should navigate from home', async ({ n8n }) => {
|
||||
await n8n.start.fromHome();
|
||||
@@ -0,0 +1,50 @@
|
||||
import { test, expect } from '../../../fixtures/base';
|
||||
|
||||
test.describe('03 - Node Details Configuration', () => {
|
||||
test.beforeEach(async ({ n8n }) => {
|
||||
await n8n.start.fromBlankCanvas();
|
||||
});
|
||||
|
||||
test('should configure webhook node', async ({ n8n }) => {
|
||||
await n8n.canvas.addNode('Webhook');
|
||||
|
||||
await n8n.ndv.setupHelper.webhook({
|
||||
httpMethod: 'POST',
|
||||
path: 'test-webhook',
|
||||
authentication: 'Basic Auth',
|
||||
});
|
||||
|
||||
await expect(n8n.ndv.getParameterInputField('path')).toHaveValue('test-webhook');
|
||||
});
|
||||
|
||||
test('should configure HTTP Request node', async ({ n8n }) => {
|
||||
await n8n.canvas.addNode('HTTP Request');
|
||||
|
||||
await n8n.ndv.setupHelper.httpRequest({
|
||||
method: 'POST',
|
||||
url: 'https://api.example.com/test',
|
||||
sendQuery: true,
|
||||
sendHeaders: false,
|
||||
});
|
||||
|
||||
await expect(n8n.ndv.getParameterInputField('url')).toHaveValue('https://api.example.com/test');
|
||||
});
|
||||
|
||||
test('should auto-detect parameter types', async ({ n8n }) => {
|
||||
await n8n.canvas.addNode('Webhook');
|
||||
|
||||
await n8n.ndv.setupHelper.setParameter('httpMethod', 'PUT');
|
||||
await n8n.ndv.setupHelper.setParameter('path', 'auto-detect-test');
|
||||
|
||||
await expect(n8n.ndv.getParameterInputField('path')).toHaveValue('auto-detect-test');
|
||||
});
|
||||
|
||||
test('should use explicit types for better performance', async ({ n8n }) => {
|
||||
await n8n.canvas.addNode('Webhook');
|
||||
|
||||
await n8n.ndv.setupHelper.setParameter('httpMethod', 'PATCH', 'dropdown');
|
||||
await n8n.ndv.setupHelper.setParameter('path', 'explicit-types', 'text');
|
||||
|
||||
await expect(n8n.ndv.getParameterInputField('path')).toHaveValue('explicit-types');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user