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

@@ -3,7 +3,9 @@ import { WorkflowPage, NDV } from '../pages';
const workflowPage = new WorkflowPage();
const ndv = new NDV();
describe('Schedule Trigger node', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('Schedule Trigger node', () => {
beforeEach(() => {
workflowPage.actions.visit();
});

View File

@@ -4,7 +4,9 @@ import { NDV, WorkflowPage } from '../pages';
const workflowPage = new WorkflowPage();
const ndv = new NDV();
describe('ADO-2270 Save button resets on webhook node open', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('ADO-2270 Save button resets on webhook node open', () => {
it('should not reset the save button if webhook node is opened and closed', () => {
workflowPage.actions.visit();
workflowPage.actions.addInitialNodeToCanvas(WEBHOOK_NODE_NAME);

View File

@@ -10,7 +10,9 @@ const workflowPage = new WorkflowPage();
const ndv = new NDV();
const executionsTab = new WorkflowExecutionsTab();
describe('Debug', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('Debug', () => {
beforeEach(() => {
cy.enableFeature('debugInEditor');
});

View File

@@ -1,6 +1,8 @@
const url = '/settings';
describe('Admin user', { disableAutoLogin: true }, () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('Admin user', { disableAutoLogin: true }, () => {
it('should see same Settings sub menu items as instance owner', () => {
cy.signinAsOwner();
cy.visit(url);

View File

@@ -7,7 +7,9 @@ import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
const WorkflowsPage = new WorkflowsPageClass();
describe('Become creator CTA', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('Become creator CTA', () => {
it('should not show the CTA if user is not eligible', () => {
interceptCtaRequestWithResponse(false).as('cta');
cy.visit(WorkflowsPage.url);

View File

@@ -34,7 +34,9 @@ const credentialsModal = new CredentialsModal();
const ndv = new NDV();
const mainSidebar = new MainSidebar();
describe('Projects', { disableAutoLogin: true }, () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('Projects', { disableAutoLogin: true }, () => {
describe('when starting from scratch', () => {
beforeEach(() => {
cy.resetDatabase();

View File

@@ -1,3 +1,4 @@
/* eslint-disable n8n-local-rules/no-skipped-tests */
import { type ICredentialType } from 'n8n-workflow';
import { clickCreateNewCredential, openCredentialSelect } from '../composables/ndv';
@@ -13,7 +14,8 @@ const credentialsPage = new CredentialsPage();
const credentialsModal = new CredentialsModal();
const nodeCreatorFeature = new NodeCreator();
describe('AI Assistant::disabled', () => {
// Migrated to Playwright
describe.skip('AI Assistant::disabled', () => {
beforeEach(() => {
aiAssistant.actions.disableAssistant();
wf.actions.visit();
@@ -34,7 +36,7 @@ describe('AI Assistant::enabled', () => {
aiAssistant.actions.disableAssistant();
});
it('renders placeholder UI', () => {
it.skip('renders placeholder UI', () => {
aiAssistant.getters.askAssistantCanvasActionButton().should('be.visible');
aiAssistant.getters.askAssistantCanvasActionButton().click();
aiAssistant.getters.askAssistantChat().should('be.visible');
@@ -80,7 +82,7 @@ describe('AI Assistant::enabled', () => {
});
});
it('should start chat session from node error view', () => {
it.skip('should start chat session from node error view', () => {
cy.intercept('POST', '/rest/ai/chat', {
statusCode: 200,
fixture: 'aiAssistant/responses/simple_message_response.json',
@@ -98,7 +100,7 @@ describe('AI Assistant::enabled', () => {
aiAssistant.getters.nodeErrorViewAssistantButton().should('be.disabled');
});
it('should render chat input correctly', () => {
it.skip('should render chat input correctly', () => {
cy.intercept('POST', '/rest/ai/chat', {
statusCode: 200,
fixture: 'aiAssistant/responses/simple_message_response.json',
@@ -131,7 +133,7 @@ describe('AI Assistant::enabled', () => {
});
});
it('should render and handle quick replies', () => {
it.skip('should render and handle quick replies', () => {
cy.intercept('POST', '/rest/ai/chat', {
statusCode: 200,
fixture: 'aiAssistant/responses/quick_reply_message_response.json',
@@ -148,7 +150,7 @@ describe('AI Assistant::enabled', () => {
aiAssistant.getters.chatMessagesUser().eq(0).should('contain.text', "Sure, let's do it");
});
it('should warn before starting a new session', () => {
it.skip('should warn before starting a new session', () => {
cy.intercept('POST', '/rest/ai/chat', {
statusCode: 200,
fixture: 'aiAssistant/responses/simple_message_response.json',
@@ -273,7 +275,7 @@ describe('AI Assistant::enabled', () => {
);
});
it('should end chat session when `end_session` event is received', () => {
it.skip('should end chat session when `end_session` event is received', () => {
cy.intercept('POST', '/rest/ai/chat', {
statusCode: 200,
fixture: 'aiAssistant/responses/end_session_response.json',

View File

@@ -2,7 +2,9 @@ import { WorkflowsPage } from '../pages';
const workflowsPage = new WorkflowsPage();
describe('n8n.io iframe', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('n8n.io iframe', () => {
describe('when telemetry is disabled', () => {
it('should not load the iframe when visiting /home/workflows', () => {
cy.overrideSettings({ telemetry: { enabled: false } });

View File

@@ -6,7 +6,9 @@ import {
} from '../composables/workflow';
import { AGENT_NODE_NAME, AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME } from '../constants';
describe('AI-716 Correctly set up agent model shows error', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('AI-716 Correctly set up agent model shows error', () => {
beforeEach(() => {
cy.visit(getCredentialsPageUrl());
createNewCredential('OpenAi', 'OpenAI Account', 'API Key', 'sk-123', true);

View File

@@ -11,7 +11,9 @@ import {
} from '../composables/workflow';
import Workflow from '../fixtures/Test_9999-SUG-38.json';
describe('SUG-38 Inline expression previews are not displayed in NDV', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('SUG-38 Inline expression previews are not displayed in NDV', () => {
it("should show resolved inline expression preview in NDV if the node's input data is populated", () => {
navigateToNewWorkflowPage();
pasteWorkflow(Workflow);

View File

@@ -1,4 +1,6 @@
describe('Environment Feature Flags', () => {
// Migrated to Playwright
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
describe.skip('Environment Feature Flags', () => {
it('should set feature flags at runtime and load it back in envFeatureFlags from backend settings', () => {
cy.setEnvFeatureFlags({
N8N_ENV_FEAT_TEST: true,