diff --git a/frontend/src/components/TransactionRows/AmountAndNameRow.spec.js b/frontend/src/components/TransactionRows/AmountAndNameRow.spec.js index 172f5f401..747cefe64 100644 --- a/frontend/src/components/TransactionRows/AmountAndNameRow.spec.js +++ b/frontend/src/components/TransactionRows/AmountAndNameRow.spec.js @@ -39,37 +39,5 @@ describe('AmountAndNameRow', () => { expect(wrapper.find('div.gdd-transaction-list-item-name').find('a').exists()).toBe(false) }) }) - - describe('with linked user', () => { - beforeEach(async () => { - await wrapper.setProps({ - linkedUser: { firstName: 'Bibi', lastName: 'Bloxberg', email: 'bibi@bloxberg.de' }, - }) - }) - - it('has a link with first and last name', () => { - expect(wrapper.find('div.gdd-transaction-list-item-name').text()).toBe('Bibi Bloxberg') - }) - - it('has a link', () => { - expect(wrapper.find('div.gdd-transaction-list-item-name').find('a').exists()).toBe(true) - }) - - describe('click link', () => { - beforeEach(async () => { - await wrapper.find('div.gdd-transaction-list-item-name').find('a').trigger('click') - }) - - it('emits set tunneled email', () => { - expect(wrapper.emitted('set-tunneled-email')).toEqual([['bibi@bloxberg.de']]) - }) - - it('pushes the route with query for email', () => { - expect(mocks.$router.push).toBeCalledWith({ - path: '/send', - }) - }) - }) - }) }) }) diff --git a/frontend/src/components/TransactionRows/AmountAndNameRow.vue b/frontend/src/components/TransactionRows/AmountAndNameRow.vue index eb68d9f37..530fdf0e8 100644 --- a/frontend/src/components/TransactionRows/AmountAndNameRow.vue +++ b/frontend/src/components/TransactionRows/AmountAndNameRow.vue @@ -10,21 +10,7 @@
- - - {{ itemText }} - - - {{ itemText }} - - {{ $t('via_link') }} - - + {{ text }}
@@ -38,31 +24,9 @@ export default { type: String, required: true, }, - linkedUser: { - type: Object, - required: false, - }, text: { type: String, - required: false, - }, - linkId: { - type: Number, - required: false, - default: null, - }, - }, - methods: { - tunnelEmail() { - this.$emit('set-tunneled-email', this.linkedUser.email) - this.$router.push({ path: '/send' }) - }, - }, - computed: { - itemText() { - return this.linkedUser - ? this.linkedUser.firstName + ' ' + this.linkedUser.lastName - : this.text + required: true, }, }, }