mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test fix for GdtAmount.vue
This commit is contained in:
parent
3c3a1f89ad
commit
6d3756652f
@ -0,0 +1,43 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import GdtAmount from './GdtAmount'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
const state = {
|
||||
language: 'en',
|
||||
}
|
||||
|
||||
const mocks = {
|
||||
$store: {
|
||||
state,
|
||||
},
|
||||
$i18n: {
|
||||
locale: 'en',
|
||||
},
|
||||
$t: jest.fn((t) => t),
|
||||
$n: jest.fn((n) => n),
|
||||
}
|
||||
|
||||
const propsData = {
|
||||
path: 'string',
|
||||
GdtBalance: 123.45,
|
||||
badgeShow: false,
|
||||
showStatus: false,
|
||||
}
|
||||
|
||||
describe('GdtAmount', () => {
|
||||
let wrapper
|
||||
|
||||
const Wrapper = () => {
|
||||
return mount(GdtAmount, { localVue, mocks, propsData })
|
||||
}
|
||||
describe('mount', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('renders the component gdt-amount', () => {
|
||||
expect(wrapper.find('div.gdt-amount').exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="text-center">
|
||||
<div class="gdt-amount text-center">
|
||||
<b-badge
|
||||
v-if="badgeShow"
|
||||
class="position-absolute mt--2 ml--4 px-3 zindex1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user