chore(tests): useNodes/useEdges
This commit is contained in:
@@ -13,7 +13,6 @@ describe('useEdges.cy.tsx', () => {
|
|||||||
</ReactFlow>
|
</ReactFlow>
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get('@onChangeSpy').should('have.been.calledWith', []);
|
|
||||||
cy.get('@onChangeSpy').should('have.been.calledWith', initialEdges);
|
cy.get('@onChangeSpy').should('have.been.calledWith', initialEdges);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ const initialNodes: Node[] = nodes.map((n) => ({
|
|||||||
|
|
||||||
const expectedNodes: Node[] = initialNodes.map((n) => ({
|
const expectedNodes: Node[] = initialNodes.map((n) => ({
|
||||||
...n,
|
...n,
|
||||||
positionAbsolute: n.position,
|
computed: {
|
||||||
...nodeDimensions,
|
positionAbsolute: n.position,
|
||||||
|
...nodeDimensions,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('useNodes.cy.tsx', () => {
|
describe('useNodes.cy.tsx', () => {
|
||||||
@@ -29,7 +31,6 @@ describe('useNodes.cy.tsx', () => {
|
|||||||
</ReactFlow>
|
</ReactFlow>
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get('@onChangeSpy').should('have.been.calledWith', []);
|
|
||||||
cy.get('@onChangeSpy').should('have.been.calledWith', expectedNodes);
|
cy.get('@onChangeSpy').should('have.been.calledWith', expectedNodes);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user