Skip to content

Commit a0663af

Browse files
authored
Merge pull request #288 from dnum-mi/fix/bug-in-icons
fix/bug in icons
2 parents 92dfc32 + 0e82f21 commit a0663af

36 files changed

+2489
-3312
lines changed

package-lock.json

Lines changed: 2400 additions & 3244 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/DsfrAlert/DsfrAlert.spec.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import { OhVueIcon as VIcon, addIcons } from 'oh-vue-icons'
12
import { fireEvent, render } from '@testing-library/vue'
23

34
import DsfrAlert from './DsfrAlert.vue'
45

5-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
6+
import { RiCloseLine } from 'oh-vue-icons/icons/ri/index.js'
7+
8+
addIcons(RiCloseLine)
69

710
describe('DsfrAlert', () => {
811
it('should mount DsfrAlert with right content', () => {

src/components/DsfrBreadcrumb/DsfrBreadcrumb.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { render } from '@testing-library/vue'
23
import { createRouter, createWebHistory } from 'vue-router'
34

@@ -26,8 +27,6 @@ const router = createRouter({
2627
],
2728
})
2829

29-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
30-
3130
describe('DsfrBreadcrumb', () => {
3231
it('should render DsfrBreadcrumb with right content', async () => {
3332
// Given

src/components/DsfrButton/DsfrButton.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { render } from '@testing-library/vue'
23
// import '@gouvfr/dsfr/dist/core/core.module.js'
34

45
import DsfrButton from './DsfrButton.vue'
56

6-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
7-
87
describe('DsfrButton', () => {
98
it('should mount DsfrButton with right content', () => {
109
// Given

src/components/DsfrButton/DsfrButtonGroup.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { fireEvent } from '@testing-library/dom'
23
import { render } from '@testing-library/vue'
34

@@ -6,8 +7,6 @@ import { spy } from '@/../tests/unit/test-utils.js'
67

78
import DsfrButtonGroup from './DsfrButtonGroup.vue'
89

9-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
10-
1110
describe('DsfrButtonGroup', () => {
1211
it('should mount DsfrButtonGroup with content', async () => {
1312
// Given

src/components/DsfrCallout/DsfrCallout.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { fireEvent, render } from '@testing-library/vue'
23

34
import { spy } from '@/../tests/unit/test-utils.js'
@@ -6,8 +7,6 @@ import { spy } from '@/../tests/unit/test-utils.js'
67

78
import DsfrCallout from './DsfrCallout.vue'
89

9-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
10-
1110
describe('DsfrCallout', () => {
1211
it('should display a callout without a button', () => {
1312
const title = 'Titre de la mise en avant'

src/components/DsfrCard/DsfrCard.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { fireEvent } from '@testing-library/dom'
23
import { render } from '@testing-library/vue'
34

@@ -21,8 +22,6 @@ const router = createRouter({
2122
],
2223
})
2324

24-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
25-
2625
describe('DsfrCard', () => {
2726
it('should render a nice card', async () => {
2827
// Given

src/components/DsfrCheckbox/DsfrCheckbox.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { render } from '@testing-library/vue'
23

34
import CheckBox from './DsfrCheckbox.vue'
45

5-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
6-
76
describe('DsfrCheckbox', () => {
87
it('should render a checkbox with label in div', () => {
98
// Given

src/components/DsfrCheckbox/DsfrCheckboxSet.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import { fireEvent, render } from '@testing-library/vue'
23

34
import DsfrCheckboxSet from './DsfrCheckboxSet.vue'
45

5-
const VIcon = { props: ['name'], template: '<i :class="String(name)"></i>' }
6-
76
describe('DsfrCheckboxSet', () => {
87
it('should render a group of checkboxes in fieldset', () => {
98
// Given

src/components/DsfrFileUpload/DsfrFileUpload.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { OhVueIcon as VIcon } from 'oh-vue-icons'
12
import DsfrFileUpload from './DsfrFileUpload.vue'
23
import { render } from '@testing-library/vue'
34

4-
const VIcon = { props: ['name'], template: '<i :class="name"></i>' }
5-
65
describe('DsfrFileUpload', () => {
76
it('should render file input without hint nor error', () => {
87
const label = 'Texte du label'

0 commit comments

Comments
 (0)