fix text balnace on sidebar.vue

This commit is contained in:
ogerly 2021-06-14 16:04:57 +02:00
parent d8aa42cbbd
commit ecf2b0d8f7

View File

@ -54,6 +54,20 @@ describe('SideBar', () => {
})
})
describe('balance', () => {
it('shows em-dash as balance while loading', () => {
expect(wrapper.find('div.row.text-center').text()).toBe('— GDD')
})
it('shows the when loaded', async () => {
wrapper.setProps({
pending: false,
})
await wrapper.vm.$nextTick()
expect(wrapper.find('div.row.text-center').text()).toBe('1234.56 GDD')
})
})
describe('close siedbar', () => {
it('calls closeSidebar when clicked', async () => {
const spy = jest.spyOn(wrapper.vm.$sidebar, 'displaySidebar')