@@ -8,28 +8,28 @@ import { expect, it } from 'vitest'
88import NcSettingsSection from '../../../../src/components/NcSettingsSection/NcSettingsSection.vue'
99
1010it ( 'renders the headline' , async ( ) => {
11- const vm = mount ( NcSettingsSection , {
11+ const wrapper = mount ( NcSettingsSection , {
1212 props : {
1313 name : 'Example section' ,
1414 } ,
1515 } )
1616
17- expect ( vm . text ( ) ) . toMatch ( 'Example section' )
17+ expect ( wrapper . text ( ) ) . toMatch ( 'Example section' )
1818} )
1919
2020it ( 'renders the description' , async ( ) => {
21- const vm = mount ( NcSettingsSection , {
21+ const wrapper = mount ( NcSettingsSection , {
2222 props : {
2323 name : 'Example section' ,
2424 description : 'This section allows to test the component.' ,
2525 } ,
2626 } )
2727
28- expect ( vm . text ( ) ) . toMatch ( 'This section allows to test the component.' )
28+ expect ( wrapper . text ( ) ) . toMatch ( 'This section allows to test the component.' )
2929} )
3030
3131it ( 'renders the content' , async ( ) => {
32- const vm = mount ( NcSettingsSection , {
32+ const wrapper = mount ( NcSettingsSection , {
3333 props : {
3434 name : 'Example section' ,
3535 } ,
@@ -38,31 +38,31 @@ it('renders the content', async () => {
3838 } ,
3939 } )
4040
41- expect ( vm . find ( '#content' ) . exists ( ) ) . toBe ( true )
41+ expect ( wrapper . find ( '#content' ) . exists ( ) ) . toBe ( true )
4242} )
4343
4444it ( 'renders documentation link if provided' , async ( ) => {
45- const vm = mount ( NcSettingsSection , {
45+ const wrapper = mount ( NcSettingsSection , {
4646 props : {
4747 name : 'Example section' ,
4848 docUrl : 'http://example.com' ,
4949 } ,
5050 } )
5151
52- const link = vm . find ( 'a' )
52+ const link = wrapper . find ( 'a' )
5353 expect ( link . exists ( ) ) . toBe ( true )
5454 expect ( link . attributes ( 'href' ) ) . toBe ( 'http://example.com' )
5555 expect ( link . attributes ( 'rel' ) ) . toBe ( 'noreferrer nofollow' )
5656 expect ( link . attributes ( 'aria-label' ) ) . toBe ( 'External documentation' )
5757} )
5858
5959it ( 'does not render documentation link if missing' , async ( ) => {
60- const vm = mount ( NcSettingsSection , {
60+ const wrapper = mount ( NcSettingsSection , {
6161 props : {
6262 name : 'Example section' ,
6363 } ,
6464 } )
6565
66- const link = vm . find ( 'a' )
66+ const link = wrapper . find ( 'a' )
6767 expect ( link . exists ( ) ) . toBe ( false )
6868} )
0 commit comments