feat(editor): Update Sub-Workflow Debugging Copy (#12483)

This commit is contained in:
Charlie Kolb 2025-01-07 17:06:16 +01:00 committed by GitHub
parent cc008f9239
commit 04e2928d34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 22 additions and 17 deletions

View file

@ -40,7 +40,7 @@ describe('Subworkflow debugging', () => {
openNode('Execute Workflow with param');
getOutputPanelItemsCount().should('contain.text', '2 items, 1 sub-execution');
getOutputPanelRelatedExecutionLink().should('contain.text', 'Inspect Sub-Execution');
getOutputPanelRelatedExecutionLink().should('contain.text', 'View sub-execution');
getOutputPanelRelatedExecutionLink().should('have.attr', 'href');
// ensure workflow executed and waited on output
@ -64,7 +64,7 @@ describe('Subworkflow debugging', () => {
openNode('Execute Workflow with param2');
getOutputPanelItemsCount().should('not.exist');
getOutputPanelRelatedExecutionLink().should('contain.text', 'Inspect Sub-Execution');
getOutputPanelRelatedExecutionLink().should('contain.text', 'View sub-execution');
getOutputPanelRelatedExecutionLink().should('have.attr', 'href');
// ensure workflow executed but returned same data as input
@ -109,7 +109,7 @@ describe('Subworkflow debugging', () => {
openNode('Execute Workflow with param');
getOutputPanelItemsCount().should('contain.text', '2 items, 1 sub-execution');
getOutputPanelRelatedExecutionLink().should('contain.text', 'Inspect Sub-Execution');
getOutputPanelRelatedExecutionLink().should('contain.text', 'View sub-execution');
getOutputPanelRelatedExecutionLink().should('have.attr', 'href');
// ensure workflow executed and waited on output
@ -125,7 +125,7 @@ describe('Subworkflow debugging', () => {
getExecutionPreviewOutputPanelRelatedExecutionLink().should(
'include.text',
'Inspect Parent Execution',
'View parent execution',
);
getExecutionPreviewOutputPanelRelatedExecutionLink()

View file

@ -282,7 +282,7 @@ describe('RunData', () => {
});
expect(getByTestId('related-execution-link')).toBeInTheDocument();
expect(getByTestId('related-execution-link')).toHaveTextContent('Inspect Sub-Execution 123');
expect(getByTestId('related-execution-link')).toHaveTextContent('View sub-execution');
expect(resolveRelatedExecutionUrl).toHaveBeenCalledWith(metadata);
expect(getByTestId('related-execution-link')).toHaveAttribute('href', MOCK_EXECUTION_URL);
@ -311,7 +311,7 @@ describe('RunData', () => {
});
expect(getByTestId('related-execution-link')).toBeInTheDocument();
expect(getByTestId('related-execution-link')).toHaveTextContent('Inspect Parent Execution 123');
expect(getByTestId('related-execution-link')).toHaveTextContent('View parent execution');
expect(resolveRelatedExecutionUrl).toHaveBeenCalledWith(metadata);
expect(getByTestId('related-execution-link')).toHaveAttribute('href', MOCK_EXECUTION_URL);
@ -344,7 +344,7 @@ describe('RunData', () => {
});
expect(getByTestId('related-execution-link')).toBeInTheDocument();
expect(getByTestId('related-execution-link')).toHaveTextContent('Inspect Sub-Execution 123');
expect(getByTestId('related-execution-link')).toHaveTextContent('View sub-execution 123');
expect(resolveRelatedExecutionUrl).toHaveBeenCalledWith(metadata);
expect(getByTestId('related-execution-link')).toHaveAttribute('href', MOCK_EXECUTION_URL);
@ -389,7 +389,7 @@ describe('RunData', () => {
});
expect(getByTestId('related-execution-link')).toBeInTheDocument();
expect(getByTestId('related-execution-link')).toHaveTextContent('Inspect Sub-Execution 123');
expect(getByTestId('related-execution-link')).toHaveTextContent('View sub-execution 123');
expect(queryByTestId('ndv-items-count')).not.toBeInTheDocument();
expect(getByTestId('run-selector')).toBeInTheDocument();

View file

@ -1263,9 +1263,13 @@ function getExecutionLinkLabel(task: ITaskMetadata): string | undefined {
}
if (task.subExecution) {
return i18n.baseText('runData.openSubExecution', {
interpolate: { id: task.subExecution.executionId },
});
if (activeTaskMetadata.value?.subExecutionsCount === 1) {
return i18n.baseText('runData.openSubExecutionSingle');
} else {
return i18n.baseText('runData.openSubExecutionWithId', {
interpolate: { id: task.subExecution.executionId },
});
}
}
return;

View file

@ -149,7 +149,7 @@ const outputError = computed(() => {
>
<N8nIcon icon="external-link-alt" size="xsmall" />
{{
i18n.baseText('runData.openSubExecution', {
i18n.baseText('runData.openSubExecutionWithId', {
interpolate: {
id: runMeta.subExecution?.executionId,
},

View file

@ -439,7 +439,7 @@ watch(focusedMappableInput, (curr) => {
>
<N8nTooltip
:content="
i18n.baseText('runData.table.inspectSubExecution', {
i18n.baseText('runData.table.viewSubExecution', {
interpolate: {
id: `${tableData.metadata.data[index1]?.subExecution.executionId}`,
},
@ -575,7 +575,7 @@ watch(focusedMappableInput, (curr) => {
>
<N8nTooltip
:content="
i18n.baseText('runData.table.inspectSubExecution', {
i18n.baseText('runData.table.viewSubExecution', {
interpolate: {
id: `${tableData.metadata.data[index1]?.subExecution.executionId}`,
},

View file

@ -1600,8 +1600,9 @@
"resourceMapper.staleDataWarning.notice": "Refresh to see the updated fields",
"resourceMapper.attemptToConvertTypes.displayName": "Attempt to convert types",
"resourceMapper.attemptToConvertTypes.description": "Attempt to convert types when mapping fields",
"runData.openSubExecution": "Inspect Sub-Execution {id}",
"runData.openParentExecution": "Inspect Parent Execution {id}",
"runData.openSubExecutionSingle": "View sub-execution",
"runData.openSubExecutionWithId": "View sub-execution {id}",
"runData.openParentExecution": "View parent execution {id}",
"runData.emptyItemHint": "This is an item, but it's empty.",
"runData.emptyArray": "[empty array]",
"runData.emptyString": "[empty]",
@ -1649,7 +1650,7 @@
"runData.showBinaryData": "View",
"runData.startTime": "Start Time",
"runData.table": "Table",
"runData.table.inspectSubExecution": "Inspect sub-execution {id}",
"runData.table.viewSubExecution": "View sub-execution {id}",
"runData.pindata.learnMore": "Learn more",
"runData.pindata.thisDataIsPinned": "This data is pinned.",
"runData.pindata.unpin": "Unpin",