From 438ad57502cafb9f279e222abc64537ea096997a Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 8 Oct 2022 03:03:14 +0200 Subject: [PATCH] tests: add default type to generated nodes --- e2e/cypress/utils/elements.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2e/cypress/utils/elements.ts b/e2e/cypress/utils/elements.ts index cec58088..b52181fa 100644 --- a/e2e/cypress/utils/elements.ts +++ b/e2e/cypress/utils/elements.ts @@ -16,6 +16,7 @@ export function getElements(xElements = 10, yElements = 10) { if (node.selected) style.border = '1px solid red' return style }, + type: 'default', position: { x: x * 100, y: y * 50 }, data: { randomData: Math.floor(Math.random() * 1e3), @@ -30,6 +31,9 @@ export function getElements(xElements = 10, yElements = 10) { data: { randomData: Math.floor(Math.random() * 1e3), }, + style: (edge) => { + if (edge.selected) return { stroke: '#10b981', strokeWidth: 3 } + }, animated: Math.random() > 0.5, }) }