Commit graph

77 commits

Author SHA1 Message Date
OlegIvaniv 541850f95f
feat(editor): Add support for schema view in the NDV output (#5688)
* feat(editor): Add support for schema view in the NDV output

* Make intercepts waiting optional in waitForLoad method

* Update RunDataSchema snapshots

* Do not reset output panel view on execution, properly key run RunDataSchemaItem to make sure they are unique across panels

* Update snapshot tests

* Make adding of schema view button option more readable
2023-03-16 10:19:12 +01:00
OlegIvaniv de1db927cb
feat(editor): Do not show actions panel for single-action nodes (#5683) 2023-03-14 16:41:49 +01:00
OlegIvaniv a96861b87f
test(editor): Fix the failing 7-workflow-actions spec (no-changelog) (#5682)
test(editor): Change `IMPORT_WORKFLOW_URL` to fix the failing `7-workflow-actions` spec (no-changelog)
2023-03-14 10:30:13 +01:00
OlegIvaniv 5c4343b828
test(editor): Improve e2e pipeline performance & fix flaky tests (no-changelog) (#5672)
* Split up canvas spec, extract community nodes related tests into its own spec, various flakiness fixes

* Remove unnecessary cy.waitForLoad from 7-workflow-actiosn spec
2023-03-10 16:54:54 +01:00
कारतोफ्फेलस्क्रिप्ट™ edf6313fa5
ci: Fix e2e tests (no-changelog) (#5658)
* ci: Fix e2e tests (no-changelog)

* Fix sign-in cypress command

* Run smoke test against head branch instead of base

---------

Co-authored-by: Oleg Ivaniv <oleg@n8n.io>
2023-03-09 17:08:47 +01:00
OlegIvaniv a9c63f980f
feat(editor): Only redirect new users to blank canvas (no-changelog) (#5654)
* feat(editor): Bring new users to empty canvas

* fix(editor): Revert empty /workflows redirect

* Provide `COMMIT_INFO_BRANCH` and uncomment demo experiment

* Only change redirect after set-up/sign-up to new canvas

* Fix failing specs

* Prevent redirect for demo experiment

* Fix workflows cards spacing
2023-03-09 15:26:27 +01:00
OlegIvaniv ac2f89a18a
feat(editor): Do not automatically add manual trigger on node plus (#5644)
* feat(editor): Do not add manual trigger node if node creator trigger via canvas actions

* Add e2e tests

* Install cypress-plugin-tab, do not use cy.realPress as it hangs the tests

* Exclude tab tests
2023-03-09 15:22:12 +01:00
OlegIvaniv 354edf6886
feat(editor): Redirect users to canvas if they don't have any workflows (#5629)
* feat(editor): Bring new users to empty canvas

* Fix failing e2e tests and revert CLI implementation

* Revert editor-ui Interface changes

* Try to mock /settings and /active

* Revert canvas test changes, reload after executions in 20-workflow-executions

* Make sure we include manual executiosn before running them in 20-workflow-executions

* Make sure to re-init node view when replacing empty workflows route, show phantom loader
2023-03-08 15:11:13 +01:00
OlegIvaniv 0004dc7ee8
ci(editor): Run e2e tests in parallel and improve build caching (#5445)
* WIP: Cypress parallel CI run test

* Trigger action on branch push

* Change build artifacts path

* Make sure to checkout the repo for testing job

* Use Cypress action for installing

* Lock cypress action userd version

* Skip node install step since we're using cypress node16 container

* Let Cypress handle pnpm install

* Use setup-node action for caching pnpm

* Set CYPRESS_CACHE_FOLDER

* Set CYPRESS_CACHE_FOLDER

* Manually cache pnpm store

* Dont fix pnpm version

* Use caching action also in testing job

* Zip packages dist before uploading the artifacts and change caching key

* Use absolute build paths for zipping job

* Use zip command in action

* Use tar for zipping packages

* Debuggin directory ls

* Debugging caching of modules

* Attempt to fix permissions issue

* Porivde Cypress executable via `CYPRESS_RUN_BINARY`

* Cache /github/home

* Adjust caching keys

* Debug: search for cypress exec

* Debugging: List dirs

* Use pnpm install action to install node_modules

* Do not log /home/runner

* Use node_modules/.bin Cypress binary

* Use absolute path to nodue modules

* Run Cypress via custom command

* Try with patched cypress action

* Revert logging

* Manually specify cypress config file

* Use absolute paths

* Fix cypress config name

* Debug print cypress config

* Remove debugging, increase to 4 containers

* Increase amount of containers

* Add env-version matrix

* Replace node14 with node18 in testing matrix

* Remove debugging and add node 14

* Use just node14

* Use cypress:base and remove browser req

* Give more general timeouts

* Try with node16

* Change cache directive position

* Replace zip artifact upload with cache

* Cache full packages not just dist

* Test with variable inputs

* Add commit info message

* Remove wrongly commited code

* Allow WF API dispatch

* Try Chrome browser again for comparison

* Include Monaco in the build

* Make e2e workflow re-usable

* Comment out invalid reusable workflow args

* Use electron and add node 14 run

* Fix env arg

* Provide custom ci-build-id

* Refactor remaining e2e workflow to use reusable action

* Remove single matrix directive

* Refactor ci-pull-req

* Make lint job dependant on test jobs

* Disable debugging job

* Make containers dynamic

* Cleanup & install git for linting action

* Use regular buntu image for PR linting

* Debugging failing tests

* Remove fixed spec name

* Debug e2e env var

* Do not use realkeypress which crashes electron runner

* Debugging

* chore: remove console

* chore: remove console

* test: remove node 14 tests

* test: replace test branch with master

* test: use tests in current branch

* test: use relative path

* chore: clean up

* test: only trigger on approval

* ci: update test PR

* ci: use curr branch

* ci: only run 14 on schedule, not for slack command

* ci: only run test on approval

* ci: clean up branch, rename step

* ci: rename steps

* ci: clean up cancel

* ci: clean up env var

* ci: set var

* ci: use chromef

* ci: use electron

* chore: add console log

* chore: add console log

* ci: update to string

* ci: set all env options

* test: build

* ci: fix step issue

* Fix failing tests & upgrade to Cypress 12

* Allow WF dispatch of e2e reusable

* Fix wrong naming in e2e-tests workflow

* Redeploy

* Fix tests

* Fix NDV tests and remove skipping of webhooks execution tests

* Fix clipboard read command

* Fix execution failing tests

* Reset before each 15 and 3

* Fix flaky tests

* Cleanup and log envs

* Test fixes

* Default owner spec fixes

* Get rid of CYPRESS_RUN_ENV

* Increase amount of containers, cleanup and add mock for credentials test call

* Cleanup & fix PR tests unit tests

* Wait for WF to loade in sharing spec

* Do linting and unit tests first

* Use frozen lockfile

* Revert back ci pull request jobs order

* Refine credential input selector and move cy.waitForLoad to correct position in 15-scheduler spec

* test: build

* Wait for WF execution instead of arbitraty timeout in WF execution spec, change order of jobs for ci pull request

* Fix flaky 3-default owner spec and wait for execution list to load in 20-workflow-executions

* Use setup node action

* Remove caching for lint/unit tests

* Experiment with parallel test & lint on ci

* Provide cache key dynamically

* Run e2e in parallel on pr

* Only run node14 e2e on daily schedule

* Make sure to generate generate new ci-build-id on re-runs

* Remove debugging prints

* Address PR comments

* Rename custom onBeforeUnload handler

* Make sure 19-execution spec waits for wf to load properly before import fixtures

---------

Co-authored-by: Mutasem <mutdmour@gmail.com>
2023-03-02 16:50:21 +01:00
Mutasem Aldmour 1f7b478920
fix: Fix mapping paths when appending to empty expression (#5591)
* fix: Fix mapping when appending to empty expression

* fix: refactor logic out

* test: add tests

* test: add tests

* fix: fix bug where value does not get updated when mapping

* test: add test for bug

* test: add test for bug
2023-03-02 15:02:29 +03:00
कारतोफ्फेलस्क्रिप्ट™ d09ca875ec
ci: Do not reset the server for every e2e sub-test (no-changelog) (#5521) 2023-02-24 18:07:35 +01:00
OlegIvaniv 1c0966957d
fix(editor): Fix adding of wrong actions when filtering in the node actions panel (no-changelog) (#5518) 2023-02-20 15:59:38 +01:00
OlegIvaniv 9a1e7b52f7
feat(editor): Unify regular and trigger node creator panels (#5315)
* WIP: Merge TriggerHelperPanel with MainPanel

* WIP: Implement switching between views

* Remove logging

* WIP: Rework search

* Fix category toggling and search results display

* Fix node item description

* Sort actions based on the root view

* Adjust personalisation modal, make trigger canvas node round

* Linting fixes

* Fix filtering of API options

* Fix types and no result state

* Cleanup

* Linting fixes

* Adjust mode prop for node creator tracking

* Fix merging of core nodes and filtering of single placeholder actions

* Lint fixes

* Implement actions override, fix node creator view item spacing and increase click radius of trigger node icon

* Fix keyboard view navigation

* WIP: E2E Tests

* Address product review

* Minor fixes & cleanup

* Fix tests

* Some more test fixes

* Add specs to check actions and panels

* Update personalisation survey snapshot
2023-02-17 15:08:26 +01:00
Csaba Tuncsik 593b5d299a
test(editor): Execution testing from UI perspective (no-changelog) (#5429)
* test(editor): Execution testing from UI perspective

* test(editor): Execution testing from UI perspective

* test(editor): Execution test rename

* test(editor): Execution test rename and add stop test

* test(editor): Execution test with webhook

* test(editor): Execution test with webhook
2023-02-16 11:41:25 +01:00
Alex Grozav 246189f6da
feat: Add workflow and credential sharing access e2e tests (#5463)
feat: add workflow and credential sharing access e2e tests
2023-02-14 16:13:00 +02:00
Milorad FIlipović 3b9eec77ec
test(editor): Add e2e tests for executions preview (#5458)
*  Added initial tests for executions preview
* 🔥 Removing unneeded actions
* 👌 Renaming test suite, moving mock executions logic to util function
2023-02-14 11:39:19 +01:00
Milorad FIlipović 8494c97821
test(editor): Add e2e tests for personal settings page (#5451)
 Added tests for personal user settings
2023-02-10 13:12:06 +01:00
Milorad FIlipović d9a4c2c66d
test(editor): Add user management e2e tests (#5438)
*  Added initial UM test using new commands
*  Added rest of the UM tests
2023-02-09 16:00:55 +01:00
Mutasem Aldmour b8980f6118
test: Add more data mapping tests (#5389)
* test: Add more data mapping tests

* test: add tests for preview mapping

* test: update wording

* test: add more tests

* test: fix up prev node test

* test: stop popup

* test: add mapping test for paths

* test: revert back param changes

* test: fix mapping tests

* test: reset db

* test: fix up mapping tests

* test: fix up mapping tests

* test: update tests to be more stable

* chore: clean up unused command

* fix: fix up before unload bug

* fix: fix data transformation tests

* test: fix up flaky webhook tests

* test: fix up flaky webhook tests

* test: fix up flaky dt tests
2023-02-09 17:59:01 +03:00
Iván Ovejero e0c4c25227
test: Add e2e workflow tags (no-changelog) (#5411)
* 🧪 Add workflow tags tests

*  Create `openTagManagerModal`

*  Add wait to prevent detached DOM element

*  Add wait to mirror other tests
2023-02-09 10:04:12 +01:00
Alex Grozav e059caf993
feat: Add e2e user invite test suite (no-changelog) (#5412) 2023-02-08 22:41:35 +02:00
OlegIvaniv 14d1743595
test(editor): Add canvas dragging tests (no-changelog) (#5406)
* WIP

* Fix undo/redo tests and add canvas tests

* Cleanup

* Cleanup

* Use drag and draganddrop commands

* Fix hanging CI run

* Undo redo spec
2023-02-08 14:48:28 +01:00
Iván Ovejero d8865aa917
test: Add e2e for data transformation expressions (#5375)
* 🧪 Add e2e for data transormation expressions

* ♻️ Apply feedback
2023-02-08 10:41:36 +01:00
Michael Auerswald 9fb1fa1d79
ci: Add E2E tests for Webhook node (#5402)
* scheduler e2e test and switch to main mode

* adjust e2e options

* rolling back config changes

* webhook e2e tests and disable cypress retries on openmode

* cleanup
2023-02-07 17:51:11 +01:00
Milorad FIlipović d05203db30
test(editor): Enable adding nodes in between any two nodes on canvas in e2e tests (no-changelog) (#5393)
*  Adding source and target test data to connection HTML elements
*  Using new action to add node on the connection
* 🔥 Removing leftover log
* 🔥 Removing leftover test action
* 👌 Refactoring to address PR feedback
2023-02-07 16:34:08 +01:00
Michael Auerswald dd652c0b0d
ci: Add E2E test for scheduled trigger (#5391)
* scheduler e2e test and switch to main mode

* adjust e2e options

* rolling back config changes
2023-02-07 12:41:44 +01:00
Mutasem Aldmour db49f052bc
test: Add data mapping test (#5372)
* test: add tests for pinning

* test: add test for value

* test: add pinned data tests

* test: refactor into ndv

* refactor: move to ndv

* refactor: rename node

* test: fix test

* test: fix refactor

* test: remove unused id

* test: update test

* test: chain rename input

* test: refactor invoking text

* test: fix ndv tests

* test: move test id

* test: add tests for mapping

* test: update selectors

* test: add mapping

* test: remove wait

* test: add back line removed by mistake

* test: refactor to support both in/output displays

* test: add display mode switching

* test: fix drop

* chore: clean up change

* refactor: add draganddrop

* fix: fix drag and drop

* test: add mapping test for second value

* test: update text

* test: update param
2023-02-07 07:47:37 +03:00
Milorad FIlipović 03afd3c7cf
test(editor): Improve canvas e2e tests reliability (#5376)
✔️ Improving reliability of connection actions hover
2023-02-06 16:33:59 +01:00
OlegIvaniv 6985500a7d
fix(core): Fix populating of node custom api call options (#5347)
* feat(core): Fix populating of node custom api call options

* lint fixes

* Adress PR comments

* Add e2e test and only inject custom API options for latest version

* Make sure to injectCustomApiCallOption for the latest version of node

* feat(cli): Move apiCallOption injection to LoadNodesAndCredentials and add e2e tests to check for custom nodes credentials

* Load nodes and credentials fixtures from a single place

* Console warning if credential is invalid during customApiOptions injection
2023-02-03 13:14:59 +01:00
OlegIvaniv 616074158c
fix(core): Revert custom API option injecting (#5345)
Revert "feat(core): Fix populating of node custom api call options (#5303)"

This reverts commit e58bc41d24.
2023-02-02 20:03:45 +01:00
OlegIvaniv e58bc41d24
feat(core): Fix populating of node custom api call options (#5303)
* feat(core): Fix populating of node custom api call options

* lint fixes

* Adress PR comments

* Add e2e test and only inject custom API options for latest version

* Make sure to injectCustomApiCallOption for the latest version of node
2023-02-02 14:53:08 +01:00
Iván Ovejero 6d811f0d9f
feat(editor): Completions for extensions in expression editor (#5130)
* 🔥 Remove test extensions

* 🚧 Add test description

* 📘 Expand types

*  Export extensions

*  Export collection

*  Mark all proxies

* ✏️ Rename for clarity

*  Export from barrel

*  Create datatype completions

*  Mount datatype completions

* 🧪 Adjust tests

*  Add `path` prop

* 🔥 Remove `()` from completion labels

*  Filter out completions for pseudo-proxies

* 🐛 Fix method error

*  Add metrics

* ✏️ Improve naming

*  Start completion on empty resolvable

*  Implement completion previews

*  Break out completion manager

*  Implement in expression editor modal

* ✏️ Improve naming

*  Filter out irrelevant completions

*  Add preview hint

* ✏️ Improve comments

* 🎨 Style preview hint

*  Expand `hasNoParams`

*  Add spacing for readability

*  Add error codes

* ✏️ Add comment

* 🐛 Fix Esc behavior

*  Parse Unicode

*  Throw on invalid `DateTime`

*  Fix second root completion detection

*  Switch message at completable prefix position

* 🐛 Fix function names for non-dev build

* 🐛 Fix `json` handling

* 🔥 Comment out previews

* ♻️ Apply feedback

* 🔥 Remove extensions

* 🚚 Rename extensions

*  Adjust some implementations

* 🔥 Remove dummy extensions

* 🐛 Fix object regex

* ♻️ Apply feedback

* ✏️ Fix typos

* ✏️ Add `fn is not a function` message

* 🔥 Remove check

*  Add `isNotEmpty` for objects

* 🚚 Rename `global` to `alpha`

* 🔥 Remove `encrypt`

*  Restore `is not a function` error

*  Support `week` on `extract()`

* 🧪 Fix tests

*  Add validation to some string extensions

*  Validate number arrays in some extensions

* 🧪 Fix tests

* ✏️ Improve error message

*  Revert extensions framework changes

* 🧹 Previews cleanup

*  Condense blank completions

*  Refactor dollar completions

*  Refactor non-dollar completions

*  Refactor Luxon completions

*  Refactor datatype completions

*  Use `DATETIMEUNIT_MAP`

* ✏️ Update test description

*  Revert "Use `DATETIMEUNIT_MAP`"

This reverts commit 472a77df5c.

* 🧪 Add tests

* ♻️ Restore generic extensions

* 🔥 Remove logs

* 🧪 Expand tests

*  Add `Math` completions

* ✏️ List breaking change

*  Add doc tooltips

* 🐛 Fix node selector regex

* 🐛 Fix `context` resolution

* 🐛 Allow dollar completions in args

*  Make numeric array methods context-dependent

* 📝 Adjust docs

* 🐛 Fix selector ref

*  Surface error for valid URL

* 🐛 Disallow whitespace in `isEmail` check

* 🧪 Fix test for `isUrl`

*  Add comma validator in `toFloat`

*  Add validation to `$jmespath()`

*  Revert valid URL error

*  Adjust `$jmespath()` validation

* 🧪 Adjust `isUrl` test

*  Remove `{}` and `[]` from compact

* ✏️ Update docs

* 🚚 Rename `stripTags` to `removeTags`

*  Do not inject whitespace inside resolvable

*  Make completions aware of `()`

* ✏️ Add note

*  Update sorting

*  Hide active node name from node selector

* 🔥 Remove `length()` and its aliases

*  Validate non-zero for `chunk`

* ✏️ Reword all error messages

* 🐛 Fix `$now` and `$today`

*  Simplify with `stripExcessParens`

*  Fold luxon into datatype

* 🧪 Clean up tests

* 🔥 Remove tests for removed methods

* 👕 Fix type

* ⬆️ Upgrade lang pack

*  Undo change to `vitest` command

* 🔥 Remove unused method

*  Separate `return` line

* ✏️ Improve description

* 🧪 Expand tests for initial-only completions

* 🧪 Add bracket-aware completions

*  Make check for `all()` stricter

* ✏️ Adjust explanatory comments

* 🔥 Remove unneded copy

* 🔥 Remove outdated comment

*  Make naming consistent

* ✏️ Update comments

*  Improve URL scheme check

* ✏️ Add comment

* 🚚 Move extension

* ✏️ Update `BREAKING-CHANGES.md`

* ✏️ Update upcoming version

* ✏️ Fix grammar

* ✏️ Shorten message

* 🐛 Fix `Esc` behavior

* 🐛 Fix `isNumeric`

*  Support native methods

* 🧪 Skip Pinia tests

* ✏️ Shorten description

* 🔥 Remove outdated comment

* 🧪 Unskip Pinia tests

* ✏️ Add comments

* 🧪 Expand tests to natives

* ✏️ Add clarifying comments

*  Use `setTimeout` to make telemetry non-blocking

* 🐛 Account for no active node in cred modal

*  Resolve without workflow

* 🔥 Remove `Esc` handling on NDV

*  Use `isDateTime`

* 🚚 Move `unique` to next phase

This array extension takes optional args.

*  Merge export

* 🧪 Fix tests

*  Restore check

* ✏️ Make breaking change description more accurate

* 🧪 Fix e2e tests
2023-02-02 12:35:38 +01:00
OlegIvaniv 766501723b
refactor(editor): Upgrade to jsPlumb 5 (#4989)
* WIP: Nodeview

* Replace types

* Finish N8nPlus endpoint type

* Working on connector

* Apply prettier

* Fixed prettier issues

* Debugging rendering

* Fixed connectorrs position recalc

* Fix snapping and output labels, WIP dragging

* Fix N8nPlus endpoint rendering issues

* Cleanup

* Fix undo/redo and canvas add button position, cleanup

* Cleanup

* Revert accidental CLI changes

* Fix pnpm-lock

* Address bugs that came up during review

* Reset CLI package from master

* Various fixes

* Fix run items label toggling

* Linter fixes

* Fix stalk size for larger run items label

* Remove comment

* Correctly reset workspace after renaming the node

* Fix canvas e2e tests

* Fix undo/redo tests

* Fix stalk positioning and triggering of endpoint overlays

* Repaint connections on pin removal

* Limit repaintings

* Unbind jsPlumb events on deactivation

* Fix jsPlumb managment of Sticky and minor memort managment improvments

* Address rest of PR points

* Lint fix

* Copy patches folder to docker

* Fix e2e tests

* set allowNonAppliedPatches to allow build

* fix(editor): Handling router errors when navigation is canceled by user (#5271)

* 🔨 Handling router errors in main sidebar, removing unused code
* 🔨 Handling router errors in modals

* ci(core): Fix docker nightly/custom image build (no-changelog) (#5284)

* ci(core): Copy patches dir to Docker (no-changelog)

* Update patch

* Update package-lock

* reapply the patch

* skip patchedDependencies after the frontend is built

---------

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>

* Fix connector hover state on success

* Remove allowNonAppliedPatches from package.json

---------

Co-authored-by: Milorad FIlipović <milorad@n8n.io>
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-01-30 18:20:50 +01:00
Alex Grozav b2f59c3f39
feat: Add multiple workflows text search filtering E2E test scenarios (no-changelog) (#5276)
feat: Add multiple workflows text search filtering E2E test scenarios

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-01-30 14:28:59 +02:00
कारतोफ्फेलस्क्रिप्ट™ 845f0f9d20
refactor(core): Switch over all user-management routes to use decorators (#5115) 2023-01-27 11:19:47 +01:00
Iván Ovejero 0a7ea89633
fix: Fix formatting/linting for CI (no-changelog) (#5264)
* ⬆️ Upgrade Prettier

* 📦 Update `pnpm-lock.yaml`

* 🎨 Format all packages

* 🔧 Specify `prettierPath`
2023-01-27 10:18:15 +01:00
Milorad FIlipović b321c5e4ec
feat(editor): Simplify NDV by moving authentication details to credentials modal (#5067)
*  Removing authentication parameter from NDV
*  Added auth type selector to credentials modal
* 🔨 Extracting reusable logic to util functions
*  Updating credentials position, adding label for radio buttons
*  Using first node credentials for nodes with single auth options and hiding auth selector UI in that case
*  Fixing credentials modal when opened from credentials page
*  Showing all available credentials in NDV credentials dropdown
*  Updating node credentials dropdown component to show credentials description. Disabling `Credentials of type not found` error in node
*  Moving auth related fields from NDV to credentials modal. Added support for multiple auth fileds
*  Moving NDV fields that authentication depends on to credentials modal
*  Keeping old auth/credentials UI in NDV for HTTP Request and Webhook nodes. Pre-populating credential type for HTTP request node when selected from 'app action' menu
* 💄 Use old label and field position for nodes that use old credentials UI in NDV
*  Implementing more generic way to find node's auth fileds
* 📚 Adding comments on parameter hiding logic
*  Fixing node auth options logic for multiple auth fields
* 👕 Fixing lint errors
* 💄 Addressing design review comments
*  Not selecting first auth option when opening new credential dialog
*  Using default credentials name and icon if authentication type is not selected
*  Updating credential data when auth type is changed
*  Setting new credentials type for HTTP Request and Webhook nodes
*  Setting nodes with access when changing auth type
* 👕 Fixing lint error
*  Updating active node auth type from credentials modal
*  Syncronizing credentials modal and dropdown
* 👕 Fixing linter error
*  Handling credential dropdown UI for multiple credentials
* 👕 Removing unused imports
*  Handling auth selection when default auth type is the first option
*  Updating credentials change listening logic
*  Resetting credential data when deleting a credential, disabling 'Details' and 'Sharing' tabs if auth type is not selected
* 🐛 Skipping credentials type check when showing mixed credentials in the dropdown and switching credentials type
*  Showing credential modal tabs for saved credentials
*  Preventing renaming credentials when no auth type is selected
* 🐛 Fixing credentials modal when opened from credentials page
*  Keeping auth radio buttons selected when switching tabs
*  Adding initial batch of credentials NDV tests
*  Updating node auth filed value when new credential type is selected
*  Using all available credential types for current node to sync credential dropdown with modal
*  Sorting mixed credentials by date, simplifying credential dropdown option logic
* 🔨 Extracting some reusable logic to utils
*  Improving required vs optional credentials detection and using it to show auth radio buttons
* 👕 Fixing lint errors
*  Adding more credentials tests
*  Filtering credential options based on authentication type
* 🔨 Refactoring credentials and auth utils
*  Updated handling of auth options in credentials modal to work with new logic
* 🔨 Getting the terminology in line
* 📚 Removing leftover comment
*  Updating node auth filed detection logic to account for different edge-cases
*  Adding Wait node as an exception for new UI
*  Updating NDV display when auth type changes
*  Updating default credentials name when auth type changes
*  Hiding auth settings after credentials are saved
*  Always showing credentials modal menu tabs
*  Improving main auth field detection logic so it doesn't account for authentication fields which can have `none` value
*  Restoring accidentally deleted not existing credential issue logic
*  Updating other nodes when deleted credentials have been updated
*  Using filtered auth type list to show or hide radio buttons section in credentials modal
* 👕 Addressing lint error
* 👌 Addressing PR review feedback
* 👕 Fixing lint issues
*  Updating main auth filed detection logic so it checks full dependency path to determine if the field is required or optional
* 👌 Addressing the rest of PR feedback
*  Updating credential tests
*  Resetting credential data on authentication type change
*  Created AuthTypeSelector component
* 👌 Addressing PR comments
*  Not resetting overwritten credential properties when changing auth type
*  Hiding auth selector section if there are no options to show
2023-01-27 09:05:43 +01:00
Alex Grozav 874c735d0a
feat: Improve workflow list performance using RecycleScroller and on-demand sharing data loading (#5181)
* feat(editor): Load workflow sharedWith info only when opening share modal (#5125)

* feat(editor): load workflow sharedWith info only when opening share modal

* fix(editor): update workflow share modal loading state at the end of initialize fn

* feat: initial recycle scroller commit

* feat: prepare recycle scroller for dynamic item sizes (no-changelog)

* feat: add recycle scroller with variable size support and caching

* feat: integrated recycle scroller with existing resources list

* feat: improve recycle scroller performance

* fix: fix recycle-scroller storybook

* fix: update recycle-scroller styles to fix scrollbar size

* chore: undo vite config changes

* chore: undo installed packages

* chore: remove commented code

* chore: remove vue-virtual-scroller code.

* feat: update size cache updating mechanism

* chore: remove console.log

* fix: adjust code for e2e tests

* fix: fix linting issues
2023-01-27 09:51:32 +02:00
Mutasem Aldmour a89c9c68d1
test: Add tests for pinning data (#5157)
* test: add tests for pinning

* test: add test for value

* test: add pinned data tests

* test: refactor into ndv

* refactor: move to ndv

* refactor: rename node

* test: fix test

* test: fix refactor

* test: remove unused id

* test: update test

* test: chain rename input

* test: refactor invoking text

* test: fix ndv tests

* test: move test id

* test: update selectors
2023-01-18 15:48:36 +01:00
OlegIvaniv 582865c7e9
feat(editor): Supress validation errors for freshly added nodes (#5149)
* feat(editor): Supress validation errors when node is added from node creator

* Supress initial errors also for resource locator inputs

* Use nodeMetadata prop to store node's `pristine` state

* Revert `setNodeParameters` check for `nodeMetadata`

* Rename getIsNodePristine to isNodePristine
2023-01-16 14:55:58 +01:00
Michael Auerswald 871a1d7dad
fix(editor): Fixes event bus test (#5119)
* create webhook instead of sentry destination

* remove wait()
2023-01-10 11:45:51 +01:00
Mutasem Aldmour 7df0728999
test: Fix default owner test to be able to reach setup page (#5113)
test: fix default owner test
2023-01-09 17:23:39 +01:00
Iván Ovejero bae1487a53
test: Fix e2e tests for inline expression editor (#5108)
🧪 Fix e2e tests for inline expression editor
2023-01-09 11:44:15 +01:00
Michael Auerswald b67f803cbe
feat: Add global event bus (#4860)
* fix branch

* fix deserialize, add filewriter

* add catchAll eventGroup/Name

* adding simple Redis sender and receiver to eventbus

* remove native node threads

* improve eventbus

* refactor and simplify

* more refactoring and syslog client

* more refactor, improved endpoints and eventbus

* remove local broker and receivers from mvp

* destination de/serialization

* create MessageEventBusDestinationEntity

* db migrations, load destinations at startup

* add delete destination endpoint

* pnpm merge and circular import fix

* delete destination fix

* trigger log file shuffle after size reached

* add environment variables for eventbus

* reworking event messages

* serialize to thread fix

* some refactor and lint fixing

* add emit to eventbus

* cleanup and fix sending unsent

* quicksave frontend trial

* initial EventTree vue component

* basic log streaming settings in vue

* http request code merge

* create destination settings modals

* fix eventmessage options types

* credentials are loaded

* fix and clean up frontend code

* move request code to axios

* update lock file

* merge fix

* fix redis build

* move destination interfaces into workflow pkg

* revive sentry as destination

* migration fixes and frontend cleanup

* N8N-5777 / N8N-5789 N8N-5788

* N8N-5784

* N8N-5782 removed event levels

* N8N-5790 sentry destination cleanup

* N8N-5786 and refactoring

* N8N-5809 and refactor/cleanup

* UI fixes and anonymize renaming

* N8N-5837

* N8N-5834

* fix no-items UI issues

* remove card / settings label in modal

* N8N-5842 fix

* disable webhook auth for now and update ui

* change sidebar to tabs

* remove payload option

* extend audit events with more user data

* N8N-5853 and UI revert to sidebar

* remove redis destination

* N8N-5864 / N8N-5868 / N8N-5867 / N8N-5865

* ui and licensing fixes

* add node events and info bubbles to frontend

* ui wording changes

* frontend tests

* N8N-5896 and ee rename

* improves backend tests

* merge fix

* fix backend test

* make linter happy

* remove unnecessary cfg / limit  actions to owners

* fix multiple sentry DSN and anon bug

* eslint fix

* more tests and fixes

* merge fix

* fix workflow audit events

* remove 'n8n.workflow.execution.error' event

* merge fix

* lint fix

* lint fix

* review fixes

* fix merge

* prettier fixes

* merge

* review changes

* use loggerproxy

* remove catch from internal hook promises

* fix tests

* lint fix

* include review PR changes

* review changes

* delete duplicate lines from a bad merge

* decouple log-streaming UI options from public API

* logstreaming -> log-streaming for consistency

* do not make unnecessary api calls when log streaming is disabled

* prevent sentryClient.close() from being called if init failed

* fix the e2e test for log-streaming

* review changes

* cleanup

* use `private` for one last private property

* do not use node prefix package names.. just yet

* remove unused import

* fix the tests

because there is a folder called `events`, tsc-alias is messing up all imports for native events module.
https://github.com/justkey007/tsc-alias/issues/152

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2023-01-04 09:47:48 +01:00
Csaba Tuncsik 0da338f9b5
feat(editor): Add usage and plan pages (#4819)
* feat(editor): Usage and plan page (#4793)

feat(editor): usage and plan page

* feat(editor): Update Usage and plan page (#4842)

* feat(editor): usage and plan store

* feat(editor): usage and plan page updates

* feat(editor): usage and plan add buttons and alert

* tes(editor): usage and plan store

* tes(editor): usage remove refresh button and add link to view plans

* tes(editor): usage use info tip

* tes(editor): usage info style

* feat(editor): Get quotas data (#4866)

feat(editor): get quotas data

* feat(editor): In-app experience (#4875)

* feat: Add license quotas endpoint

* feat: Add trigger count to workflow activation process

* refactor: Get quotas from db

* feat: Add license information

*  - finalised GET /license endpoint

* 🔨 - getActiveTriggerCount return 0 instead of null

* 🐛 - ignore manualTrigger when counting active triggers

*  - add activation endpoint

*  - added renew endpoint

* 🔨 - added return type interfaces

* 🔨 - handle license errors where methods are called

* 🔨 - rename function to match name from lib

* feat(editor): usage add plans buttons logic

* 🚨 - testing new License methods

* feat(editor): usage add more business logic

* chore(editor): code formatting

* 🚨 - added license api tests

* fix(editor): usage store

* fix(editor): usage update translations

* feat(editor): usage add license activation modal

* feat(editor): usage change subscription app url

* feat(editor): usage add contact us link

* feat(editor): usage fix modal width

*  - Add renewal tracking metric

*  - add license data to pulse event

* 🔨 - set default triggercount on entity model

*  - add db migrations for mysql and postgres

* fix(editor): Usage api call data processing and error handling

* fix(editor): Usage fix activation query key

* 🚨 - add initDb to telemetry tests

* 🔨 - move getlicensedata to licenseservice

* 🔨 - return 403 instead of 404 to non owners

* 🔨 - move owner checking to middleware

* 🐛 - fixed incorrectly returned error from middleware

* 🐛 - using mock instead of test db for pulse tests

* fix(editor): Usage fix activation and add success messages

* fix(editor): Usage should not renew activation right after activation

* 🚨 - skipping failing pulse tests for now

* fix(editor): Usage add telemetry calls and apply design review outcomes

* feat(editor): Hide usage page according to BE flag

* feat(editor): Usage modify key activation flow

* feat(editor): Usage change subscription app url

* feat(editor): Usage add telemetry for manage plan

* feat(editor): Usage extend link url query params

* feat(editor): Usage add line chart if there is a workflow limit

* feat(editor): Usage remove query after key activation redirection

* fix(editor): Usage handle limit exceeded workflow chart, add focus to input when modal opened

* fix(editor): Usage activation can return router promise when removing query

* fix(editor): Usage and plan design review

* 🐛 - fix renew endpoint hanging issue

* 🐛 - fix license activation bug

* fix(editor): Usage proper translation for plans and/or editions

* fix(editor): Usage apply David's review results

* fix(editor): Usage page set as default and first under Settings

* fix(editor): Usage open subscription app in new tab

* fix(editor): Usage page having key query param a plan links

* test: Fix broken test

* fix(editor): Usage page address review

* 🧪 Flush promises on telemetry tests

*  Extract helper with `setImmediate`

* 🔥 Remove leftovers

*  Use Adi's helper

* refactor: Comment broken tests

* refactor: add Tenant id to settings

* feat: add environment to license endpoints

* refactor: Move license environment to general settings

* fix: fix routing bug

* fix(editor): Usage page some code review changes and formatting

* fix(editor): Usage page remove direct usage of reusable translation keys

* fix(editor): Usage page async await instead of then

* fix(editor): Usage page show some content only if network requests in component mounted were successful

* chore(editor): code formatting

* fix(editor): Usage checking license environment

* feat(editor): Improve license activation error messages (no-changelog) (#4958)

* fix(editor): Usage changing activation error title

* remove unnecessary import

* fix(editor): Usage refactor notification showing

* fix(editor): Usage using notification directly in store actions

Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: freyamade <freya@n8n.io>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Cornelius Suermann <cornelius@n8n.io>

* fix(editor): Usage change mounted lifecycle logic

* fix(editor): Usage return after successful activation in mounted

* fix: remove console log

* test: fix tests related to settings (#4979)

Co-authored-by: Omar Ajoue <krynble@gmail.com>
Co-authored-by: freyamade <freya@n8n.io>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Cornelius Suermann <cornelius@n8n.io>
Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
2022-12-20 10:52:01 +01:00
Milorad FIlipović 96296e1724
test(editor): Add canvas actions e2e tests (#4950)
*  Added some more workflow actions tests
*  Updating duplicate workflow tests
*  Fixed duplicate workflow tests
*  Added first batch of canvas tests
*  Added zoom and select tests
*  Added tests for adding and deleting nodes
*  Adding a wait before clicking connection action buttons
*  Adding tests for node actions
* 👌 Addressing review feedback
* 👌 Addressing PR feedback
2022-12-20 10:33:20 +01:00
Iván Ovejero 3028ad3c61
refactor: Format root-level dirs (no-changelog) (#4938)
🎨 Format root-level dirs
2022-12-15 16:39:59 +01:00
Iván Ovejero 4208040495
test(editor): Add e2e tests for inline expression editor (#4936)
🧪 Add tests for inline expression editor
2022-12-15 15:36:28 +01:00
Milorad FIlipović 9956547504
test(editor): Add more tests for workflow actions (no-changelog) (#4931)
*  Added test for importing workflow from URL
*  Added test for importing workflow from file
*  Added test ids for workflow settings elements
*  Added test for changing workflow settings
*  Adding back missing test id for delete node button
2022-12-14 17:13:03 +01:00
Iván Ovejero a1259898c0
feat(editor): Inline expression editor (#4814)
* WIP

* 🔥 Remove unneeded watch

*  Further setup

*  Fix import

*  Minor tweaks

* 🔥 Remove logging

* 🎨 Add some styling

* 🎨 More styling changes

* 🐛 Fix wrong marking of stale data

* 🎨 Prevent fx on dragging

* 🔥 Remove logging

*  Refine draggable target offsets

* refactor(editor): Consolidate expression management logic (#4836)

*  Extract `ExpressionFunctionIcon`

*  Simplify syntax

*  Move to mixin

* 🎨 Format

* 📘 Unify types

*  Dedup double brace handler

*  Consolidate resolvable highlighter

* 🎨 Format

*  Consolidate language pack

* ✏️ Add comment

*  Move completions to plugins

*  Partially deduplicate themes

* refactor(editor): Apply styling feedback to inline expression editor (#4846)

* 🎨 Adjust styling for expression parameter input

* 🎨 Style outputs differently

*  Set single line for RLC

* 🎨 Style both openers identically

* 🐛 Prevent defocus on resize

*  Adjust line height

* 🎨 Adjust border with for expression input

*  Fix font family for inline output

*  Set up telemetry

*  Complete telemetry

*  Simplify event source

*  Set monospaced font for inline output

* 🎨 Hide cursor on schema pill drop

* 🧪 Update snapshots

*  Consolidate editor styles

* ✏️ Add tech debt comments

*  Improve naming

*  Improve inside resolvable detection

*  Improve var naming

* 🔥 Remove outdated comment

* 🚚 Move constant to data

* ✏️ Clarify comments

* 🔥 Remove outdated comments

* 🔥 Remove unneeded try-catch

* 🔥 Remove unneeded method

* 🔥 Remove unneeded check

* 🔥 Remove `openExpression` check

* 🔥 Remove unused timeout

* 🔥 Remove commented out sections

*  Use Pinia naming convention

*  Re-evaluate on change of `ndvInputData`

* 🐛 Fix handling of `0` in number-type input

* 🐛 Surface focus and blur for mapping hints

* 🔥 Remove logging

* ✏️ Reword error

*  Change kebab-case to PascalCase

*  Refactor state fields for clarity

*  Support double bracing on selection

* 🎨 More styling

*  Miscellaneous cleanup

*  Disregard error on drop

* 🎨 Fix schema pill styling

* 🎨 More `background` to `background-color` fixes

* 🧪 Update snapshots

* 🎨 Replace non-existing var with white

* 🧪 Update snapshot

* 📦 Integrate `codemirror-lang-n8n-expression`

* 🎨 Fix formatting

* 🧪 Re-update test snapshots

* 🧪 Update selectors for inline editor

* 🔥 Remove unused test ID

* 📘 Add type for `currentNodePaneType`

*  Refactor mixin to util

*  Use `:global`

* 🔥 Remove comment

*  Add watch

*  Change import style

* 👕 Fix lint

*  Refactor preventing blur on resize

* 🔥 Remove comment

* 🧪 Re-update snapshots

* 🎨 Prettify

* 👕 Fix lint

* 🔥 Remove comment

Co-authored-by: Mutasem <mutdmour@gmail.com>
2022-12-14 14:43:02 +01:00