refactor(tests): rename e2e to tests
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { useVueFlow } from '@vue-flow/core'
|
||||
import { getElements } from '../../../utils'
|
||||
|
||||
const { nodes, edges } = getElements()
|
||||
|
||||
const edgesFirstHalf = edges.slice(0, Math.floor(edges.length / 2))
|
||||
const edgesSecondHalf = edges.slice(Math.floor(edges.length / 2))
|
||||
|
||||
describe('Store Action: `addEdges`', () => {
|
||||
const store = useVueFlow({ id: 'test' })
|
||||
|
||||
beforeEach(() => {
|
||||
cy.vueFlow({
|
||||
nodes,
|
||||
edges: edgesFirstHalf,
|
||||
})
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
store.addEdges(edgesSecondHalf)
|
||||
})
|
||||
|
||||
it('adds edges to store', () => {
|
||||
expect(store.edges.value).to.have.length(edges.length)
|
||||
})
|
||||
|
||||
it('adds edges to viewpane', () => {
|
||||
cy.get('.vue-flow__edge').should('have.length', edges.length)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user