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,10 @@
<script setup>
import { VueFlow } from '@vue-flow/core'
import { Background } from '@vue-flow/background'
</script>
<template>
<VueFlow>
<Background />
</VueFlow>
</template>
@@ -0,0 +1,18 @@
import App from './App.vue'
describe('Render Background', () => {
beforeEach(() => {
cy.mount(App, {
attrs: {
style: {
width: '100vw',
height: '100vh',
},
},
})
})
it('renders background', () => {
cy.get('.vue-flow__background').should('exist')
})
})
@@ -0,0 +1,10 @@
<script setup>
import { VueFlow } from '@vue-flow/core'
import { Controls } from '@vue-flow/controls'
</script>
<template>
<VueFlow>
<Controls />
</VueFlow>
</template>
@@ -0,0 +1,18 @@
import App from './App.vue'
describe('Render Controls', () => {
beforeEach(() => {
cy.mount(App, {
attrs: {
style: {
width: '100vw',
height: '100vh',
},
},
})
})
it('renders controls', () => {
cy.get('.vue-flow__controls').should('exist')
})
})
@@ -0,0 +1,21 @@
<script setup>
import { VueFlow } from '@vue-flow/core'
import { MiniMap } from '@vue-flow/minimap'
defineProps({
nodes: {
type: Array,
default: () => [],
},
edges: {
type: Array,
default: () => [],
},
})
</script>
<template>
<VueFlow :nodes="nodes" :edges="edges">
<MiniMap />
</VueFlow>
</template>
@@ -0,0 +1,29 @@
import { getElements } from '../../../utils'
import App from './App.vue'
const { nodes, edges } = getElements()
describe('Render MiniMap', () => {
beforeEach(() => {
cy.mount(App, {
props: {
nodes,
edges,
},
attrs: {
style: {
width: '100vw',
height: '100vh',
},
},
})
})
it('renders minimap', () => {
cy.get('.vue-flow__minimap').should('exist')
})
it('renders minimap nodes', () => {
cy.get('.vue-flow__minimap-node').should('have.length', nodes.length)
})
})