diff --git a/frontend/src/components/GddSend/QrCode.spec.js b/frontend/src/components/GddSend/QrCode.spec.js deleted file mode 100644 index 66da5748d..000000000 --- a/frontend/src/components/GddSend/QrCode.spec.js +++ /dev/null @@ -1,70 +0,0 @@ -import { mount } from '@vue/test-utils' -import QrCode from './QrCode' - -const localVue = global.localVue - -describe('QrCode', () => { - let wrapper - - const mocks = { - $t: jest.fn((t) => t), - } - - const stubs = { - QrcodeStream: true, - QrcodeCapture: true, - } - - const Wrapper = () => { - return mount(QrCode, { localVue, mocks, stubs }) - } - - describe('mount', () => { - beforeEach(() => { - wrapper = Wrapper() - }) - - it('renders the component', () => { - expect(wrapper.find('div.alert').exists()).toBeTruthy() - }) - - describe('scanning', () => { - beforeEach(async () => { - wrapper.find('a').trigger('click') - }) - - it('has a scanning stream', () => { - expect(wrapper.findComponent({ name: 'QrcodeStream' }).exists()).toBeTruthy() - }) - - describe('decode', () => { - beforeEach(async () => { - await wrapper - .findComponent({ name: 'QrcodeStream' }) - .vm.$emit('decode', '[{"email": "user@example.org", "amount": 10.0}]') - }) - - it('emits set transaction', () => { - expect(wrapper.emitted()['set-transaction']).toEqual([ - [ - { - email: 'user@example.org', - amount: 10, - }, - ], - ]) - }) - }) - - describe('detect', () => { - beforeEach(async () => { - await wrapper.find('div.row > *').vm.$emit('detect') - }) - - it('calls onDetect', () => { - expect(wrapper.vm.detect).toBeTruthy() - }) - }) - }) - }) -}) diff --git a/frontend/src/components/GddSend/QrCode.vue b/frontend/src/components/GddSend/QrCode.vue deleted file mode 100644 index 32e527cfe..000000000 --- a/frontend/src/components/GddSend/QrCode.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ $t('form.cancel') }} - - - - - - -