This commit is contained in:
Andreani Jean
2023-04-12 12:45:29 +02:00
parent 441bd1463b
commit 1eb8f7b111
2 changed files with 3 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils'
import { createI18n } from 'vue-i18n'
import Header from '../Header.vue'
import fr from '../../locales/fr.json'
vi.mock('vue-router') // mock the import
vi.mock('vue-router')
const i18n = createI18n({
locale: 'fr',
@@ -33,8 +33,7 @@ describe('Template', () => {
}
}
})
expect(wrapper.html()).contains('path="authentification"')
expect(wrapper.html()).contains('path="api-url/api/auth/login')
})
})
describe('When the user is logged', () => {

View File

@@ -12,10 +12,10 @@ import { useCookies } from 'vue3-cookies'
import { useRouter } from 'vue-router'
const { cookies } = useCookies()
const router = useRouter()
const myAccountUrl = computed<string>(
() => `${import.meta.env.VITE_API_URL}oauth/realms/geovisio/account`
)
onMounted(async () => {
try {
const isLogout = cookies.get('KEYCLOAK_IDENTITY')