Commit graph

65 commits

Author SHA1 Message Date
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
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
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 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
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
Iván Ovejero 3028ad3c61
refactor: Format root-level dirs (no-changelog) (#4938)
🎨 Format root-level dirs
2022-12-15 16:39:59 +01:00
Milorad FIlipović 69e9bf082b
test(editor): Add e2e tests for undo/redo (#4904)
*  Added history store and mixin
*  Implemented node position change undo/redo
*  Implemented move nodes bulk command
*  Not clearing the redo stack after pushing the bulk command
* 🔨 Implemented commands using classes
* 🔥 Removed unnecessary interfaces and actions
* 🔥 Removing unused constants
* 🔨 Refactoring classes file
*  Adding eventBus to command obects
*  Added undo/redo support for adding and removing nodes
*  Implemented initial add/remove connections undo support
*  Covering some corner cases with reconnecting nodes
*  Adding undo support for reconnecting nodes
*  Fixing going back and forward between undo and redo
*  Implemented async command revert
*  Preventing push to undo if bulk redo/undo is in progress
*  Handling re-connecting nodes and stopped pushing empty bulk actions to undo stack
*  Handling adding a node between two connected nodes
*  Handling the case of removing multiple connections on the same index. Adding debounce to undo/redo keyboard calls
*  Removing unnecessary timeouts, adding missing awaits, refactoring
*  Resetting history when opening new workflow, fixing incorrect bulk recording when inserting node
* ✔️ Fixing lint error
*  Minor refactoring + some temporary debugging logs
*  Preserving node properties when undoing it's removal, removing some unused repaint code
*  Added undo/redo support for import workflow and node enable/disable
* 🔥 Removing some unused constant
*  Added undo/redo support for renaming nodes
*  Fixing rename history recording
*  Added undo/redo support for duplicating nodes
* 📈 Implemented telemetry events
* 🔨 A bit of refactoring
*  Fixing edgecases in removing connection and moving nodes
*  Handling case of adding duplicate nodes when going back and forward in history
*  Recording connections added directly to store
*  Moving main history reset after wf is opened
* 🔨 Simplifying rename recording
* 📈 Adding NDV telemetry event, updating existing event name case
* 📈 Updating telemetry events
*  Added initial undo/redo tests
*  Fixing duplicate connections on undo/redo
*  Stopping undo events from firing constantly on keydown
*  Added connection test for undo/redo
* 📈 Updated telemetry event for hitting undo in NDV
*  Adding undo support for disabling nodes using keyboard shortcuts
*  Added more tests for adding and deleting nodes undo/redo
*  Preventing adding duplicate connection commands to history
* 📈 Adding connection assertions to delete node tests
*  Clearing redo stack when new change is added
*  Preventing adding connection actions to undo stack while redoing them
* 👌 Addressing PR comments part 1
* 👌 Moving undo logic for disabling nodes to `NodeView`
* 👌 Implemented command comparing logic
*  Fix for not clearing redo stack on every user action
*  Fixing recording when moving nodes
*  Fixing undo for moving connections
*  Fixing tracking new nodes after latest merge
*  Fixing broken bulk delete
*  Added tests for moving nodes
*  Added tests for deleting connections
*  Added tests for disabling nodes
*  Added node rename tests
*  Added tests for duplicating and pasting nodes
*  Added multi-step undo/redo tests
*  Fixing assertion condition
*  Fixing timeout issue between keyboard strokes
* ⬆️ Updating pnpm lock file
*  Waiting for page load to finish before each test
*  Adding proper handling of meta key press
* 🚨 Temporarily disabling slack notifications
*  Adding check before clicking connection actions
*  Removing comments from other undo tests
* 🎨 Fixing a typo
2022-12-14 10:33:44 +01:00
OlegIvaniv 297a043875
test(editor): Fix flaky workflow tags e2e tests and store screenshots from CI runs (#4903)
* test(editor): Fix flaky add tags e2e specs, and upload cypress artifacts on failure

* Only run smoke test to debug the pipeline

* Add waitForLoad command and revert debugging changes
2022-12-13 11:55:51 +01:00
OlegIvaniv 1c36c37a12
test(editor): Fix flaky e2e tests (#4779)
* test(editor): Fix default-owner and credentials saving e2e specs

* test(editor): fix webhook node test

* test(editor): add cy command for browser permissions

* test(editor): add cy command for reading clipboard

* Fix 3-default-owner spec

* Resolve review comments

* Merge spec

* Fix http node and expression editor modal specs

* Add optional param to credentials modal saving action to wait for the test endpoint

* Improve sidebar items clicking and increase credentials saving timeout

* Rename http e2e spec to fix ordering

* Fix pasting and copying of nodes e2e spec

* Make sure to only access error.cause if it exists

* Wait longer for the keyboard press

* Make sure to focus the body when typing

* Try type delay

* Use meta key based on the running platform

* Fix flaky workflowTagElements getter

Co-authored-by: Csaba Tuncsik <csaba@n8n.io>
2022-12-07 18:16:38 +01:00
Milorad FIlipović e07e32f14d
test(editor): Add more workflow actions tests (#4799)
*  Making workflow actions tests skip setup, changing suite number
* 🔥 Removing unnecessary imports and vars
*  Adding workflow tags and copy/paste tests
*  Added tests for copying and pasting nodes
* Update cypress/support/commands.ts
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
* 👌 Moving paste data to fixtures
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2022-12-05 14:31:14 +01:00
Alex Grozav 622118f983
feat: Make use of db:reset in all test suites (no-changelog) (#4739)
* feat: Make use of db:reset in all test suites

* refactor: Rename task to no longer use db: prefix

* feat: wrap cypress tasks into commands

* refactor: rename resetDatabase to resetAll

* fix: update test:e2e:all to use --headless
2022-11-28 18:11:33 +01:00
Mutasem Aldmour d46050c974
test: Add initial e2e tests for default owner setup (#4710)
* use user-folder override consistently everywhere, including for the `.cache` folder

* use consistent config for e2e tesing, skipping config loading from env and config files

* simplify all the cypress commands, and run all e2e tests on master

* add tests for skipping owner setup

* add todos

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
2022-11-24 12:52:09 +01:00
Alex Grozav b5b44d1b59
feat: Add credentials E2E test suite and page object (#4596)
* fix: Fix inferred type of X cannot be named error after pnpm update

* feat: Change page objects to expose actions and getters. Add credential creation suite
2022-11-22 11:37:26 +02:00
OlegIvaniv 50f7538779
refactor(editor): Add Workflows view e2e tests (#4573) 2022-11-11 09:07:14 +01:00
Alex Grozav 77644860c0
feat: Add cypress e2e tests for signup and signin (#3490)
* feat: Added cypress setup files.

* feat: Added server bootup and initial test run.

* feat: Added e2e tests for signin, signup, and personalization form.

* feat: Added e2e tests for adding a function node.

* feat: Added set node and workflow execution steps.

* feat: Added test id to main sidebar.

* feat: Added test for creating a new workflow.

* feat: Finished test for creating a blank workflow

* chore: Removed screenshots from e2e tests.

* refactor: change e2e tests to per page structure

* feat: add cypress type enchancements

* feat: add typescript for cypress tests

* fix: remove component after merge

* feat: update cypress definitions

* feat: add cypress cleanup task

* refactor: update cypress script names

* ci: add smoke tests to workflow

* chore: remove cypress example files

* feat: update signup flow to be reusable

* fix: fix signup route for cypress page object

* fix: remove cypress reset command

* fix: remove unused imports

* fix: Add unhandled error catcher
2022-11-08 14:21:10 +02:00