refactor(editor): Refactor history and debounce mixins to composables (no-changelog) (#5930)

* refactor(editor): Refactor history and debounce mixins to composables and add unit tests (no-changelog)

* Lint fix and use userEvent to fire keydown events

* Fix debounce spec
This commit is contained in:
OlegIvaniv
2023-04-18 11:47:08 +02:00
committed by GitHub
parent 3810039da0
commit 9693142985
6 changed files with 346 additions and 126 deletions

View File

@@ -45,10 +45,11 @@ import { useUsersStore } from './stores/users';
import { useRootStore } from './stores/n8nRootStore';
import { useTemplatesStore } from './stores/templates';
import { useNodeTypesStore } from './stores/nodeTypes';
import { historyHelper } from '@/mixins/history';
import { useHistoryHelper } from '@/composables/useHistoryHelper';
import { newVersions } from '@/mixins/newVersions';
import { useRoute } from 'vue-router/composables';
export default mixins(newVersions, showMessage, userHelpers, restApi, historyHelper).extend({
export default mixins(newVersions, showMessage, userHelpers, restApi).extend({
name: 'App',
components: {
LoadingView,
@@ -56,10 +57,9 @@ export default mixins(newVersions, showMessage, userHelpers, restApi, historyHel
Modals,
},
setup() {
const { registerCustomAction, unregisterCustomAction } = useGlobalLinkActions();
return {
registerCustomAction,
unregisterCustomAction,
...useGlobalLinkActions(),
...useHistoryHelper(useRoute()),
};
},
computed: {