change tabsystem, fix tests

This commit is contained in:
ogerly 2022-12-16 08:01:34 +01:00
parent 8b965ce7d2
commit 9518adbe6d
4 changed files with 8 additions and 7 deletions

View File

@ -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')
})
})

View File

@ -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')
})
})

View File

@ -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')
})
})
})

View File

@ -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)