test fix for GddAmount.vue

This commit is contained in:
ogerly 2022-12-23 10:09:02 +01:00
parent 544509446a
commit 3c3a1f89ad
3 changed files with 44 additions and 2 deletions

View File

@ -25,7 +25,7 @@ describe('CommunityMember', () => {
wrapper = Wrapper()
})
it('renders the component transaction-slot-send', () => {
it('renders the component community-member', () => {
expect(wrapper.find('div.community-member').exists()).toBe(true)
})
})

View File

@ -0,0 +1,42 @@
import { mount } from '@vue/test-utils'
import GddAmount from './GddAmount'
const localVue = global.localVue
const state = {
language: 'en',
}
const mocks = {
$store: {
state,
},
$i18n: {
locale: 'en',
},
$t: jest.fn((t) => t),
}
const propsData = {
path: 'string',
balance: 123.45,
badgeShow: false,
showStatus: false,
}
describe('GddAmount', () => {
let wrapper
const Wrapper = () => {
return mount(GddAmount, { localVue, mocks, propsData })
}
describe('mount', () => {
beforeEach(() => {
wrapper = Wrapper()
})
it('renders the component gdd-amount', () => {
expect(wrapper.find('div.gdd-amount').exists()).toBe(true)
})
})
})

View File

@ -1,5 +1,5 @@
<template>
<div class="translucent-color-opacity">
<div class="gdd-amount translucent-color-opacity">
<div class="text-center">
<b-badge
v-if="badgeShow"