diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 10a3be0ce..19a8f7c53 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -97,8 +97,9 @@
"credit": "Gutschrift",
"factor": "Faktor",
"formula": "Berechungsformel",
+ "funding": "Zu den Förderbeiträgen",
"gdt-received": "Gradido Transform (GDT) erhalten",
- "no-transactions": "Du hast zur Zeit keine Transaktionen",
+ "no-transactions": "Du hast noch keine Gradido Transform (GDT).",
"publisher": "Dein geworbenes Mitglied hat einen Beitrag bezahlt",
"raise": "Erhöhung",
"recruited-member": "Geworbenes Mitglied"
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index d3d5b05ab..d74b8ec5b 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -97,8 +97,9 @@
"credit": "Credit",
"factor": "Factor",
"formula": "Calculation formula",
+ "funding": "Regarding the funding contributions",
"gdt-received": "Gradido Transform (GDT) received",
- "no-transactions": "You currently have no transactions",
+ "no-transactions": "You do not have Gradido Transform (GDT) yet.",
"publisher": "A member you referred has paid a contribution",
"raise": "Increase",
"recruited-member": "Recruited Member"
diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue
index fa0cc7357..11dc6ee00 100644
--- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue
+++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue
@@ -124,7 +124,7 @@
:per-page="pageSize"
:total-rows="transactionCount"
>
-
+
{{ $t('transaction.nullTransactions') }}
diff --git a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js
index fcecf63fa..77507cb69 100644
--- a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js
+++ b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.spec.js
@@ -7,41 +7,8 @@ const localVue = global.localVue
const apolloMock = jest.fn().mockResolvedValue({
data: {
listGDTEntries: {
- count: 4,
- gdtEntries: [
- {
- amount: 100,
- gdt: 1700,
- factor: 17,
- comment: '',
- date: '2021-05-02T17:20:11+00:00',
- gdtEntryType: GdtEntryType.FORM,
- },
- {
- amount: 1810,
- gdt: 362,
- factor: 0.2,
- comment: 'Dezember 20',
- date: '2020-12-31T12:00:00+00:00',
- gdtEntryType: GdtEntryType.GLOBAL_MODIFICATOR,
- },
- {
- amount: 100,
- gdt: 1700,
- factor: 17,
- comment: '',
- date: '2020-05-07T17:00:00+00:00',
- gdtEntryType: GdtEntryType.FORM,
- },
- {
- amount: 100,
- gdt: 110,
- factor: 22,
- comment: '',
- date: '2020-04-10T13:28:00+00:00',
- gdtEntryType: GdtEntryType.ELOPAGE_PUBLISHER,
- },
- ],
+ count: 0,
+ gdtEntries: [],
},
},
})
@@ -51,10 +18,18 @@ const windowScrollToMock = jest.fn()
window.scrollTo = windowScrollToMock
-describe('GdtTransactionList', () => {
+const state = {
+ language: 'en',
+}
+
+describe('GdtTransactionList ', () => {
let wrapper
const mocks = {
+ $store: {
+ state,
+ commit: jest.fn(),
+ },
$i18n: {
locale: 'en',
},
@@ -73,15 +48,80 @@ describe('GdtTransactionList', () => {
return mount(GdtTransactionList, { localVue, mocks })
}
- describe('mount', () => {
+ describe('mount - When no transactions are loaded', () => {
beforeEach(() => {
wrapper = Wrapper()
})
+ it('renders the funding button ', () => {
+ expect(wrapper.find('.gdt-funding').exists()).toBe(true)
+ })
+
+ it('links to https://gradido.net/en/memberships/ when clicking', async () => {
+ expect(wrapper.find('.gdt-funding').attributes('href')).toBe(
+ 'https://gradido.net/' + state.language + '/memberships/',
+ )
+ })
+ })
+
+ describe('mount - When transactions are loaded', () => {
+ beforeEach(() => {
+ apolloMock.mockResolvedValue({
+ data: {
+ listGDTEntries: {
+ count: 4,
+ gdtEntries: [
+ {
+ id: 1,
+ amount: 100,
+ gdt: 1700,
+ factor: 17,
+ comment: '',
+ date: '2021-05-02T17:20:11+00:00',
+ gdtEntryType: GdtEntryType.FORM,
+ },
+ {
+ id: 2,
+ amount: 1810,
+ gdt: 362,
+ factor: 0.2,
+ comment: 'Dezember 20',
+ date: '2020-12-31T12:00:00+00:00',
+ gdtEntryType: GdtEntryType.GLOBAL_MODIFICATOR,
+ },
+ {
+ id: 3,
+ amount: 100,
+ gdt: 1700,
+ factor: 17,
+ comment: '',
+ date: '2020-05-07T17:00:00+00:00',
+ gdtEntryType: GdtEntryType.FORM,
+ },
+ {
+ id: 4,
+ amount: 100,
+ gdt: 110,
+ factor: 22,
+ comment: '',
+ date: '2020-04-10T13:28:00+00:00',
+ gdtEntryType: GdtEntryType.ELOPAGE_PUBLISHER,
+ },
+ ],
+ },
+ },
+ })
+ wrapper = Wrapper()
+ })
+
it('renders the component', () => {
expect(wrapper.find('div.gdt-transaction-list').exists()).toBeTruthy()
})
+ it('does not render the funding button ', () => {
+ expect(wrapper.find('.gdt-funding').exists()).toBe(false)
+ })
+
describe('server returns valid data', () => {
it('calls the API', async () => {
await wrapper.vm.$nextTick()
diff --git a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue
index e69e5edec..f727d6297 100644
--- a/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue
+++ b/frontend/src/views/Pages/AccountOverview/GdtTransactionList.vue
@@ -1,8 +1,12 @@
-
-
+
+
{{ $t('gdt.no-transactions') }}
+
+
+ {{ $t('gdt.funding') }}
+