forked from Ivasoft/geovisio-website
fix test
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user