@@ -4,7 +4,7 @@ import Vuex from 'vuex'
4
4
import CopyrightWaiverStep from '@/components/CopyrightWaiverStep'
5
5
6
6
const localVue = createLocalVue ( )
7
-
7
+
8
8
localVue . use ( Vuex )
9
9
localVue . use ( Buefy )
10
10
@@ -21,63 +21,62 @@ describe('CopyrightWaiver Step: Check conditional rendering of markup', () => {
21
21
}
22
22
} ,
23
23
mocks : {
24
- $t : key => key ,
24
+ $t : key => key
25
25
}
26
26
} )
27
27
} )
28
28
29
- afterEach ( ( ) => {
29
+ afterEach ( ( ) => {
30
30
wrapper . destroy ( )
31
31
} )
32
32
33
- it ( 'Component not mounted if status is inactive' , ( ) => {
33
+ it ( 'Component not mounted if status is inactive' , ( ) => {
34
34
wrapper . setProps ( {
35
35
selected : undefined ,
36
- status : 'inactive' ,
36
+ status : 'inactive' ,
37
37
stepId : 6 ,
38
- stepName : 'CW' ,
38
+ stepName : 'CW'
39
39
} )
40
40
41
- expect ( wrapper . find ( '.step-description' ) . exists ( ) ) . toBeFalsy ( )
42
- expect ( wrapper . find ( '.step-actions' ) . exists ( ) ) . toBeFalsy ( )
41
+ expect ( wrapper . find ( '.step-description' ) . exists ( ) ) . toBeFalsy ( )
42
+ expect ( wrapper . find ( '.step-actions' ) . exists ( ) ) . toBeFalsy ( )
43
43
} )
44
44
45
- it ( 'Step Description block mounted if status is previous' , ( ) => {
46
- wrapper . setProps ( { status : 'previous' } )
47
-
45
+ it ( 'Step Description block mounted if status is previous' , ( ) => {
46
+ wrapper . setProps ( { status : 'previous' } )
47
+
48
48
expect ( wrapper . find ( '.step-description' ) . exists ( ) ) . toBeTruthy ( )
49
49
expect ( wrapper . find ( '.step-actions' ) . exists ( ) ) . toBeFalsy ( )
50
50
} )
51
51
52
- it ( 'Step Actions block mounted if status is current' , ( ) => {
53
- wrapper . setProps ( { status : 'current' } )
52
+ it ( 'Step Actions block mounted if status is current' , ( ) => {
53
+ wrapper . setProps ( { status : 'current' } )
54
54
55
55
expect ( wrapper . find ( '.step-description' ) . exists ( ) ) . toBeFalsy ( )
56
56
expect ( wrapper . find ( '.step-actions' ) . exists ( ) ) . toBeTruthy ( )
57
57
expect ( wrapper . vm . copyrightWaiverAgreed ) . toBe ( false )
58
58
} )
59
-
60
59
} )
61
60
62
61
describe ( 'Test functionality of computed properties' , ( ) => {
63
- let wrapper
62
+ let wrapper
64
63
65
64
beforeEach ( ( ) => {
66
65
wrapper = mount ( CopyrightWaiverStep , {
67
66
localVue,
68
- propsData :{
67
+ propsData : {
69
68
selected : undefined ,
70
- status : 'current' ,
71
- stepId : 6 ,
72
- stepName : 'CW' ,
69
+ status : 'current' ,
70
+ stepId : 6 ,
71
+ stepName : 'CW'
73
72
} ,
74
73
mocks : {
75
- $t : key => key ,
74
+ $t : key => key
76
75
}
77
76
} )
78
77
} )
79
78
80
- afterEach ( ( ) => {
79
+ afterEach ( ( ) => {
81
80
wrapper . destroy ( )
82
81
} )
83
82
@@ -88,7 +87,7 @@ describe('Test functionality of computed properties', () => {
88
87
} )
89
88
90
89
const checkbox = wrapper . findAll ( 'input[type="checkbox"]' ) . at ( 0 )
91
- checkbox . setChecked ( ) ;
90
+ checkbox . setChecked ( )
92
91
93
92
expect ( wrapper . emitted ( ) . change [ 0 ] ) . toStrictEqual ( [ 'CW' , 6 , true ] )
94
93
} )
@@ -100,9 +99,8 @@ describe('Test functionality of computed properties', () => {
100
99
} )
101
100
102
101
const checkbox = wrapper . findAll ( 'input[type="checkbox"]' ) . at ( 1 )
103
- checkbox . setChecked ( ) ;
102
+ checkbox . setChecked ( )
104
103
105
104
expect ( wrapper . emitted ( ) . change [ 0 ] ) . toStrictEqual ( [ 'CW' , 6 , true ] )
106
105
} )
107
-
108
- } )
106
+ } )
0 commit comments