n8n/cypress/pages
Milorad FIlipović 711fa2b925
fix(editor): Fix operation change failing in certain conditions (#8114)
## Summary
This PR handles the case when there are multiple parameters with the
same name but different `options` and `displayOptions`. In this case, if
one of such fields is set, changing the dependent parameter value so the
other should be shown causes an error in case their options are not
compatible (this
[check](7806a65229/packages/workflow/src/NodeHelpers.ts (L786))).

#### Example:
LDAP node has two `options` properties with the same name:
1. `attributes` with predefined options (`add`, `replace`, `delete`).
Shown when **Update** operation is selected
2. `attributes` with a collection of `attribute` objects. Shows for the
**Create** operation

Setting one of these parameter values and switching operation so the
other is shown breaks the app.
This PR checks if there is a value saved for such parameter and removes
it before calling `getNodeParameters` in `valueChanged` handler.

## Related tickets and issues
Fixes ADO-1589

## Review / Merge checklist
- [x] PR title and summary are descriptive. **Remember, the title
automatically goes into the changelog. Use `(no-changelog)` otherwise.**
([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md))
- [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up
ticket created.
- [x] Tests included.
> A bug is not considered fixed, unless a test is added to prevent it
from happening again.
   > A feature is not complete without tests.
2023-12-22 08:41:20 +01:00
..
features feat(editor): Add HTTP request nodes for credentials without a node (#7157) 2023-11-13 12:11:16 +01:00
modals feat: Introduce advanced permissions (#7844) 2023-12-08 12:52:25 +01:00
sidebar fix(editor): Fix Admin panel icon in the sidebar for cloud deployments (no-changelog) (#7738) 2023-11-17 14:44:47 +01:00
bannerStack.ts fix(editor): Trial banner does not disappear after sign out (no-changelog) (#6930) 2023-08-17 07:57:40 -04:00
base.ts refactor: Format root-level dirs (no-changelog) (#4938) 2022-12-15 16:39:59 +01:00
credentials.ts refactor: Upgrade to Prettier 3 (no-changelog) (#6947) 2023-08-16 17:13:57 +02:00
demo.ts fix(editor): Allow overriding theme from query params (#7591) 2023-11-02 16:06:33 +01:00
index.ts fix: Show public API upgrade CTA when feature is not enabled (#8109) 2023-12-21 09:06:54 -05:00
mfa-login.ts feat(core): Add MFA (#4767) 2023-08-23 22:59:16 -04:00
ndv.ts fix(editor): Fix operation change failing in certain conditions (#8114) 2023-12-22 08:41:20 +01:00
settings-log-streaming.ts feat(editor): Migrate Design System and Editor UI to Vue 3 (#6476) 2023-07-28 09:51:07 +02:00
settings-personal.ts refactor(editor): Color palette updates, introduce dark mode (#6980) 2023-11-01 13:33:36 +01:00
settings-public-api.ts fix: Show public API upgrade CTA when feature is not enabled (#8109) 2023-12-21 09:06:54 -05:00
settings-usage.ts fix: Fix formatting/linting for CI (no-changelog) (#5264) 2023-01-27 10:18:15 +01:00
settings-users.ts feat: Introduce advanced permissions (#7844) 2023-12-08 12:52:25 +01:00
settings.ts feat: Introduce advanced permissions (#7844) 2023-12-08 12:52:25 +01:00
signin.ts feat(core): Add MFA (#4767) 2023-08-23 22:59:16 -04:00
template-collection.ts feat(editor): Open template credential setup from collection (#7882) 2023-11-30 14:09:12 +02:00
template-credential-setup.ts feat(editor): Show template credential setup based on feature flag (#7989) 2023-12-11 20:21:10 +02:00
template-workflow.ts fix(editor): Update image sizes in template description not to be full width always (#8037) 2023-12-18 17:40:00 +01:00
templates.ts test: Ado 1296 add e2e tests (#7792) 2023-11-27 17:18:10 +02:00
variables.ts feat(editor): Migrate Design System and Editor UI to Vue 3 (#6476) 2023-07-28 09:51:07 +02:00
workerView.ts fix(editor): Move workerview entry into settings menu (#7761) 2023-11-21 11:29:24 +01:00
workflow-executions-tab.ts fix(editor): Turn off executions list auto-refresh after leaving the page (#8005) 2023-12-14 11:50:00 +01:00
workflow-history.ts fix(editor): Fix route component caching, incorrect use of array reduce method and enable WF history feature (#7434) 2023-10-26 20:47:42 +02:00
workflow.ts fix(editor): Fix copy/paste issue when switch node is in workflow (#8103) 2023-12-20 10:13:59 +01:00
workflows.ts feat(editor): Add lead enrichment suggestions to workflow list (#8042) 2023-12-19 09:10:03 -05:00