mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into language_updates_bernd
This commit is contained in:
commit
632c0255bd
@ -1,3 +1,4 @@
|
||||
GRAPHQL_URI=http://localhost:4000/graphql
|
||||
WALLET_AUTH_URL=http://localhost/vue/authenticate?token=$1
|
||||
WALLET_URL=http://localhost/vue/login
|
||||
DEBUG_DISABLE_AUTH=false
|
||||
@ -53,13 +53,17 @@ describe('NavBar', () => {
|
||||
})
|
||||
|
||||
describe('logout', () => {
|
||||
// const assignLocationSpy = jest.fn()
|
||||
const windowLocationMock = jest.fn()
|
||||
beforeEach(async () => {
|
||||
delete window.location
|
||||
window.location = {
|
||||
assign: windowLocationMock,
|
||||
}
|
||||
await wrapper.findAll('a').at(6).trigger('click')
|
||||
})
|
||||
|
||||
it('redirects to /logout', () => {
|
||||
expect(routerPushMock).toBeCalledWith('/logout')
|
||||
expect(windowLocationMock).toBeCalledWith('http://localhost/vue/login')
|
||||
})
|
||||
|
||||
it('dispatches logout to store', () => {
|
||||
|
||||
@ -33,8 +33,9 @@ export default {
|
||||
name: 'navbar',
|
||||
methods: {
|
||||
logout() {
|
||||
window.location.assign(CONFIG.WALLET_URL)
|
||||
// window.location = CONFIG.WALLET_URL
|
||||
this.$store.dispatch('logout')
|
||||
this.$router.push('/logout')
|
||||
},
|
||||
wallet() {
|
||||
window.location = CONFIG.WALLET_AUTH_URL.replace('$1', this.$store.state.token)
|
||||
|
||||
@ -20,6 +20,7 @@ const environment = {
|
||||
const endpoints = {
|
||||
GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000/graphql',
|
||||
WALLET_AUTH_URL: process.env.WALLET_AUTH_URL || 'http://localhost/vue/authenticate?token=$1',
|
||||
WALLET_URL: process.env.WALLET_URL || 'http://localhost/vue/login',
|
||||
}
|
||||
|
||||
const debug = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user