test: Migrate UI tests from Cypress -> Playwright (no-changelog) (#18201)

This commit is contained in:
shortstacked
2025-08-12 12:06:42 +01:00
committed by GitHub
parent ecc4f41a11
commit 514825bd51
52 changed files with 2111 additions and 402 deletions

View File

@@ -1,3 +1,5 @@
import { nanoid } from 'nanoid';
import { test, expect } from '../../fixtures/base';
const NOTIFICATIONS = {
@@ -18,7 +20,9 @@ test.describe('Workflows', () => {
await expect(n8n.canvas.getWorkflowTags()).toHaveText(['some-tag-1', 'some-tag-2']);
});
test('should create a new workflow using add workflow button', async ({ n8n }) => {
test('should create a new workflow using add workflow button and save successfully', async ({
n8n,
}) => {
await n8n.workflows.clickAddWorkflowButton();
const workflowName = `Test Workflow ${Date.now()}`;
@@ -31,9 +35,9 @@ test.describe('Workflows', () => {
});
test('should search for workflows', async ({ n8n }) => {
const date = Date.now();
const specificName = `Specific Test ${date}`;
const genericName = `Generic Test ${date}`;
const uniqueId = nanoid(8);
const specificName = `Specific Test ${uniqueId}`;
const genericName = `Generic Test ${uniqueId}`;
await n8n.workflowComposer.createWorkflow(specificName);
await n8n.goHome();
@@ -47,7 +51,7 @@ test.describe('Workflows', () => {
// Search with partial term
await n8n.workflows.clearSearch();
await n8n.workflows.searchWorkflows(date.toString());
await n8n.workflows.searchWorkflows(uniqueId);
await expect(n8n.workflows.getWorkflowItems()).toHaveCount(2);
// Search for non-existent