mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test for reactivitat DashboardLayout_gdd.spec.js
This commit is contained in:
parent
7cbafbdee3
commit
118dd886b8
@ -1,5 +1,5 @@
|
||||
import { mount, RouterLinkStub } from '@vue/test-utils'
|
||||
// import flushPromises from 'flush-promises'
|
||||
import flushPromises from 'flush-promises'
|
||||
import DashboardLayoutGdd from './DashboardLayout_gdd'
|
||||
|
||||
jest.useFakeTimers()
|
||||
@ -86,60 +86,7 @@ describe('DashboardLayoutGdd', () => {
|
||||
expect(wrapper.find('div.main-page').find('footer.footer').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
/*
|
||||
describe('navigation bar', () => {
|
||||
let navbar
|
||||
|
||||
beforeEach(() => {
|
||||
navbar = wrapper.findAll('ul.navbar-nav').at(0)
|
||||
})
|
||||
|
||||
it('has four items in the navbar', () => {
|
||||
expect(navbar.findAll('ul > a')).toHaveLength(4)
|
||||
})
|
||||
|
||||
it('has first item "overview" in navbar', () => {
|
||||
expect(navbar.findAll('ul > a').at(0).text()).toEqual('overview')
|
||||
})
|
||||
|
||||
it('has first item "overview" linked to overview in navbar', () => {
|
||||
expect(navbar.findAll('ul > a > a').at(0).attributes('href')).toBe('/overview')
|
||||
})
|
||||
|
||||
it('has second item "send" in navbar', () => {
|
||||
expect(navbar.findAll('ul > a').at(1).text()).toEqual('send')
|
||||
})
|
||||
|
||||
it('has second item "send" linked to /send in navbar', () => {
|
||||
expect(wrapper.findAll('ul > a > a').at(1).attributes('href')).toBe('/send')
|
||||
})
|
||||
|
||||
it('has third item "transactions" in navbar', () => {
|
||||
expect(navbar.findAll('ul > a').at(2).text()).toEqual('transactions')
|
||||
})
|
||||
|
||||
it('has third item "transactions" linked to transactions in navbar', async () => {
|
||||
expect(wrapper.findAll('ul > a > a').at(2).attributes('href')).toBe('/transactions')
|
||||
})
|
||||
|
||||
it('has fourth item "My profile" in navbar', () => {
|
||||
expect(navbar.findAll('ul > a').at(3).text()).toEqual('site.navbar.my-profil')
|
||||
})
|
||||
|
||||
it('has fourth item "My profile" linked to profile in navbar', async () => {
|
||||
expect(wrapper.findAll('ul > a > a').at(3).attributes('href')).toBe('/profile')
|
||||
})
|
||||
|
||||
it('has a link to the members area', () => {
|
||||
expect(wrapper.findAll('ul').at(2).text()).toContain('members_area')
|
||||
expect(wrapper.findAll('ul').at(2).text()).toContain('!')
|
||||
expect(wrapper.findAll('ul').at(2).find('a').attributes('href')).toBe(
|
||||
'https://elopage.com/s/gradido/basic-de/payment?locale=en&prid=111&pid=123&firstName=User&lastName=Example&email=user@example.org',
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
|
||||
describe('logout', () => {
|
||||
beforeEach(async () => {
|
||||
await apolloMock.mockResolvedValue({
|
||||
@ -274,6 +221,5 @@ describe('DashboardLayoutGdd', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
*/
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user