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,38 @@
import { useVueFlow } from '@vue-flow/core'
import { getElements } from '../../../utils'
const { nodes } = getElements()
describe('Store Action: `setMinZoom`', () => {
const store = useVueFlow({ id: 'test' })
beforeEach(() => {
cy.vueFlow({
nodes,
})
})
beforeEach(() => {
store.setMinZoom(0.5)
})
it('sets min-zoom in store', () => {
expect(store.minZoom.value).to.eq(0.5)
})
it('sets min-zoom in viewpane', () => {
cy.viewPort().trigger('wheel', {
deltaY: 10000,
wheelDelta: 0,
wheelDeltaX: 0,
wheelDeltaY: 0,
bubbles: true,
})
cy.transformationPane().should(
'have.css',
'transform',
`matrix(${store.viewport.value.zoom}, 0, 0, ${store.viewport.value.zoom}, ${store.viewport.value.x}, ${store.viewport.value.y})`,
)
})
})