From 156db583e732af5cf7ff61b330b63c0335da6202 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Fri, 2 Feb 2024 19:27:44 +0100 Subject: [PATCH] fix tests --- frontend/src/components/CommunitySwitch.vue | 5 ++- .../GddSend/TransactionForm.spec.js | 34 +++++++++---------- .../components/TransactionRows/Name.spec.js | 14 +++++--- .../src/components/TransactionRows/Name.vue | 6 ++-- frontend/src/pages/Login.spec.js | 1 + frontend/src/pages/Login.vue | 2 +- frontend/src/pages/Send.spec.js | 11 +++--- frontend/src/routes/guards.js | 2 ++ frontend/src/routes/router.test.js | 4 +-- frontend/src/store/store.js | 5 +++ frontend/src/store/store.test.js | 2 +- 11 files changed, 51 insertions(+), 35 deletions(-) diff --git a/frontend/src/components/CommunitySwitch.vue b/frontend/src/components/CommunitySwitch.vue index 2c47dd08e..eda344c05 100644 --- a/frontend/src/components/CommunitySwitch.vue +++ b/frontend/src/components/CommunitySwitch.vue @@ -42,7 +42,7 @@ export default { }, setDefaultCommunity() { // when we already get an identifier via url we choose this if the community exist - if (this.communityIdentifier) { + if (this.communityIdentifier && this.communities.length >= 1) { const foundCommunity = this.communities.find((community) => { if ( community.uuid === this.communityIdentifier || @@ -82,6 +82,9 @@ export default { updated() { this.setDefaultCommunity() }, + mounted() { + this.setDefaultCommunity() + }, }