mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add Overlay.spec.js
This commit is contained in:
parent
2ac912d584
commit
19e5cd196d
31
admin/src/components/Overlay.spec.js
Normal file
31
admin/src/components/Overlay.spec.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import Overlay from './Overlay.vue'
|
||||||
|
|
||||||
|
const localVue = global.localVue
|
||||||
|
|
||||||
|
const propsData = {
|
||||||
|
items: {},
|
||||||
|
}
|
||||||
|
|
||||||
|
const mocks = {
|
||||||
|
$t: jest.fn((t) => t),
|
||||||
|
$d: jest.fn((d) => String(d)),
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('Overlay', () => {
|
||||||
|
let wrapper
|
||||||
|
|
||||||
|
const Wrapper = () => {
|
||||||
|
return mount(Overlay, { localVue, mocks, propsData })
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('mount', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper = Wrapper()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('has a DIV element with the class.component-overlay', () => {
|
||||||
|
expect(wrapper.find('.component-overlay').exists()).toBeTruthy()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="component-overlay">
|
||||||
<b-jumbotron class="bg-light p-4">
|
<b-jumbotron class="bg-light p-4">
|
||||||
<template #header>{{ items.firstName }}´s {{ $t('overlay.confirm.title') }}</template>
|
<template #header>{{ items.firstName }}´s {{ $t('overlay.confirm.title') }}</template>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user