Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Fix Multi option parameter expression when the value is an array #12430

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ShireenMissi
Copy link
Contributor

@ShireenMissi ShireenMissi commented Jan 2, 2025

Summary

In multi option parameters, the array is an acceptable value for expressions
This PR:

  • Fixes a regression where the expression was converted to a string causing the FE validation to fail and reject arrays
  • Fixes a bug when switching from fixed to expression, the value was surrounded by {{}} which made the expression invalid.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/NODE-1535/multi-options-component-dont-show-error-when-using-array-in-expression

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@ShireenMissi ShireenMissi marked this pull request as draft January 2, 2025 12:42
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jan 2, 2025
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ckages/editor-ui/src/components/ParameterInput.vue 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ShireenMissi ShireenMissi marked this pull request as ready for review January 2, 2025 15:06
@michael-radency
Copy link
Contributor

@ShireenMissi I would say this change should be scoped to multi-options input, now it would affect all inputs, that could cause some regressions

@ShireenMissi ShireenMissi force-pushed the node-1535-multi-options-component-dont-show-error-when-using-array-in-expression branch from ec14da6 to f5ad7d1 Compare January 3, 2025 14:45
@ShireenMissi ShireenMissi added the tests-needed This PR needs additional tests label Jan 3, 2025
Copy link
Contributor

github-actions bot commented Jan 3, 2025

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link

cypress bot commented Jan 3, 2025

n8n    Run #8565

Run Properties:  status check failed Failed #8565  •  git commit 4d4dbaa445: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ShireenMissi 🗃️ e2e/*
Project n8n
Branch Review node-1535-multi-options-component-dont-show-error-when-using-array-in-expression
Run status status check failed Failed #8565
Run duration 04m 37s
Commit git commit 4d4dbaa445: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 ShireenMissi 🗃️ e2e/*
Committer Shireen Missi
View all properties for this run ↗︎

Test results
Tests that failed  Failures 3
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 355
View all changes introduced in this branch ↗︎

Tests for review

Failed  14-mapping.cy.ts • 2 failed tests

View Output Video

Test Artifacts
Data mapping > maps expressions from table header Test Replay Screenshots Video
Data mapping > maps expressions from json view Test Replay Screenshots Video
Failed  45-workflow-selector-parameter.cy.ts • 1 failed test

View Output Video

Test Artifacts
Workflow Selector Parameter > should render add resource option and redirect to the correct route when clicked Test Replay Screenshots Video
Failed  26-resource-locator.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  25-stickies.cy.ts • 0 failed tests

View Output

Test Artifacts
Failed  233-AI-switch-to-logs-on-error.cy.ts • 0 failed tests

View Output

Test Artifacts

The first 5 failed specs are shown, see all 42 specs in Cypress Cloud.

Flakiness  e2e/19-execution.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Execution > connections should be colored differently for pinned data > when executing a node Test Replay Screenshots Video

@ShireenMissi ShireenMissi force-pushed the node-1535-multi-options-component-dont-show-error-when-using-array-in-expression branch from 4d4dbaa to 7952f9c Compare January 3, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team tests-needed This PR needs additional tests ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants