From 976586fbfd033a8eed2525f5e88cafd978200e59 Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Tue, 7 Jan 2025 19:05:52 +0200 Subject: [PATCH] test: Update demo e2e tests for new canvas (no-changelog) (#12488) --- cypress/composables/workflow.ts | 5 ++++- .../components/canvas/elements/nodes/CanvasNode.vue | 11 ++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cypress/composables/workflow.ts b/cypress/composables/workflow.ts index 29b871f560..3289d43a79 100644 --- a/cypress/composables/workflow.ts +++ b/cypress/composables/workflow.ts @@ -46,7 +46,10 @@ export function getNodes() { } export function getNodeByName(name: string) { - return cy.getByTestId('canvas-node').filter(`[data-name="${name}"]`).eq(0); + return cy.ifCanvasVersion( + () => cy.getByTestId('canvas-node').filter(`[data-name="${name}"]`).eq(0), + () => cy.getByTestId('canvas-node').filter(`[data-node-name="${name}"]`).eq(0), + ); } export function disableNode(name: string) { diff --git a/packages/editor-ui/src/components/canvas/elements/nodes/CanvasNode.vue b/packages/editor-ui/src/components/canvas/elements/nodes/CanvasNode.vue index ff42272288..5dbd08db32 100644 --- a/packages/editor-ui/src/components/canvas/elements/nodes/CanvasNode.vue +++ b/packages/editor-ui/src/components/canvas/elements/nodes/CanvasNode.vue @@ -311,7 +311,12 @@ onBeforeUnmount(() => {