add Overlay.spec.js

This commit is contained in:
ogerly 2022-02-11 16:30:23 +01:00
parent 2ac912d584
commit 19e5cd196d
2 changed files with 32 additions and 1 deletions

View 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()
})
})
})

View File

@ -1,5 +1,5 @@
<template>
<div>
<div class="component-overlay">
<b-jumbotron class="bg-light p-4">
<template #header>{{ items.firstName }}´s {{ $t('overlay.confirm.title') }}</template>