11import { shallowMount } from "@vue/test-utils" ;
2- import Status from ' ../Status.vue' ;
2+ import Status from " ../Status.vue" ;
33import { assert } from "chai" ;
44
55describe ( "Status test scripts" , ( ) => {
6- test ( "Renders correctly" , ( ) => {
7- const statusIcon = "available" ;
8- const type = "success" ;
9- const status = shallowMount ( Status , {
10- propsData : {
11- statusIcon, type
12- }
13- } ) ;
14- expect ( status . element ) . toMatchSnapshot ( ) ;
6+ test ( "Renders correctly" , ( ) => {
7+ const statusIcon = "available" ;
8+ const type = "success" ;
9+ const status = shallowMount ( Status , {
10+ propsData : {
11+ statusIcon,
12+ type
13+ }
1514 } ) ;
15+ expect ( status . element ) . toMatchSnapshot ( ) ;
16+ } ) ;
1617
17- test ( "Default slot rendering test" , ( ) => {
18- const slotText = "Status Slot Text" ;
19- const status = shallowMount ( Status , {
20- slots : {
21- default : slotText
22- }
23- } ) ;
24- expect ( status . text ( ) ) . toBe ( slotText ) ;
18+ test ( "Default slot rendering test" , ( ) => {
19+ const slotText = "Status Slot Text" ;
20+ const status = shallowMount ( Status , {
21+ slots : {
22+ default : slotText
23+ }
2524 } ) ;
25+ expect ( status . text ( ) ) . toBe ( slotText ) ;
26+ } ) ;
2627
27- test ( "Status indicator with built in status icon test" , ( ) => {
28- const statusIcon = "offline" ;
29- const status = shallowMount ( Status , {
30- propsData : {
31- statusIcon
32- }
33- } ) ;
34- assert ( status . classes ( `fd-status-label--${ statusIcon } ` ) ) ;
28+ test ( "Status indicator with built in status icon test" , ( ) => {
29+ const statusIcon = "offline" ;
30+ const status = shallowMount ( Status , {
31+ propsData : {
32+ statusIcon
33+ }
3534 } ) ;
35+ assert ( status . classes ( `fd-status-label--${ statusIcon } ` ) ) ;
36+ } ) ;
3637
37- test ( "Status indicator with semantic colors" , ( ) => {
38- const type = "warning" ;
39- const status = shallowMount ( Status , {
40- propsData : {
41- type
42- }
43- } ) ;
44- assert ( status . classes ( `fd-status-label--${ type } ` ) ) ;
45-
38+ test ( "Status indicator with semantic colors" , ( ) => {
39+ const type = "warning" ;
40+ const status = shallowMount ( Status , {
41+ propsData : {
42+ type
43+ }
4644 } ) ;
47- } ) ;
45+ assert ( status . classes ( `fd-status-label--${ type } ` ) ) ;
46+ } ) ;
47+ } ) ;
0 commit comments