mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
test: Update demo e2e tests for new canvas (no-changelog) (#12488)
This commit is contained in:
parent
04e2928d34
commit
976586fbfd
|
@ -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) {
|
||||
|
|
|
@ -311,7 +311,12 @@ onBeforeUnmount(() => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="classes" data-test-id="canvas-node" :data-node-type="data.type">
|
||||
<div
|
||||
:class="classes"
|
||||
data-test-id="canvas-node"
|
||||
:data-node-name="data.name"
|
||||
:data-node-type="data.type"
|
||||
>
|
||||
<template
|
||||
v-for="source in mappedOutputs"
|
||||
:key="`${source.handleId}(${source.index + 1}/${mappedOutputs.length})`"
|
||||
|
@ -321,7 +326,7 @@ onBeforeUnmount(() => {
|
|||
:mode="CanvasConnectionMode.Output"
|
||||
:is-read-only="readOnly"
|
||||
:is-valid-connection="isValidConnection"
|
||||
:data-node-name="label"
|
||||
:data-node-name="data.name"
|
||||
data-test-id="canvas-node-output-handle"
|
||||
:data-handle-index="source.index"
|
||||
@add="onAdd"
|
||||
|
@ -339,7 +344,7 @@ onBeforeUnmount(() => {
|
|||
:is-valid-connection="isValidConnection"
|
||||
data-test-id="canvas-node-input-handle"
|
||||
:data-handle-index="target.index"
|
||||
:data-node-name="label"
|
||||
:data-node-name="data.name"
|
||||
@add="onAdd"
|
||||
/>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue