mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
test: Migrate UI tests from Cypress -> Playwright (no-changelog) (#18201)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user