From 9518adbe6d79aedb040b5c410e0b8daf8e7ded72 Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 16 Dec 2022 08:01:34 +0100 Subject: [PATCH] change tabsystem, fix tests --- .../components/Contributions/ContributionListItem.spec.js | 2 +- frontend/src/components/Menu/Sidebar.spec.js | 4 ++-- frontend/src/components/UserSettings/UserCard.spec.js | 6 +++--- frontend/src/pages/Community.vue | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.spec.js b/frontend/src/components/Contributions/ContributionListItem.spec.js index 08d3997fa..e73318668 100644 --- a/frontend/src/components/Contributions/ContributionListItem.spec.js +++ b/frontend/src/components/Contributions/ContributionListItem.spec.js @@ -74,7 +74,7 @@ describe('ContributionListItem', () => { it('is warning at when state is IN_PROGRESS', async () => { await wrapper.setProps({ state: 'IN_PROGRESS' }) - expect(wrapper.vm.variant).toBe('warning') + expect(wrapper.vm.variant).toBe('f5') }) }) diff --git a/frontend/src/components/Menu/Sidebar.spec.js b/frontend/src/components/Menu/Sidebar.spec.js index e218df21d..70d145a9e 100644 --- a/frontend/src/components/Menu/Sidebar.spec.js +++ b/frontend/src/components/Menu/Sidebar.spec.js @@ -53,8 +53,8 @@ describe('Sidebar', () => { expect(wrapper.findAll('.nav-item').at(3).text()).toEqual('gdt.gdt') }) - it('has nav-item "navigation.members" in navbar', () => { - expect(wrapper.findAll('.nav-item').at(4).text()).toContain('navigation.members') + it('has nav-item "creation" in navbar', () => { + expect(wrapper.findAll('.nav-item').at(4).text()).toContain('creation') }) }) diff --git a/frontend/src/components/UserSettings/UserCard.spec.js b/frontend/src/components/UserSettings/UserCard.spec.js index 6977917f5..3451a584d 100644 --- a/frontend/src/components/UserSettings/UserCard.spec.js +++ b/frontend/src/components/UserSettings/UserCard.spec.js @@ -27,14 +27,14 @@ describe('UserCard', () => { }) it('renders the Div Element ".userdata-card"', () => { - expect(wrapper.find('div.userdata-card').exists()).toBeTruthy() + expect(wrapper.find('.userdata-card').exists()).toBe(true) }) it('renders the SPAN Element ".b-avatar"', () => { - expect(wrapper.find('span.b-avatar').exists()).toBeTruthy() + expect(wrapper.find('.b-avatar').exists()).toBe(true) }) it('find the first letters of the firstName and lastName', () => { - expect(wrapper.find('span.b-avatar').text()).toBe('B B') + expect(wrapper.find('.b-avatar-text').text()).toBe('B B') }) }) }) diff --git a/frontend/src/pages/Community.vue b/frontend/src/pages/Community.vue index 5aaa30d5a..03fd2e892 100644 --- a/frontend/src/pages/Community.vue +++ b/frontend/src/pages/Community.vue @@ -246,7 +246,7 @@ export default { this.contributionCount = listContributions.contributionCount this.items = listContributions.contributionList if (this.items.find((item) => item.state === 'IN_PROGRESS')) { - // this.tabIndex = 1 + this.tabIndex = 1 // this.$route.hash = 'my' this.$router.push({ path: '#my' }) this.toastInfo('Du hast eine Rückfrage auf eine Contribution. Bitte beantworte diese!') @@ -279,6 +279,7 @@ export default { this.form.amount = item.amount this.updateAmount = item.amount this.$router.push({ path: '#edit' }) + this.tabIndex = 0 }, updateTransactions(pagination) { this.$emit('update-transactions', pagination)