diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index cd5fe4e2c..0fa0c97b3 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -144,14 +144,14 @@ export default { } }, async updateGdt() { - const result2 = await communityAPI.transactionsgdt(this.$store.state.sessionId) - console.log(' communityAPI.transactionsgdt') - console.log(result2.result) - console.log(result2.result.data.gdtEntries) - this.GdtBalance = Number(result2.result.data.gdtSum) - this.transactionsGdt = result2.result.data.gdtEntries - this.transactionGdtCount = result2.result.data.count -/* + const result2 = await communityAPI.transactionsgdt(this.$store.state.sessionId) + // console.log(' communityAPI.transactionsgdt') + // console.log(result2.result) + // console.log(result2.result.data.gdtEntries) + this.GdtBalance = Number(result2.result.data.gdtSum) + this.transactionsGdt = result2.result.data.gdtEntries + this.transactionGdtCount = result2.result.data.count + /* this.transactionsGdt = { state: 'success', @@ -213,7 +213,7 @@ export default { count: 4, } */ - //this.transactionGdtCount = this.transactionsGdt.count + // this.transactionGdtCount = this.transactionsGdt.count // console.log('transactionGdtCount', this.transactionGdtCount) }, updateBalance(ammount) { diff --git a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue index a8e358140..f2b3adf99 100644 --- a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue @@ -18,14 +18,12 @@ :key="id" >
-
Gradido Transform (GDT) erhalten {{ comment ? ': '+comment : '' }}
+
Gradido Transform (GDT) erhalten {{ comment ? ': ' + comment : '' }}
{{ $d($moment(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}
- - -
{{ amount }} GDT * {{factor}} = {{gdt}}
-
{{ amount }} € ⊢ {{ gdt}} GDT
+
{{ amount }} GDT * {{ factor }} = {{ gdt }}
+
{{ amount }} € ⊢ {{ gdt }} GDT
{{ id }} {{ amount }} {{ date }} {{ email }} {{ comment }} {{ coupon_code }} {{ gdt_entry_type_id }} {{ factor }} {{ amount2 }} {{ factor2 }} {{ gdt }} diff --git a/frontend/src/views/Pages/UserProfileTransactionList.spec.js b/frontend/src/views/Pages/UserProfileTransactionList.spec.js index b051a0536..44af57855 100644 --- a/frontend/src/views/Pages/UserProfileTransactionList.spec.js +++ b/frontend/src/views/Pages/UserProfileTransactionList.spec.js @@ -1,8 +1,18 @@ -import { shallowMount } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import UserProfileTransactionList from './UserProfileTransactionList' const localVue = global.localVue +const mutationObserverMock = jest.fn(function MutationObserver(callback) { + this.observe = jest.fn() + this.disconnect = jest.fn() + this.trigger = (mockedMutationsList) => { + callback(mockedMutationsList, this) + } +}) + +global.MutationObserver = mutationObserverMock + describe('UserProfileTransactionList', () => { let wrapper @@ -12,7 +22,7 @@ describe('UserProfileTransactionList', () => { } const Wrapper = () => { - return shallowMount(UserProfileTransactionList, { localVue, mocks }) + return mount(UserProfileTransactionList, { localVue, mocks }) } describe('mount', () => { @@ -25,7 +35,7 @@ describe('UserProfileTransactionList', () => { }) it('emits update-transactions after creation', () => { - expect(wrapper.emitted('update-transactions')).toEqual( + expect(wrapper.emitted('update-transactions')).toEqual( expect.arrayContaining([expect.arrayContaining([{ firstPage: 1, items: 25 }])]), ) })