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
This commit is contained in:
OlegIvaniv
2023-03-09 15:22:12 +01:00
committed by GitHub
parent d872866add
commit ac2f89a18a
8 changed files with 131 additions and 18 deletions

View File

@@ -38,7 +38,12 @@
<script lang="ts">
import Vue from 'vue';
import { getMidCanvasPosition } from '@/utils/nodeViewUtils';
import { DEFAULT_STICKY_HEIGHT, DEFAULT_STICKY_WIDTH, STICKY_NODE_TYPE } from '@/constants';
import {
DEFAULT_STICKY_HEIGHT,
DEFAULT_STICKY_WIDTH,
NODE_CREATOR_OPEN_SOURCES,
STICKY_NODE_TYPE,
} from '@/constants';
import { mapStores } from 'pinia';
import { useUIStore } from '@/stores/ui';
@@ -94,7 +99,10 @@ export default Vue.extend({
document.addEventListener('mousemove', moveCallback, false);
},
openNodeCreator() {
this.$emit('toggleNodeCreator', { source: 'add_node_button', createNodeActive: true });
this.$emit('toggleNodeCreator', {
source: NODE_CREATOR_OPEN_SOURCES.ADD_NODE_BUTTON,
createNodeActive: true,
});
},
addStickyNote() {
if (document.activeElement) {