From 4a7a4f28cfbe6056e2112e84012df643c90026cb Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 17 Mar 2022 17:58:17 +0100 Subject: [PATCH] change object variables, pending extra, chnage text in tests --- .../DecayInformations/CollapseLinksList.spec.js | 2 +- .../DecayInformations/CollapseLinksList.vue | 12 +++++------- .../TransactionLinks/TransactionLink.spec.js | 4 +--- .../Transactions/TransactionLinksSummary.vue | 9 +++++---- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.spec.js b/frontend/src/components/DecayInformations/CollapseLinksList.spec.js index 928ae2735..d09922e3a 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.spec.js +++ b/frontend/src/components/DecayInformations/CollapseLinksList.spec.js @@ -100,7 +100,7 @@ describe('CollapseLinksList', () => { }) }) - it('renders text in plural and shows the correct count of links, () => { + it('renders text in plural and shows the correct count of links', () => { expect(mocks.$tc).toBeCalledWith('link-load', 1, { n: 4 }) }) }) diff --git a/frontend/src/components/DecayInformations/CollapseLinksList.vue b/frontend/src/components/DecayInformations/CollapseLinksList.vue index cbd5f7a12..b1e42cd2d 100644 --- a/frontend/src/components/DecayInformations/CollapseLinksList.vue +++ b/frontend/src/components/DecayInformations/CollapseLinksList.vue @@ -13,19 +13,16 @@
{{ buttonText }} - +
+ +
@@ -46,6 +43,7 @@ export default { required: true, }, value: { type: Object, required: true }, + pending: { type: Boolean, default: false }, }, methods: { resetTransactionLinkList() { diff --git a/frontend/src/components/TransactionLinks/TransactionLink.spec.js b/frontend/src/components/TransactionLinks/TransactionLink.spec.js index 971cb8886..f019a0ee1 100644 --- a/frontend/src/components/TransactionLinks/TransactionLink.spec.js +++ b/frontend/src/components/TransactionLinks/TransactionLink.spec.js @@ -60,9 +60,7 @@ describe('TransactionLink', () => { }) it('toasts success message', () => { - expect(toastSuccessSpy).toBeCalledWith( - 'gdd_per_link.link-copied' + '\n' + 'http://localhost/redeem/c00000000c000000c0000', - ) + expect(toastSuccessSpy).toBeCalledWith('gdd_per_link.link-copied') }) }) diff --git a/frontend/src/components/Transactions/TransactionLinksSummary.vue b/frontend/src/components/Transactions/TransactionLinksSummary.vue index 21a965803..f98ef2ee2 100644 --- a/frontend/src/components/Transactions/TransactionLinksSummary.vue +++ b/frontend/src/components/Transactions/TransactionLinksSummary.vue @@ -28,6 +28,7 @@ @@ -74,9 +75,9 @@ export default { transactionLinks: [], variables: { currentPage: 1, - pending: false, pageSize: 5, }, + pending: false, } }, methods: { @@ -85,7 +86,7 @@ export default { this.transactionLinks = [] this.variables.currentPage = 1 } else { - this.variables.pending = true + this.pending = true this.$apollo .query({ query: listTransactionLinks, @@ -97,11 +98,11 @@ export default { .then((result) => { this.transactionLinks = [...this.transactionLinks, ...result.data.listTransactionLinks] this.$emit('update-transactions') - this.variables.pending = false + this.pending = false }) .catch((err) => { this.toastError(err.message) - this.variables.pending = false + this.pending = false }) } },