fix test for Overview.spec.js

This commit is contained in:
ogerly 2023-01-03 08:08:45 +01:00
parent e930aa9d4f
commit db304211aa
2 changed files with 4 additions and 53 deletions

View File

@ -11,6 +11,9 @@ describe('Overview', () => {
const mocks = { const mocks = {
$t: jest.fn((t) => t), $t: jest.fn((t) => t),
$n: jest.fn(), $n: jest.fn(),
$i18n: {
locale: 'en',
},
} }
const Wrapper = () => { const Wrapper = () => {
@ -28,15 +31,5 @@ describe('Overview', () => {
it('has a community news element', () => { it('has a community news element', () => {
expect(wrapper.find('div.community-news').exists()).toBeTruthy() expect(wrapper.find('div.community-news').exists()).toBeTruthy()
}) })
/*
describe('timestamp updates', () => {
it('emits update transactions', async () => {
expect(wrapper.emitted('update-transactions')).toHaveLength(1)
await wrapper.setData({ timestamp: Date.now() })
expect(wrapper.emitted('update-transactions')).toHaveLength(2)
})
})
*/
}) })
}) })

View File

@ -1,57 +1,15 @@
<template> <template>
<div> <div class="overview">
<community-news /> <community-news />
<!-- <gdd-transaction-list
:transactions="transactions"
:pageSize="5"
:timestamp="timestamp"
:transaction-count="transactionCount"
:transactionLinkCount="transactionLinkCount"
:pending="pending"
v-on="$listeners"
/> -->
<!-- <gdd-transaction-list-footer :count="transactionCount" /> -->
</div> </div>
</template> </template>
<script> <script>
import CommunityNews from '@/components/Overview/CommunityNews.vue' import CommunityNews from '@/components/Overview/CommunityNews.vue'
// import GddTransactionList from '@/components/GddTransactionList.vue'
// import GddTransactionListFooter from '@/components/GddTransactionListFooter.vue'
export default { export default {
name: 'Overview', name: 'Overview',
components: { components: {
CommunityNews, CommunityNews,
// GddTransactionList,
// GddTransactionListFooter,
},
data() {
return {
// timestamp: Date.now(),
}
},
props: {
// transactions: {
// default: () => [],
// },
// transactionCount: { type: Number, default: 0 },
// transactionLinkCount: { type: Number, default: 0 },
// pending: {
// type: Boolean,
// default: true,
// },
},
methods: {
// updateTransactions(pagination) {
// this.$emit('update-transactions', pagination)
// },
}, },
} }
</script> </script>
<style>
/* .g-border {
border: #ffffff 2px;
border-style: inset;
border-radius: 5px;
} */
</style>