From 687a4b78907d0f2c35c9928bacebadf1fd0d2f52 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Tue, 7 Jan 2025 17:16:31 +0100 Subject: [PATCH 1/2] fix --- frontend/src/components/Transaction.spec.js | 2 +- frontend/src/components/Transaction.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Transaction.spec.js b/frontend/src/components/Transaction.spec.js index 6467151f3..d70c1aba8 100644 --- a/frontend/src/components/Transaction.spec.js +++ b/frontend/src/components/Transaction.spec.js @@ -345,7 +345,7 @@ describe('Transaction', () => { }) it('has the description gdt.contribution', () => { - expect(wrapper.findAll('div.row').at(0).text()).toContain('gdt.contribution') + expect(wrapper.findAll('div.row').at(0).text()).toContain('This is a comment') }) it('renders the amount of euros', () => { diff --git a/frontend/src/components/Transaction.vue b/frontend/src/components/Transaction.vue index 09e721401..0551f8a18 100644 --- a/frontend/src/components/Transaction.vue +++ b/frontend/src/components/Transaction.vue @@ -91,7 +91,7 @@ const getLinesByType = computed(() => { icon: 'heart', iconclasses: 'gradido-global-color-accent', iconColor: '4', - description: t('gdt.contribution'), + description: props.comment, // t('gdt.contribution'), descriptiontext: n(props.amount, 'decimal') + ' €', credittext: n(props.gdt, 'decimal') + ' GDT', } From f1f9aaf1237697a11e20af0f65bf59b21dba8739 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Tue, 7 Jan 2025 17:30:29 +0100 Subject: [PATCH 2/2] fix test and lint --- .../src/components/TransactionLinks/TransactionLink.spec.js | 3 ++- frontend/src/locales/de.json | 1 - frontend/src/locales/en.json | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/TransactionLinks/TransactionLink.spec.js b/frontend/src/components/TransactionLinks/TransactionLink.spec.js index 15c3e5014..e238e159d 100644 --- a/frontend/src/components/TransactionLinks/TransactionLink.spec.js +++ b/frontend/src/components/TransactionLinks/TransactionLink.spec.js @@ -127,7 +127,8 @@ describe('TransactionLink.vue', () => { expect(wrapper.vm.decay).toBe('100') }) - it('computes validLink correctly when link is valid', () => { + it('computes validLink correctly when link is valid', async () => { + await wrapper.setProps({ validUntil: new Date(new Date().getTime() + 1000000) }) expect(wrapper.vm.validLink).toBe(true) }) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 963babce8..dd34fbad4 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -231,7 +231,6 @@ }, "gdt": { "calculation": "Berechnung der Gradido Transform", - "contribution": "Beitrag", "conversion": "Umrechnung", "conversion-gdt-euro": "Umrechnung Euro / Gradido Transform (GDT)", "credit": "Gutschrift", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index b0b5f12d6..9346ea609 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -231,7 +231,6 @@ }, "gdt": { "calculation": "Calculation of Gradido Transform", - "contribution": "Contribution", "conversion": "Conversion", "conversion-gdt-euro": "Conversion Euro / Gradido Transform (GDT)", "credit": "Credit",