refactor(tests): rename e2e to tests

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2023-02-22 20:20:11 +01:00
committed by Braks
parent c60398d0f0
commit a3ec3b40a7
43 changed files with 10 additions and 1 deletions
@@ -0,0 +1,28 @@
import { useVueFlow } from '@vue-flow/core'
import { getElements } from '../../../utils'
const { nodes } = getElements()
const initialNodes = [{ id: '1e3', position: { x: 0, y: 0 }, label: 'Node 1e3' }]
describe('Store Action: `addNodes`', () => {
const store = useVueFlow({ id: 'test' })
beforeEach(() => {
cy.vueFlow({
nodes: initialNodes,
})
})
beforeEach(() => {
store.addNodes(nodes)
})
it('adds nodes to store', () => {
expect(store.nodes.value).to.have.length(nodes.length + initialNodes.length)
})
it('adds nodes to viewpane', () => {
cy.get('.vue-flow__node').should('have.length', nodes.length + initialNodes.length)
})
})