@cnamts/synapse 0.0.4-alpha → 0.0.5-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-system-v3.d.ts +932 -224
- package/dist/design-system-v3.js +3374 -1502
- package/dist/design-system-v3.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/src/assets/tokens.scss +0 -1
- package/src/components/Alert/Accessibilite.mdx +14 -0
- package/src/components/Alert/Accessibilite.stories.ts +166 -0
- package/src/components/Alert/AccessibiliteItems.ts +152 -0
- package/src/components/Alert/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackBtn/Accessibilite.mdx +14 -0
- package/src/components/BackBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackBtn/AccessibiliteItems.ts +132 -0
- package/src/components/BackBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/BackToTopBtn/Accessibilite.mdx +14 -0
- package/src/components/BackToTopBtn/Accessibilite.stories.ts +166 -0
- package/src/components/BackToTopBtn/AccessibiliteItems.ts +82 -0
- package/src/components/BackToTopBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CollapsibleList/Accessibilite.mdx +14 -0
- package/src/components/CollapsibleList/Accessibilite.stories.ts +166 -0
- package/src/components/CollapsibleList/AccessibiliteItems.ts +129 -0
- package/src/components/CollapsibleList/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/CopyBtn/Accessibilite.mdx +14 -0
- package/src/components/CopyBtn/Accessibilite.stories.ts +166 -0
- package/src/components/CopyBtn/AccessibiliteItems.ts +135 -0
- package/src/components/CopyBtn/config.ts +2 -0
- package/src/components/CopyBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.mdx +44 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.stories.ts +606 -0
- package/src/components/Customs/SyBtnSelect/SyBtnSelect.vue +246 -0
- package/src/components/Customs/SyBtnSelect/tests/SyBtnSelect.spec.ts +168 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.mdx +40 -0
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.stories.ts → SyInputSelect/SyInputSelect.stories.ts} +29 -29
- package/src/components/Customs/{CustomInputSelect/CustomInputSelect.vue → SyInputSelect/SyInputSelect.vue} +10 -2
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +140 -0
- package/src/components/Customs/{CustomSelect/CustomSelect.mdx → SySelect/SySelect.mdx} +8 -8
- package/src/components/Customs/{CustomSelect/CustomSelect.stories.ts → SySelect/SySelect.stories.ts} +25 -25
- package/src/components/Customs/{CustomSelect/CustomSelect.vue → SySelect/SySelect.vue} +9 -5
- package/src/components/Customs/{CustomInputSelect/tests/CustomInputSelect.spec.ts → SySelect/tests/SySelect.spec.ts} +48 -71
- package/src/components/Customs/SyTextField/SyTextField.mdx +44 -0
- package/src/components/Customs/{CustomTextField/CustomTextField.stories.ts → SyTextField/SyTextField.stories.ts} +34 -34
- package/src/components/Customs/{CustomTextField/tests/CustomTextField.spec.ts → SyTextField/tests/SyTextField.spec.ts} +3 -3
- package/src/components/Customs/{CustomTextField/tests/__snapshots__/CustomTextField.spec.ts.snap → SyTextField/tests/__snapshots__/SyTextField.spec.ts.snap} +3 -5
- package/src/components/DialogBox/DialogBox.mdx +14 -0
- package/src/components/DialogBox/DialogBox.stories.ts +798 -0
- package/src/components/DialogBox/DialogBox.vue +181 -0
- package/src/components/DialogBox/config.ts +25 -0
- package/src/components/DialogBox/locales.ts +5 -0
- package/src/components/DialogBox/tests/DialogBox.spec.ts +329 -0
- package/src/components/DialogBox/tests/__snapshots__/DialogBox.spec.ts.snap +46 -0
- package/src/components/ErrorPage/ErrorPage.mdx +21 -0
- package/src/components/ErrorPage/ErrorPage.stories.ts +133 -0
- package/src/components/ErrorPage/ErrorPage.vue +93 -0
- package/src/components/ErrorPage/locales.ts +5 -0
- package/src/components/ErrorPage/tests/ErrorPage.spec.ts +40 -0
- package/src/components/ErrorPage/tests/__snapshots__/ErrorPage.spec.ts.snap +78 -0
- package/src/components/FooterBar/FooterBar.stories.ts +556 -8
- package/src/components/FooterBar/config.ts +2 -3
- package/src/components/FooterBar/tests/FooterBar.spec.ts +1 -1
- package/src/components/FooterBar/tests/FooterBarConfig.spec.ts +1 -1
- package/src/components/FooterBar/tests/__snapshots__/FooterBar.spec.ts.snap +2 -2
- package/src/components/FranceConnectBtn/Accessibilite.mdx +14 -0
- package/src/components/FranceConnectBtn/Accessibilite.stories.ts +194 -0
- package/src/components/FranceConnectBtn/AccessibiliteItems.ts +199 -0
- package/src/components/FranceConnectBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/HeaderBar/HeaderBar.stories.ts +60 -2
- package/src/components/HeaderNavigationBar/HeaderNavigationBar.mdx +6 -6
- package/src/components/HeaderNavigationBar/tests/HeaderNavigationBar.spec.ts +1 -1
- package/src/components/HeaderToolbar/HeaderToolbar.vue +2 -2
- package/src/components/HeaderToolbar/tests/HeaderToolbar.spec.ts +36 -2
- package/src/components/LangBtn/Accessibilite.mdx +14 -0
- package/src/components/LangBtn/Accessibilite.stories.ts +166 -0
- package/src/components/LangBtn/AccessibiliteItems.ts +132 -0
- package/src/components/LangBtn/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/LangBtn/tests/LangBtn.spec.ts +1 -1
- package/src/components/LangBtn/tests/__snapshots__/LangBtn.spec.ts.snap +1 -1
- package/src/components/MaintenancePage/MaintenancePage.mdx +11 -0
- package/src/components/MaintenancePage/MaintenancePage.stories.ts +41 -0
- package/src/components/MaintenancePage/MaintenancePage.vue +25 -0
- package/src/components/MaintenancePage/assets/maintenance.svg +1 -0
- package/src/components/MaintenancePage/index.ts +3 -0
- package/src/components/MaintenancePage/locales.ts +5 -0
- package/src/components/MaintenancePage/tests/MaintenancePage.spec.ts +12 -0
- package/src/components/MaintenancePage/tests/__snapshots__/MaintenancePage.spec.ts.snap +3 -0
- package/src/components/NotFoundPage/NotFoundPage.mdx +19 -0
- package/src/components/NotFoundPage/NotFoundPage.stories.ts +76 -0
- package/src/components/NotFoundPage/NotFoundPage.vue +52 -0
- package/src/components/NotFoundPage/assets/not-found.svg +1 -0
- package/src/components/NotFoundPage/locales.ts +6 -0
- package/src/components/NotFoundPage/tests/NotFoundPage.spec.ts +38 -0
- package/src/components/NotFoundPage/tests/__snapshots__/NotFoundPage.spec.ts.snap +76 -0
- package/src/components/NotificationBar/Accessibilite.mdx +14 -0
- package/src/components/NotificationBar/Accessibilite.stories.ts +166 -0
- package/src/components/NotificationBar/AccessibiliteItems.ts +174 -0
- package/src/components/NotificationBar/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/NotificationBar/options.ts +1 -0
- package/src/components/PageContainer/Accessibilite.mdx +14 -0
- package/src/components/PageContainer/Accessibilite.stories.ts +166 -0
- package/src/components/PageContainer/AccessibiliteItems.ts +52 -0
- package/src/components/PageContainer/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/PhoneField/PhoneField.vue +5 -5
- package/src/components/PhoneField/tests/PhoneField.spec.ts +3 -3
- package/src/components/SkipLink/Accessibilite.mdx +14 -0
- package/src/components/SkipLink/Accessibilite.stories.ts +167 -0
- package/src/components/SkipLink/AccessibiliteItems.ts +77 -0
- package/src/components/SkipLink/constants/ExpertiseLevelEnum.ts +4 -0
- package/src/components/SocialMediaLinks/SocialMediaLinks.mdx +17 -13
- package/src/components/SocialMediaLinks/SocialMediaLinks.stories.ts +2 -1
- package/src/components/SocialMediaLinks/tests/SocialMediaLinks.spec.ts +1 -1
- package/src/components/SocialMediaLinks/tests/__snapshots__/SocialMediaLinks.spec.ts.snap +2 -2
- package/src/components/SubHeader/SubHeader.vue +1 -1
- package/src/components/UserMenuBtn/UserMenuBtn.mdx +35 -0
- package/src/components/UserMenuBtn/UserMenuBtn.stories.ts +438 -0
- package/src/components/UserMenuBtn/UserMenuBtn.vue +105 -0
- package/src/components/UserMenuBtn/config.ts +24 -0
- package/src/components/UserMenuBtn/tests/UserMenuBtn.spec.ts +125 -0
- package/src/components/index.ts +12 -3
- package/src/composables/index.ts +8 -0
- package/src/composables/rules/tests/useFieldValidation.spec.ts +82 -0
- package/src/composables/rules/useFieldValidation.ts +53 -0
- package/src/designTokens/index.ts +2 -0
- package/src/designTokens/tokens/cnam/cnamDarkTheme.ts +5 -0
- package/src/designTokens/tokens/cnam/cnamLightTheme.ts +1 -0
- package/src/main.ts +2 -0
- package/src/stories/Fondamentaux/Arrondis.mdx +24 -0
- package/src/stories/{Guidelines → Fondamentaux}/Colors.mdx +1 -1
- package/src/stories/Fondamentaux/Conteneurs.mdx +7 -0
- package/src/stories/Fondamentaux/CustomisationEtThemes.mdx +7 -0
- package/src/stories/Fondamentaux/Elevations.mdx +14 -0
- package/src/stories/Fondamentaux/Espacements.mdx +29 -0
- package/src/stories/{Guidelines → Fondamentaux}/Introduction.mdx +1 -1
- package/src/stories/Fondamentaux/StylesTypographiques.mdx +33 -0
- package/src/stories/Fondamentaux/Typographie.mdx +58 -0
- package/src/stories/GuideDuDev/CommentUtiliserLesRules.mdx +132 -0
- package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.stories.ts +1 -1
- package/src/stories/{Fondamentaux → Guidelines}/EcoConception/Econception.stories.ts +2 -2
- package/src/components/Customs/CustomInputSelect/CustomInputSelect.mdx +0 -40
- package/src/components/Customs/CustomSelect/tests/CustomSelect.spec.ts +0 -236
- package/src/components/Customs/CustomTextField/CustomTextField.mdx +0 -44
- package/src/stories/Guidelines/CustomisationEtThemes.mdx +0 -3
- package/src/stories/Guidelines/Typo.mdx +0 -53
- /package/src/components/Customs/{CustomInputSelect → SyInputSelect}/config.ts +0 -0
- /package/src/components/Customs/{CustomTextField/CustomTextField.vue → SyTextField/SyTextField.vue} +0 -0
- /package/src/components/Customs/{CustomTextField → SyTextField}/types.d.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/Accessibilite.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/AccessibiliteItems.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/ExpertiseLevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/Accessibilite/constants/RGAALevelEnum.ts +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/EcoConception.mdx +0 -0
- /package/src/stories/{Fondamentaux → Guidelines}/EcoConception/ecoDesignItems.ts +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
|
+
import ErrorPage from './ErrorPage.vue'
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Templates/ErrorPage',
|
|
6
|
+
component: ErrorPage,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'fullscreen',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
'code': {
|
|
12
|
+
description: 'Code d\'erreur affiché en premier plan',
|
|
13
|
+
},
|
|
14
|
+
'codeErrorText': {
|
|
15
|
+
description: 'Text affiché avant le code d\'erreur pour les outils d\'accessibilité',
|
|
16
|
+
table: {
|
|
17
|
+
defaultValue: {
|
|
18
|
+
summary: 'Code d\'erreur\xa0: ',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
'additional-content': {
|
|
23
|
+
control: {
|
|
24
|
+
type: 'text',
|
|
25
|
+
},
|
|
26
|
+
table: {
|
|
27
|
+
type: {
|
|
28
|
+
summary: '{}',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
'action': {
|
|
33
|
+
control: {
|
|
34
|
+
type: 'text',
|
|
35
|
+
},
|
|
36
|
+
table: {
|
|
37
|
+
type: {
|
|
38
|
+
summary: '{}',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'illustration': {
|
|
43
|
+
control: {
|
|
44
|
+
type: 'text',
|
|
45
|
+
},
|
|
46
|
+
table: {
|
|
47
|
+
type: {
|
|
48
|
+
summary: '{}',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
} satisfies Meta<typeof ErrorPage>
|
|
54
|
+
|
|
55
|
+
export default meta
|
|
56
|
+
|
|
57
|
+
type Story = StoryObj<typeof ErrorPage>
|
|
58
|
+
|
|
59
|
+
export const Default: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
pageTitle: 'une erreur est survenue',
|
|
62
|
+
code: '500',
|
|
63
|
+
message: 'Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646',
|
|
64
|
+
},
|
|
65
|
+
parameters: {
|
|
66
|
+
sourceCode: [
|
|
67
|
+
{
|
|
68
|
+
name: 'Template',
|
|
69
|
+
code: `
|
|
70
|
+
<template>
|
|
71
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
72
|
+
<ErrorPage
|
|
73
|
+
page-title="une erreur est survenue"
|
|
74
|
+
code="500"
|
|
75
|
+
message="Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646"
|
|
76
|
+
>
|
|
77
|
+
</div>
|
|
78
|
+
</template>
|
|
79
|
+
`,
|
|
80
|
+
}, {
|
|
81
|
+
name: 'Script',
|
|
82
|
+
code: `
|
|
83
|
+
<script setup lang="ts">
|
|
84
|
+
import { ErrorPage } from '@cnamts/synapse'
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
`,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
decorators: [
|
|
92
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
93
|
+
],
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const WithLink: Story = {
|
|
97
|
+
args: {
|
|
98
|
+
...Default.args,
|
|
99
|
+
btnHref: '/',
|
|
100
|
+
btnText: 'Retour à l\'accueil',
|
|
101
|
+
},
|
|
102
|
+
parameters: {
|
|
103
|
+
sourceCode: [
|
|
104
|
+
{
|
|
105
|
+
name: 'Template',
|
|
106
|
+
code: `
|
|
107
|
+
<template>
|
|
108
|
+
<div style="padding: 20px; background: rgb(231, 236, 245)">
|
|
109
|
+
<ErrorPage
|
|
110
|
+
page-title="une erreur est survenue"
|
|
111
|
+
code="500"
|
|
112
|
+
message="Une erreur est survenue de notre côté, veuillez réessayer plus tard. Si le problème persiste veuillez nous contacter par téléphone au 3646"
|
|
113
|
+
btn-href=""
|
|
114
|
+
btn-text="Retour à l'accueil"
|
|
115
|
+
>
|
|
116
|
+
</div>
|
|
117
|
+
</template>
|
|
118
|
+
`,
|
|
119
|
+
}, {
|
|
120
|
+
name: 'Script',
|
|
121
|
+
code: `
|
|
122
|
+
<script setup lang="ts">
|
|
123
|
+
import { ErrorPage } from '@cnamts/synapse'
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
`,
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
decorators: [
|
|
131
|
+
() => ({ template: '<div style="padding: 20px; background: rgb(231, 236, 245)"><story /></div>' }),
|
|
132
|
+
],
|
|
133
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
3
|
+
import { locales } from './locales'
|
|
4
|
+
import PageContainer from '../PageContainer/PageContainer.vue'
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<{
|
|
7
|
+
pageTitle?: string
|
|
8
|
+
message?: string
|
|
9
|
+
code?: string
|
|
10
|
+
codeErrorText?: string
|
|
11
|
+
btnText?: string
|
|
12
|
+
btnHref?: string
|
|
13
|
+
btnLink?: RouteRecordRaw | string
|
|
14
|
+
hideBtn?: boolean
|
|
15
|
+
}>(), {
|
|
16
|
+
pageTitle: undefined,
|
|
17
|
+
message: undefined,
|
|
18
|
+
code: undefined,
|
|
19
|
+
codeErrorText: locales.errorCodeText,
|
|
20
|
+
btnText: undefined,
|
|
21
|
+
btnLink: '/',
|
|
22
|
+
btnHref: undefined,
|
|
23
|
+
hideBtn: false,
|
|
24
|
+
})
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<PageContainer size="l">
|
|
29
|
+
<VCard
|
|
30
|
+
:elevation="0"
|
|
31
|
+
class="pa-6 pa-sm-16"
|
|
32
|
+
>
|
|
33
|
+
<VRow class="max-width-none">
|
|
34
|
+
<VCol
|
|
35
|
+
:sm="$slots.illustration ? 6 : 12"
|
|
36
|
+
cols="12"
|
|
37
|
+
class="order-last order-sm-first text-center text-sm-left d-flex flex-column justify-center align-sm-start"
|
|
38
|
+
>
|
|
39
|
+
<div
|
|
40
|
+
v-if="code"
|
|
41
|
+
class="vd-code text-primary mb-4"
|
|
42
|
+
>
|
|
43
|
+
<span class="d-sr-only">{{ codeErrorText }}</span>
|
|
44
|
+
{{ code }}
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<h2
|
|
48
|
+
v-if="pageTitle"
|
|
49
|
+
class="mb-2 font-weight-bold text-h5 mb-4"
|
|
50
|
+
>
|
|
51
|
+
{{ pageTitle }}
|
|
52
|
+
</h2>
|
|
53
|
+
|
|
54
|
+
<p v-if="message">
|
|
55
|
+
{{ message }}
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<slot name="additional-content" />
|
|
59
|
+
|
|
60
|
+
<slot name="action">
|
|
61
|
+
<VBtn
|
|
62
|
+
v-if="!hideBtn && btnText && (btnLink || btnHref)"
|
|
63
|
+
:to="btnLink"
|
|
64
|
+
:href="btnHref"
|
|
65
|
+
color="primary"
|
|
66
|
+
exact
|
|
67
|
+
class="mt-6"
|
|
68
|
+
>
|
|
69
|
+
{{ btnText }}
|
|
70
|
+
</VBtn>
|
|
71
|
+
</slot>
|
|
72
|
+
</VCol>
|
|
73
|
+
|
|
74
|
+
<VCol
|
|
75
|
+
v-if="$slots.illustration"
|
|
76
|
+
cols="12"
|
|
77
|
+
sm="6"
|
|
78
|
+
class="d-flex align-center justify-center"
|
|
79
|
+
>
|
|
80
|
+
<slot name="illustration" />
|
|
81
|
+
</VCol>
|
|
82
|
+
</VRow>
|
|
83
|
+
</VCard>
|
|
84
|
+
</PageContainer>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<style lang="scss" scoped>
|
|
88
|
+
.vd-code {
|
|
89
|
+
font-size: 6rem;
|
|
90
|
+
line-height: 6rem;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
|
2
|
+
import { mount } from '@vue/test-utils'
|
|
3
|
+
import { vuetify } from '@tests/unit/setup'
|
|
4
|
+
import ErrorPage from '../ErrorPage.vue'
|
|
5
|
+
|
|
6
|
+
describe('ErrorPage', () => {
|
|
7
|
+
it('renders correctly', () => {
|
|
8
|
+
const wrapper = mount(ErrorPage, {
|
|
9
|
+
global: {
|
|
10
|
+
plugins: [vuetify],
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
pageTitle: 'Something went wrong',
|
|
14
|
+
message: 'Error message',
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
expect(wrapper.text()).toContain('Something went wrong')
|
|
19
|
+
expect(wrapper.text()).toContain('Error message')
|
|
20
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
it('renders correctly with undefined route', () => {
|
|
24
|
+
const wrapper = mount(ErrorPage, {
|
|
25
|
+
global: {
|
|
26
|
+
plugins: [vuetify],
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
code: '501',
|
|
30
|
+
pageTitle: 'Error',
|
|
31
|
+
message: 'Error message',
|
|
32
|
+
btnText: 'Go to...',
|
|
33
|
+
btnHref: 'https://google.com',
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
expect(wrapper.find('a').exists()).toBe(true)
|
|
38
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
39
|
+
})
|
|
40
|
+
})
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`ErrorPage > renders correctly 1`] = `
|
|
4
|
+
"<div data-v-fb0b02fd="" data-v-8f2b5bad="" class="py-10 px-8 vd-page-container d-flex justify-center">
|
|
5
|
+
<div data-v-fb0b02fd="" class="v-sheet v-theme--light bg-transparent" style="width: 960px;">
|
|
6
|
+
<div data-v-8f2b5bad="" class="v-card v-theme--light v-card--density-default elevation-0 v-card--variant-elevated pa-6 pa-sm-16">
|
|
7
|
+
<!---->
|
|
8
|
+
<div class="v-card__loader">
|
|
9
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
10
|
+
<!---->
|
|
11
|
+
<div class="v-progress-linear__background" style="opacity: NaN;"></div>
|
|
12
|
+
<div class="v-progress-linear__buffer" style="opacity: NaN; width: 0%;"></div>
|
|
13
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
14
|
+
<div class="v-progress-linear__indeterminate">
|
|
15
|
+
<div class="v-progress-linear__indeterminate long"></div>
|
|
16
|
+
<div class="v-progress-linear__indeterminate short"></div>
|
|
17
|
+
</div>
|
|
18
|
+
</transition-stub>
|
|
19
|
+
<!---->
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<!---->
|
|
23
|
+
<!---->
|
|
24
|
+
<div data-v-8f2b5bad="" class="v-row max-width-none">
|
|
25
|
+
<div data-v-8f2b5bad="" class="v-col-sm-12 v-col-12 order-last order-sm-first text-center text-sm-left d-flex flex-column justify-center align-sm-start">
|
|
26
|
+
<!--v-if-->
|
|
27
|
+
<h2 data-v-8f2b5bad="" class="mb-2 font-weight-bold text-h5 mb-4">Something went wrong</h2>
|
|
28
|
+
<p data-v-8f2b5bad="">Error message</p>
|
|
29
|
+
<!--v-if-->
|
|
30
|
+
</div>
|
|
31
|
+
<!--v-if-->
|
|
32
|
+
</div>
|
|
33
|
+
<!---->
|
|
34
|
+
<!----><span class="v-card__underlay"></span>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>"
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
exports[`ErrorPage > renders correctly with undefined route 1`] = `
|
|
41
|
+
"<div data-v-fb0b02fd="" data-v-8f2b5bad="" class="py-10 px-8 vd-page-container d-flex justify-center">
|
|
42
|
+
<div data-v-fb0b02fd="" class="v-sheet v-theme--light bg-transparent" style="width: 960px;">
|
|
43
|
+
<div data-v-8f2b5bad="" class="v-card v-theme--light v-card--density-default elevation-0 v-card--variant-elevated pa-6 pa-sm-16">
|
|
44
|
+
<!---->
|
|
45
|
+
<div class="v-card__loader">
|
|
46
|
+
<div class="v-progress-linear v-theme--light v-locale--is-ltr" style="top: 0px; height: 0px; --v-progress-linear-height: 2px;" role="progressbar" aria-hidden="true" aria-valuemin="0" aria-valuemax="100">
|
|
47
|
+
<!---->
|
|
48
|
+
<div class="v-progress-linear__background" style="opacity: NaN;"></div>
|
|
49
|
+
<div class="v-progress-linear__buffer" style="opacity: NaN; width: 0%;"></div>
|
|
50
|
+
<transition-stub name="fade-transition" appear="false" persisted="false" css="true">
|
|
51
|
+
<div class="v-progress-linear__indeterminate">
|
|
52
|
+
<div class="v-progress-linear__indeterminate long"></div>
|
|
53
|
+
<div class="v-progress-linear__indeterminate short"></div>
|
|
54
|
+
</div>
|
|
55
|
+
</transition-stub>
|
|
56
|
+
<!---->
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<!---->
|
|
60
|
+
<!---->
|
|
61
|
+
<div data-v-8f2b5bad="" class="v-row max-width-none">
|
|
62
|
+
<div data-v-8f2b5bad="" class="v-col-sm-12 v-col-12 order-last order-sm-first text-center text-sm-left d-flex flex-column justify-center align-sm-start">
|
|
63
|
+
<div data-v-8f2b5bad="" class="vd-code text-primary mb-4"><span data-v-8f2b5bad="" class="d-sr-only">Code d'erreur : </span> 501</div>
|
|
64
|
+
<h2 data-v-8f2b5bad="" class="mb-2 font-weight-bold text-h5 mb-4">Error</h2>
|
|
65
|
+
<p data-v-8f2b5bad="">Error message</p><a data-v-8f2b5bad="" class="v-btn v-btn--elevated v-theme--light bg-primary v-btn--density-default v-btn--size-default v-btn--variant-elevated mt-6" href="https://google.com"><span class="v-btn__overlay"></span><span class="v-btn__underlay"></span>
|
|
66
|
+
<!----><span class="v-btn__content" data-no-activator="">Go to...</span>
|
|
67
|
+
<!---->
|
|
68
|
+
<!---->
|
|
69
|
+
</a>
|
|
70
|
+
</div>
|
|
71
|
+
<!--v-if-->
|
|
72
|
+
</div>
|
|
73
|
+
<!---->
|
|
74
|
+
<!----><span class="v-card__underlay"></span>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>"
|
|
78
|
+
`;
|