diff --git a/frontend/src/components/GddSend/TransactionConfirmationLink.vue b/frontend/src/components/GddSend/TransactionConfirmationLink.vue index 31ae01cc3..fd2e798eb 100644 --- a/frontend/src/components/GddSend/TransactionConfirmationLink.vue +++ b/frontend/src/components/GddSend/TransactionConfirmationLink.vue @@ -60,7 +60,6 @@ export default { amount: { type: Number, required: true }, memo: { type: String, required: true }, loading: { type: Boolean, required: true }, - selected: { type: String, required: true }, }, } diff --git a/frontend/src/components/GddSend/TransactionConfirmationSend.spec.js b/frontend/src/components/GddSend/TransactionConfirmationSend.spec.js index 38dd82866..21462ebab 100644 --- a/frontend/src/components/GddSend/TransactionConfirmationSend.spec.js +++ b/frontend/src/components/GddSend/TransactionConfirmationSend.spec.js @@ -45,6 +45,33 @@ describe('GddSend confirm', () => { it('renders the component div.confirm-box-send', () => { expect(wrapper.find('div.confirm-box-send').exists()).toBeTruthy() }) + + describe('send now button', () => { + beforeEach(() => { + jest.clearAllMocks() + }) + + describe('single click', () => { + beforeEach(async () => { + await wrapper.find('button.btn-success').trigger('click') + }) + + it('emits send transaction one time', () => { + expect(wrapper.emitted('send-transaction')).toHaveLength(1) + }) + }) + + describe('double click', () => { + beforeEach(async () => { + await wrapper.find('button.btn-success').trigger('click') + await wrapper.find('button.btn-success').trigger('click') + }) + + it('emits send transaction one time', () => { + expect(wrapper.emitted('send-transaction')).toHaveLength(1) + }) + }) + }) }) }) }) diff --git a/frontend/src/components/GddSend/TransactionConfirmationSend.vue b/frontend/src/components/GddSend/TransactionConfirmationSend.vue index 2d85fa33f..25519f4ed 100644 --- a/frontend/src/components/GddSend/TransactionConfirmationSend.vue +++ b/frontend/src/components/GddSend/TransactionConfirmationSend.vue @@ -58,7 +58,11 @@ {{ $t('form.cancel') }} - + {{ $t('form.send_now') }} @@ -73,8 +77,11 @@ export default { email: { type: String, required: false, default: '' }, amount: { type: Number, required: true }, memo: { type: String, required: true }, - loading: { type: Boolean, required: true }, - selected: { type: String, required: true }, + }, + data() { + return { + disabled: false, + } }, } diff --git a/frontend/src/pages/Send.vue b/frontend/src/pages/Send.vue index 668e24493..613342dba 100644 --- a/frontend/src/pages/Send.vue +++ b/frontend/src/pages/Send.vue @@ -12,11 +12,9 @@