Skip to content

Commit 22e5bc4

Browse files
committed
refactor: ♻️ Améliore la lisibilité
1 parent 2a1df39 commit 22e5bc4

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
import { mount } from '@cypress/vue'
2-
import DsfrButton from './DsfrButton'
2+
import DsfrButton from './DsfrButton.vue'
3+
import VIcon from '../../icons.js'
4+
import '../../main.css'
35

46
describe('DsfrButton', () => {
57
it('Simple Button', () => {
8+
const buttonText = 'Test button'
69
mount(DsfrButton, {
10+
global: {
11+
components: {
12+
VIcon,
13+
},
14+
},
715
slots: {
8-
default: 'Test button',
16+
default: () => buttonText,
917
},
1018
})
11-
12-
cy.get('button').contains('Test button').click()
19+
.get('button')
20+
.contains(buttonText)
21+
.click()
1322
})
1423
})

0 commit comments

Comments
 (0)