-
+
{{ $t('gdd_per_link.redeem') }}
diff --git a/frontend/src/pages/TransactionLink.spec.js b/frontend/src/pages/TransactionLink.spec.js
index b1bbd8950..fd58d6e1c 100644
--- a/frontend/src/pages/TransactionLink.spec.js
+++ b/frontend/src/pages/TransactionLink.spec.js
@@ -282,18 +282,18 @@ describe('TransactionLink', () => {
})
describe('redeem link with success', () => {
- let spy
+ // let spy
beforeEach(async () => {
- spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
+ // spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
apolloMutateMock.mockResolvedValue()
- spy.mockImplementation(() => Promise.resolve(true))
+ // spy.mockImplementation(() => Promise.resolve(true))
await wrapper.findComponent({ name: 'RedeemValid' }).find('button').trigger('click')
})
- it('opens the modal', () => {
- expect(spy).toBeCalledWith('gdd_per_link.redeem-text')
- })
+ // it('opens the modal', () => {
+ // expect(spy).toBeCalledWith('gdd_per_link.redeem-text')
+ // })
it('calls the API', () => {
expect(apolloMutateMock).toBeCalledWith(
@@ -316,37 +316,37 @@ describe('TransactionLink', () => {
})
})
- describe('cancel redeem link', () => {
- let spy
+ // describe('cancel redeem link', () => {
+ // let spy
- beforeEach(async () => {
- spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
- apolloMutateMock.mockResolvedValue()
- spy.mockImplementation(() => Promise.resolve(false))
- await wrapper.findComponent({ name: 'RedeemValid' }).find('button').trigger('click')
- })
+ // beforeEach(async () => {
+ // spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
+ // apolloMutateMock.mockResolvedValue()
+ // spy.mockImplementation(() => Promise.resolve(false))
+ // await wrapper.findComponent({ name: 'RedeemValid' }).find('button').trigger('click')
+ // })
- it('does not call the API', () => {
- expect(apolloMutateMock).not.toBeCalled()
- })
+ // it('does not call the API', () => {
+ // expect(apolloMutateMock).not.toBeCalled()
+ // })
- it('does not toasts a success message', () => {
- expect(mocks.$t).not.toBeCalledWith('gdd_per_link.redeemed', { n: '22' })
- expect(toastSuccessSpy).not.toBeCalled()
- })
+ // it('does not toasts a success message', () => {
+ // expect(mocks.$t).not.toBeCalledWith('gdd_per_link.redeemed', { n: '22' })
+ // expect(toastSuccessSpy).not.toBeCalled()
+ // })
- it('does not push the route', () => {
- expect(routerPushMock).not.toBeCalled()
- })
- })
+ // it('does not push the route', () => {
+ // expect(routerPushMock).not.toBeCalled()
+ // })
+ // })
describe('redeem link with error', () => {
- let spy
+ // let spy
beforeEach(async () => {
- spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
+ // spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
apolloMutateMock.mockRejectedValue({ message: 'Oh Noo!' })
- spy.mockImplementation(() => Promise.resolve(true))
+ // spy.mockImplementation(() => Promise.resolve(true))
await wrapper.findComponent({ name: 'RedeemValid' }).find('button').trigger('click')
})
diff --git a/frontend/src/pages/TransactionLink.vue b/frontend/src/pages/TransactionLink.vue
index 57236b55c..bd1909d7d 100644
--- a/frontend/src/pages/TransactionLink.vue
+++ b/frontend/src/pages/TransactionLink.vue
@@ -14,7 +14,7 @@
@@ -98,11 +98,6 @@ export default {
this.$router.push('/overview')
})
},
- redeemLink(amount) {
- this.$bvModal.msgBoxConfirm(this.$t('gdd_per_link.redeem-text')).then((value) => {
- if (value) this.mutationLink(amount)
- })
- },
},
computed: {
isContributionLink() {