Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import { test, expect } from '../../../fixtures/base';
|
|
import type { TestRequirements } from '../../../Types';
|
|
import simpleWorkflow from '../../../workflows/Manual_wait_set.json';
|
|
import workflowWithPinned from '../../../workflows/Webhook_set_pinned.json';
|
|
|
|
const requirements: TestRequirements = {
|
|
config: {
|
|
settings: {
|
|
previewMode: true,
|
|
},
|
|
},
|
|
};
|
|
|
|
test.describe('Demo', {
|
|
annotation: [
|
|
{ type: 'owner', description: 'Adore' },
|
|
],
|
|
}, () => {
|
|
test.beforeEach(async ({ setupRequirements }) => {
|
|
await setupRequirements(requirements);
|
|
});
|
|
|
|
test('can import template', async ({ n8n }) => {
|
|
await n8n.demo.goto();
|
|
expect(await n8n.notifications.getAllNotificationTexts()).toHaveLength(0);
|
|
await n8n.demo.importWorkflow(simpleWorkflow);
|
|
await expect(n8n.canvas.getCanvasNodes()).toHaveCount(3);
|
|
});
|
|
|
|
test('can import workflow with pin data', async ({ n8n }) => {
|
|
await n8n.demo.goto();
|
|
await expect(n8n.canvas.canvasPane()).toBeVisible();
|
|
await n8n.demo.importWorkflow(workflowWithPinned);
|
|
await expect(n8n.canvas.getCanvasNodes()).toHaveCount(2);
|
|
await n8n.canvas.openNode('Webhook');
|
|
await expect(n8n.ndv.outputPanel.getTableHeaders().first()).toContainText('headers');
|
|
await expect(n8n.ndv.outputPanel.getTbodyCell(0, 3)).toContainText('dragons');
|
|
});
|
|
|
|
test('can override theme to dark', async ({ n8n }) => {
|
|
await n8n.demo.goto('dark');
|
|
await expect(n8n.demo.getBody()).toHaveAttribute('data-theme', 'dark');
|
|
expect(await n8n.notifications.getAllNotificationTexts()).toHaveLength(0);
|
|
});
|
|
|
|
test('can override theme to light', async ({ n8n }) => {
|
|
await n8n.demo.goto('light');
|
|
await expect(n8n.demo.getBody()).toHaveAttribute('data-theme', 'light');
|
|
expect(await n8n.notifications.getAllNotificationTexts()).toHaveLength(0);
|
|
});
|
|
});
|