mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix some tests
This commit is contained in:
parent
3fffb68128
commit
6ef1251daa
@ -32,9 +32,9 @@ describe('Sidebar', () => {
|
||||
expect(wrapper.find('div#component-sidebar').exists()).toBe(true)
|
||||
})
|
||||
|
||||
describe('the genaral section', () => {
|
||||
it('has six nav-items', () => {
|
||||
expect(wrapper.findAll('ul').at(0).findAll('.nav-item')).toHaveLength(7)
|
||||
describe('the general section', () => {
|
||||
it('has eight nav-items', () => {
|
||||
expect(wrapper.findAll('ul').at(0).findAll('.nav-item')).toHaveLength(8)
|
||||
})
|
||||
|
||||
it('has nav-item "navigation.overview" in navbar', () => {
|
||||
@ -61,8 +61,12 @@ describe('Sidebar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(5).text()).toContain('navigation.info')
|
||||
})
|
||||
|
||||
it('has nav-item "usersearch" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(6).text()).toContain('navigation.usersearch')
|
||||
it('has nav-item "navigation.circles" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(6).text()).toContain('navigation.circles')
|
||||
})
|
||||
|
||||
it('has nav-item "navigation.usersearch" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(7).text()).toContain('navigation.usersearch')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
<b-button
|
||||
v-if="this.humhubAllowed"
|
||||
variant="gradido"
|
||||
:disabled="this.enableButton === false"
|
||||
@click="authenticateCirclesAutoLogin"
|
||||
target="_blank"
|
||||
>
|
||||
@ -36,7 +37,7 @@ export default {
|
||||
name: 'Circles',
|
||||
data() {
|
||||
return {
|
||||
humhubUri: null,
|
||||
enableButton: true,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -46,6 +47,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async authenticateCirclesAutoLogin() {
|
||||
this.enableButton = false
|
||||
this.humhubUri = null
|
||||
this.$apollo
|
||||
.query({
|
||||
@ -54,9 +56,11 @@ export default {
|
||||
})
|
||||
.then(async (result) => {
|
||||
window.open(result.data.authenticateCirclesAutoLogin, '_blank')
|
||||
this.enableButton = true
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError('authenticateCirclesAutoLogin failed!')
|
||||
this.enableButton = true
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@ -49,8 +49,8 @@ describe('router', () => {
|
||||
expect(routes.find((r) => r.path === '/').redirect()).toEqual({ path: '/login' })
|
||||
})
|
||||
|
||||
it('has 20 routes defined', () => {
|
||||
expect(routes).toHaveLength(20)
|
||||
it('has 21 routes defined', () => {
|
||||
expect(routes).toHaveLength(21)
|
||||
})
|
||||
|
||||
describe('overview', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user