fix(editor): Revert log view rollout (no-changelog) (#15309)

This commit is contained in:
Suguru Inoue
2025-05-12 13:35:18 +02:00
committed by GitHub
parent e2b9ada4b5
commit 81caedb319
7 changed files with 28 additions and 27 deletions

View File

@@ -2,14 +2,6 @@
* Accessors
*/
export function getOverviewPanel() {
return cy.getByTestId('logs-overview');
}
export function getOverviewPanelBody() {
return cy.getByTestId('logs-overview-body');
}
export function getOverviewStatus() {
return cy.getByTestId('logs-overview-status');
}

View File

@@ -22,10 +22,21 @@ export function getManualChatModalCloseButton() {
return cy.getByTestId('workflow-chat-button');
}
export function getManualChatModalLogs() {
return cy.getByTestId('canvas-chat-logs');
}
export function getManualChatDialog() {
return getManualChatModal().getByTestId('workflow-lm-chat-dialog');
}
export function getManualChatModalLogsTree() {
return getManualChatModalLogs().getByTestId('lm-chat-logs-tree');
}
export function getManualChatModalLogsEntries() {
return getManualChatModalLogs().getByTestId('lm-chat-logs-entry');
}
/**
* Actions
*/

View File

@@ -1,9 +1,10 @@
import type { ExecutionError } from 'n8n-workflow';
import * as logs from '../composables/logs';
import {
closeManualChatModal,
getManualChatMessages,
getManualChatModalLogs,
getManualChatModalLogsEntries,
sendManualChatMessage,
} from '../composables/modals/chat-modal';
import { setCredentialValues } from '../composables/modals/credential-modal';
@@ -198,10 +199,10 @@ function checkMessages(inputMessage: string, outputMessage: string) {
messages.should('contain', inputMessage);
messages.should('contain', outputMessage);
logs.getOverviewPanelBody().should('exist');
logs.getLogEntries().should('have.length', 2);
logs.getSelectedLogEntry().should('have.text', 'AI Agent');
logs.getOutputPanel().should('contain', AI_MEMORY_POSTGRES_NODE_NAME);
getManualChatModalLogs().should('exist');
getManualChatModalLogsEntries()
.should('have.length', 1)
.should('contain', AI_MEMORY_POSTGRES_NODE_NAME);
}
describe("AI-233 Make root node's logs pane active in case of an error in sub-nodes", () => {

View File

@@ -12,12 +12,13 @@ import {
EDIT_FIELDS_SET_NODE_NAME,
CHAT_TRIGGER_NODE_DISPLAY_NAME,
} from './../constants';
import * as logs from '../composables/logs';
import {
closeManualChatModal,
getManualChatInput,
getManualChatMessages,
getManualChatModal,
getManualChatModalLogs,
getManualChatModalLogsEntries,
getManualChatModalLogsTree,
sendManualChatMessage,
} from '../composables/modals/chat-modal';
import { setCredentialValues } from '../composables/modals/credential-modal';
@@ -307,14 +308,12 @@ describe('Langchain Integration', () => {
messages.should('contain', inputMessage);
messages.should('contain', outputMessage);
logs.getOverviewPanel().should('be.visible');
logs.getLogEntries().should('have.length', 2);
logs.getLogEntries().eq(0).should('have.text', 'AI Agent');
logs.getLogEntries().eq(1).should('have.text', 'OpenAI Chat Model');
getManualChatModalLogsTree().should('be.visible');
getManualChatModalLogsEntries().should('have.length', 1);
closeManualChatModal();
logs.getOverviewPanelBody().should('not.exist');
getManualChatInput().should('not.exist');
getManualChatModalLogs().should('not.exist');
getManualChatModal().should('not.exist');
});
it('should auto-add chat trigger and basic LLM chain when adding LLM node', () => {
@@ -454,11 +453,11 @@ describe('Langchain Integration', () => {
cy.createFixtureWorkflow('Test_workflow_chat_partial_execution.json');
workflowPage.actions.zoomToFit();
getManualChatModal().find('main').should('not.exist');
getManualChatModal().should('not.exist');
openNode('Node 1');
ndv.actions.execute();
getManualChatModal().find('main').should('exist');
getManualChatModal().should('exist');
sendManualChatMessage('Test');
getManualChatMessages().should('contain', 'this_my_field_1');

View File

@@ -1,5 +1,4 @@
import { stringify } from 'flatted';
import { pick } from 'lodash';
import type {
IDataObject,
IRunData,
@@ -115,7 +114,7 @@ export function runMockWorkflowExecution({
cy.push('nodeExecuteBefore', {
executionId,
nodeName,
data: pick(nodeRunData, ['startTime', 'executionIndex', 'source', 'hints']),
data: nodeRunData,
});
cy.push('nodeExecuteAfter', {
executionId,

View File

@@ -304,7 +304,7 @@ export const schema = {
logs_view: {
enabled: {
format: Boolean,
default: true,
default: false,
env: 'N8N_ENABLE_LOGS_VIEW',
doc: 'Temporary env variable to enable logs view',
},

View File

@@ -141,7 +141,6 @@ watch(
type="secondary"
icon="trash"
icon-size="medium"
data-test-id="clear-execution-data-button"
:class="$style.clearButton"
@click.stop="emit('clearExecutionData')"
>{{ locale.baseText('logs.overview.header.actions.clearExecution') }}</N8nButton