mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Fix Paired item error message (#15171)
This commit is contained in:
committed by
GitHub
parent
abb8225944
commit
be72f736ac
@@ -299,11 +299,7 @@ describe('Projects', { disableAutoLogin: true }, () => {
|
|||||||
workflowPage.actions.saveWorkflowOnButtonClick();
|
workflowPage.actions.saveWorkflowOnButtonClick();
|
||||||
workflowPage.actions.addNodeToCanvas('Execute Workflow', true, true);
|
workflowPage.actions.addNodeToCanvas('Execute Workflow', true, true);
|
||||||
|
|
||||||
cy.window().then((win) => {
|
cy.window().then((win) => cy.stub(win, 'open').callsFake((url) => cy.visit(url)));
|
||||||
cy.stub(win, 'open').callsFake((url) => {
|
|
||||||
cy.visit(url);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
selectResourceLocatorItem('workflowId', 0, 'Create a');
|
selectResourceLocatorItem('workflowId', 0, 'Create a');
|
||||||
// Need to wait for the trigger node to auto-open after a delay
|
// Need to wait for the trigger node to auto-open after a delay
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ describe('NDV', () => {
|
|||||||
.nodeRunErrorMessage()
|
.nodeRunErrorMessage()
|
||||||
.should(
|
.should(
|
||||||
'have.text',
|
'have.text',
|
||||||
"Using the item method doesn't work with pinned data in this scenario. Please unpin 'Break pairedItem chain' and try again.",
|
"Paired item data for item from node 'Break pairedItem chain' is unavailable. Ensure 'Break pairedItem chain' is providing the required output.",
|
||||||
);
|
);
|
||||||
ndv.getters
|
ndv.getters
|
||||||
.nodeRunErrorDescription()
|
.nodeRunErrorDescription()
|
||||||
|
|||||||
@@ -792,7 +792,11 @@ export class WorkflowDataProxy {
|
|||||||
nodeCause: string,
|
nodeCause: string,
|
||||||
usedMethodName: 'itemMatching' | 'pairedItem' | 'item' | '$getPairedItem' = 'pairedItem',
|
usedMethodName: 'itemMatching' | 'pairedItem' | 'item' | '$getPairedItem' = 'pairedItem',
|
||||||
) => {
|
) => {
|
||||||
const message = `Using the ${usedMethodName} method doesn't work with pinned data in this scenario. Please unpin '${nodeCause}' and try again.`;
|
const pinData = getPinDataIfManualExecution(that.workflow, nodeCause, that.mode);
|
||||||
|
const message = pinData
|
||||||
|
? `Using the ${usedMethodName} method doesn't work with pinned data in this scenario. Please unpin '${nodeCause}' and try again.`
|
||||||
|
: `Paired item data for ${usedMethodName} from node '${nodeCause}' is unavailable. Ensure '${nodeCause}' is providing the required output.`;
|
||||||
|
|
||||||
return new ExpressionError(message, {
|
return new ExpressionError(message, {
|
||||||
runIndex: that.runIndex,
|
runIndex: that.runIndex,
|
||||||
itemIndex: that.itemIndex,
|
itemIndex: that.itemIndex,
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ describe('WorkflowDataProxy', () => {
|
|||||||
expect(error).toBeInstanceOf(ExpressionError);
|
expect(error).toBeInstanceOf(ExpressionError);
|
||||||
const exprError = error as ExpressionError;
|
const exprError = error as ExpressionError;
|
||||||
expect(exprError.message).toEqual(
|
expect(exprError.message).toEqual(
|
||||||
"Using the item method doesn't work with pinned data in this scenario. Please unpin 'Break pairedItem chain' and try again.",
|
"Paired item data for item from node 'Break pairedItem chain' is unavailable. Ensure 'Break pairedItem chain' is providing the required output.",
|
||||||
);
|
);
|
||||||
expect(exprError.context.type).toEqual('paired_item_no_info');
|
expect(exprError.context.type).toEqual('paired_item_no_info');
|
||||||
done();
|
done();
|
||||||
|
|||||||
Reference in New Issue
Block a user