From 97f4c0e847b2874cb9f3ac60a5a3734a4a211cc4 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sun, 12 Dec 2021 14:18:12 +0100 Subject: [PATCH] fix(test): correct test for testing custom node/edge types Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- cypress/integration/1-store/setState.spec.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cypress/integration/1-store/setState.spec.ts b/cypress/integration/1-store/setState.spec.ts index 47480c73..09b04f47 100644 --- a/cypress/integration/1-store/setState.spec.ts +++ b/cypress/integration/1-store/setState.spec.ts @@ -35,14 +35,27 @@ describe('test store state', () => { it('gets custom node types', () => { store.setState({ - nodeTypes: ['custom'], + nodes: [ + { + id: '1', + position: { x: 0, y: 0 }, + type: 'custom', + }, + ], }) expect(Object.keys(store.getNodeTypes)).to.contain('custom') }) it('gets custom edge types', () => { store.setState({ - edgeTypes: ['custom'], + edges: [ + { + id: '1', + source: '1', + target: '2', + type: 'custom', + }, + ], }) expect(Object.keys(store.getEdgeTypes)).to.contain('custom') })