mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove community to store tests
This commit is contained in:
parent
5361cc9eb9
commit
90f0b532e1
@ -29,10 +29,6 @@ describe('Login', () => {
|
||||
dispatch: mockStoreDispach,
|
||||
commit: mockStoreCommit,
|
||||
state: {
|
||||
community: {
|
||||
name: '',
|
||||
description: '',
|
||||
},
|
||||
publisherId: 12345,
|
||||
},
|
||||
},
|
||||
@ -60,15 +56,6 @@ describe('Login', () => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('commits the community info to the store', () => {
|
||||
expect(mockStoreCommit).toBeCalledWith('community', {
|
||||
name: 'test12',
|
||||
description: 'test community 12',
|
||||
url: 'http://test12.test12/',
|
||||
registerUrl: 'http://test12.test12/register',
|
||||
})
|
||||
})
|
||||
|
||||
it('renders the Login form', () => {
|
||||
expect(wrapper.find('div.login-form').exists()).toBeTruthy()
|
||||
})
|
||||
@ -79,27 +66,14 @@ describe('Login', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('Community data already loaded', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks()
|
||||
mocks.$store.state.community = {
|
||||
name: 'Gradido Entwicklung',
|
||||
url: 'http://localhost/',
|
||||
registerUrl: 'http://localhost/register',
|
||||
description: 'Die lokale Entwicklungsumgebung von Gradido.',
|
||||
}
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
it('has a Community name', () => {
|
||||
expect(wrapper.find('.test-communitydata b').text()).toBe('Gradido Entwicklung')
|
||||
})
|
||||
|
||||
it('has a Community name', () => {
|
||||
expect(wrapper.find('.test-communitydata b').text()).toBe('Gradido Entwicklung')
|
||||
})
|
||||
|
||||
it('has a Community description', () => {
|
||||
expect(wrapper.find('.test-communitydata p').text()).toBe(
|
||||
'Die lokale Entwicklungsumgebung von Gradido.',
|
||||
)
|
||||
})
|
||||
it('has a Community description', () => {
|
||||
expect(wrapper.find('.test-communitydata p').text()).toBe(
|
||||
'Die lokale Entwicklungsumgebung von Gradido.',
|
||||
)
|
||||
})
|
||||
|
||||
describe('links', () => {
|
||||
|
||||
@ -30,10 +30,6 @@ describe('Register', () => {
|
||||
state: {
|
||||
email: 'peter@lustig.de',
|
||||
language: 'en',
|
||||
community: {
|
||||
name: '',
|
||||
description: '',
|
||||
},
|
||||
publisherId: 12345,
|
||||
},
|
||||
},
|
||||
@ -52,15 +48,6 @@ describe('Register', () => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('commits the community info to the store', () => {
|
||||
expect(mockStoreCommit).toBeCalledWith('community', {
|
||||
name: 'test12',
|
||||
description: 'test community 12',
|
||||
url: 'http://test12.test12/',
|
||||
registerUrl: 'http://test12.test12/register',
|
||||
})
|
||||
})
|
||||
|
||||
it('renders the Register form', () => {
|
||||
expect(wrapper.find('div#registerform').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
@ -37,15 +37,6 @@ describe('RegisterCommunity', () => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('commits the community info to the store', () => {
|
||||
expect(mockStoreCommit).toBeCalledWith('community', {
|
||||
name: 'test12',
|
||||
description: 'test community 12',
|
||||
url: 'http://test12.test12/',
|
||||
registerUrl: 'http://test12.test12/register',
|
||||
})
|
||||
})
|
||||
|
||||
it('renders the Div Element "#register-community"', () => {
|
||||
expect(wrapper.find('div#register-community').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
@ -24,7 +24,6 @@ const {
|
||||
newsletterState,
|
||||
publisherId,
|
||||
isAdmin,
|
||||
community,
|
||||
hasElopage,
|
||||
} = mutations
|
||||
const { login, logout } = actions
|
||||
@ -117,24 +116,6 @@ describe('Vuex store', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('community', () => {
|
||||
it('sets the state of community', () => {
|
||||
const state = {}
|
||||
community(state, {
|
||||
name: 'test12',
|
||||
description: 'test community 12',
|
||||
url: 'http://test12.test12/',
|
||||
registerUrl: 'http://test12.test12/register',
|
||||
})
|
||||
expect(state.community).toEqual({
|
||||
name: 'test12',
|
||||
description: 'test community 12',
|
||||
url: 'http://test12.test12/',
|
||||
registerUrl: 'http://test12.test12/register',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('hasElopage', () => {
|
||||
it('sets the state of hasElopage', () => {
|
||||
const state = { hasElopage: false }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user