mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove creations from user frontend
This commit is contained in:
parent
a11b27e397
commit
553710ba6a
@ -154,7 +154,6 @@ export const login = gql`
|
||||
hasElopage
|
||||
publisherId
|
||||
isAdmin
|
||||
creation
|
||||
hideAmountGDD
|
||||
hideAmountGDT
|
||||
}
|
||||
|
||||
@ -47,9 +47,6 @@ export const mutations = {
|
||||
hasElopage: (state, hasElopage) => {
|
||||
state.hasElopage = hasElopage
|
||||
},
|
||||
creation: (state, creation) => {
|
||||
state.creation = creation
|
||||
},
|
||||
hideAmountGDD: (state, hideAmountGDD) => {
|
||||
state.hideAmountGDD = !!hideAmountGDD
|
||||
},
|
||||
@ -69,7 +66,6 @@ export const actions = {
|
||||
commit('hasElopage', data.hasElopage)
|
||||
commit('publisherId', data.publisherId)
|
||||
commit('isAdmin', data.isAdmin)
|
||||
commit('creation', data.creation)
|
||||
commit('hideAmountGDD', data.hideAmountGDD)
|
||||
commit('hideAmountGDT', data.hideAmountGDT)
|
||||
},
|
||||
@ -83,7 +79,6 @@ export const actions = {
|
||||
commit('hasElopage', false)
|
||||
commit('publisherId', null)
|
||||
commit('isAdmin', false)
|
||||
commit('creation', null)
|
||||
commit('hideAmountGDD', false)
|
||||
commit('hideAmountGDT', true)
|
||||
localStorage.clear()
|
||||
@ -111,7 +106,6 @@ try {
|
||||
newsletterState: null,
|
||||
hasElopage: false,
|
||||
publisherId: null,
|
||||
creation: null,
|
||||
hideAmountGDD: null,
|
||||
hideAmountGDT: null,
|
||||
},
|
||||
|
||||
@ -30,7 +30,6 @@ const {
|
||||
publisherId,
|
||||
isAdmin,
|
||||
hasElopage,
|
||||
creation,
|
||||
hideAmountGDD,
|
||||
hideAmountGDT,
|
||||
} = mutations
|
||||
@ -143,14 +142,6 @@ describe('Vuex store', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('creation', () => {
|
||||
it('sets the state of creation', () => {
|
||||
const state = { creation: null }
|
||||
creation(state, true)
|
||||
expect(state.creation).toEqual(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('hideAmountGDD', () => {
|
||||
it('sets the state of hideAmountGDD', () => {
|
||||
const state = { hideAmountGDD: false }
|
||||
@ -183,14 +174,13 @@ describe('Vuex store', () => {
|
||||
hasElopage: false,
|
||||
publisherId: 1234,
|
||||
isAdmin: true,
|
||||
creation: ['1000', '1000', '1000'],
|
||||
hideAmountGDD: false,
|
||||
hideAmountGDT: true,
|
||||
}
|
||||
|
||||
it('calls eleven commits', () => {
|
||||
login({ commit, state }, commitedData)
|
||||
expect(commit).toHaveBeenCalledTimes(11)
|
||||
expect(commit).toHaveBeenCalledTimes(10)
|
||||
})
|
||||
|
||||
it('commits email', () => {
|
||||
@ -233,19 +223,14 @@ describe('Vuex store', () => {
|
||||
expect(commit).toHaveBeenNthCalledWith(8, 'isAdmin', true)
|
||||
})
|
||||
|
||||
it('commits creation', () => {
|
||||
login({ commit, state }, commitedData)
|
||||
expect(commit).toHaveBeenNthCalledWith(9, 'creation', ['1000', '1000', '1000'])
|
||||
})
|
||||
|
||||
it('commits hideAmountGDD', () => {
|
||||
login({ commit, state }, commitedData)
|
||||
expect(commit).toHaveBeenNthCalledWith(10, 'hideAmountGDD', false)
|
||||
expect(commit).toHaveBeenNthCalledWith(9, 'hideAmountGDD', false)
|
||||
})
|
||||
|
||||
it('commits hideAmountGDT', () => {
|
||||
login({ commit, state }, commitedData)
|
||||
expect(commit).toHaveBeenNthCalledWith(11, 'hideAmountGDT', true)
|
||||
expect(commit).toHaveBeenNthCalledWith(10, 'hideAmountGDT', true)
|
||||
})
|
||||
})
|
||||
|
||||
@ -255,7 +240,7 @@ describe('Vuex store', () => {
|
||||
|
||||
it('calls eleven commits', () => {
|
||||
logout({ commit, state })
|
||||
expect(commit).toHaveBeenCalledTimes(11)
|
||||
expect(commit).toHaveBeenCalledTimes(10)
|
||||
})
|
||||
|
||||
it('commits token', () => {
|
||||
@ -298,19 +283,14 @@ describe('Vuex store', () => {
|
||||
expect(commit).toHaveBeenNthCalledWith(8, 'isAdmin', false)
|
||||
})
|
||||
|
||||
it('commits creation', () => {
|
||||
logout({ commit, state })
|
||||
expect(commit).toHaveBeenNthCalledWith(9, 'creation', null)
|
||||
})
|
||||
|
||||
it('commits hideAmountGDD', () => {
|
||||
logout({ commit, state })
|
||||
expect(commit).toHaveBeenNthCalledWith(10, 'hideAmountGDD', false)
|
||||
expect(commit).toHaveBeenNthCalledWith(9, 'hideAmountGDD', false)
|
||||
})
|
||||
|
||||
it('commits hideAmountGDT', () => {
|
||||
logout({ commit, state })
|
||||
expect(commit).toHaveBeenNthCalledWith(11, 'hideAmountGDT', true)
|
||||
expect(commit).toHaveBeenNthCalledWith(10, 'hideAmountGDT', true)
|
||||
})
|
||||
// how to get this working?
|
||||
it.skip('calls localStorage.clear()', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user