n8n/cypress/e2e
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
..
1-workflows.cy.ts ci: Refactor e2e tests to delete boilerplate code (no-changelog) (#6524) 2023-06-23 00:38:12 +02:00
2-credentials.cy.ts ci: Skip the regularly failing tests in 2-credentials.cy.ts (no-changelog) (#7736) 2023-11-16 17:42:58 +01:00
4-node-creator.cy.ts feat(editor): Filter component + implement in If node (#7490) 2023-12-13 14:45:22 +01:00
5-ndv.cy.ts fix(editor): Fix operation change failing in certain conditions (#8114) 2023-12-22 08:41:20 +01:00
6-code-node.cy.ts ci: Fix prettier auto-formatting (no-changelog) (#7063) 2023-09-01 13:29:31 +02:00
7-workflow-actions.cy.ts fix(editor): Only show push to git menu item to owners (#7766) 2023-11-21 15:20:15 +01:00
8-http-request-node.cy.ts feat(editor): Add HTTP request nodes for credentials without a node (#7157) 2023-11-13 12:11:16 +01:00
9-expression-editor-modal.cy.ts feat: Data transformation nodes and actions in Nodes Panel (#7760) 2023-12-08 11:40:05 +01:00
10-settings-log-streaming.cy.ts feat(editor): Migrate Design System and Editor UI to Vue 3 (#6476) 2023-07-28 09:51:07 +02:00
10-undo-redo.cy.ts fix(editor): Fix copy/paste issue when switch node is in workflow (#8103) 2023-12-20 10:13:59 +01:00
11-inline-expression-editor.cy.ts feat: Data transformation nodes and actions in Nodes Panel (#7760) 2023-12-08 11:40:05 +01:00
12-canvas-actions.cy.ts feat(editor): Add node context menu (#7620) 2023-11-20 14:37:12 +01:00
12-canvas.cy.ts feat(editor): Add node context menu (#7620) 2023-11-20 14:37:12 +01:00
13-pinning.cy.ts feat(editor): Add node context menu (#7620) 2023-11-20 14:37:12 +01:00
14-data-transformation-expressions.cy.ts feat(Set Node): Overhaul (#6348) 2023-09-19 13:16:35 +03:00
14-mapping.cy.ts feat: Data transformation nodes and actions in Nodes Panel (#7760) 2023-12-08 11:40:05 +01:00
15-scheduler-node.cy.ts feat(editor): Migrate Design System and Editor UI to Vue 3 (#6476) 2023-07-28 09:51:07 +02:00
16-form-trigger-node.cy.ts feat(n8n Form Trigger Node): Improvements (#7571) 2023-12-13 17:00:51 +02:00
16-webhook-node.cy.ts fix(Convert to/from binary data Node): Rename 'Move Binary Data' to 'Convert to/from binary data' (#7318) 2023-10-04 13:23:33 +02:00
17-sharing.cy.ts fix(editor): Add back credential use permission (#8023) 2023-12-14 13:36:36 +01:00
17-workflow-tags.cy.ts fix(editor): Close tags dropdown when modal is opened (#6766) 2023-07-28 10:45:46 +02:00
18-user-management.cy.ts feat: Introduce advanced permissions (#7844) 2023-12-08 12:52:25 +01:00
19-execution.cy.ts fix(editor): Fix deletion of last execution at execution preview (#7883) 2023-11-30 12:12:26 +01:00
20-workflow-executions.cy.ts fix(editor): Turn off executions list auto-refresh after leaving the page (#8005) 2023-12-14 11:50:00 +01:00
21-community-nodes.cy.ts feat(editor): Migrate Design System and Editor UI to Vue 3 (#6476) 2023-07-28 09:51:07 +02:00
23-variables.cy.ts ci: Refactor e2e tests to delete boilerplate code (no-changelog) (#6524) 2023-06-23 00:38:12 +02:00
24-ndv-paired-item.cy.ts feat: Data transformation nodes and actions in Nodes Panel (#7760) 2023-12-08 11:40:05 +01:00
25-stickies.cy.ts fix(editor): Make keyboard shortcuts more strict; don't accept extra Ctrl/Alt/Shift keys (#8024) 2023-12-20 12:06:49 +01:00
26-resource-locator.cy.ts feat: Data transformation nodes and actions in Nodes Panel (#7760) 2023-12-08 11:40:05 +01:00
27-cloud.cy.ts fix: Show public API upgrade CTA when feature is not enabled (#8109) 2023-12-21 09:06:54 -05:00
27-two-factor-authentication.cy.ts test: Add user type of admin to E2E tests (#7935) 2023-12-06 14:31:06 +01:00
28-debug.cy.ts perf(editor): Improve performance when opening large workflows with node issues (#7901) 2023-12-04 10:57:03 +01:00
28-resource-mapper.cy.ts fix(editor): Fix remote options fetching on every keystroke (#7320) 2023-10-12 14:18:35 +02:00
29-sql-editor.cy.ts feat(Loop Over Items (Split in Batches) Node): Automatically add a loop + rename (#7228) 2023-10-06 15:31:18 +02:00
29-templates.cy.ts fix(editor): Update image sizes in template description not to be full width always (#8037) 2023-12-18 17:40:00 +01:00
30-editor-after-route-changes.cy.ts fix(editor): Reset canvas zoom before workspace reset in node view (#7625) 2023-11-06 18:15:49 +01:00
30-if-node.cy.ts feat(editor): Filter component + implement in If node (#7490) 2023-12-13 14:45:22 +01:00
30-langchain.cy.ts feat: Add AI tool building capabilities (#7336) 2023-11-29 12:13:55 +01:00
30-workflow-filters.cy.ts ci: Disable Workflow filters e2e tests to unblock the CI (no-changelog) (#7668) 2023-11-09 13:30:17 +01:00
31-demo.cy.ts fix(editor): Allow overriding theme from query params (#7591) 2023-11-02 16:06:33 +01:00
32-node-io-filter.cy.ts feat(editor): Node IO filter (#7503) 2023-11-15 16:19:48 +01:00
32-worker-view.cy.ts feat(editor): Finalize workers view (#8052) 2023-12-20 17:49:14 +01:00
33-settings-personal.cy.ts fix(editor): Validate user info before submiting (#7608) 2023-11-22 12:14:44 +01:00
34-template-credentials-setup.cy.ts feat(editor): Show template credential setup based on feature flag (#7989) 2023-12-11 20:21:10 +02:00
35-admin-user-smoke-test.cy.ts feat: Introduce advanced permissions (#7844) 2023-12-08 12:52:25 +01:00
36-suggested-templates.cy.ts feat(editor): Add lead enrichment suggestions to workflow list (#8042) 2023-12-19 09:10:03 -05:00
36-versions.cy.ts fix(editor): Move versions check to init function and refactor store (no-changelog) (#8067) 2023-12-20 12:49:40 +02:00