File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ beforeEach(() => {
9
9
} )
10
10
cy . intercept ( 'GET' , `${ mockServerURL } /employers` , {
11
11
fixture : 'employers.json'
12
- } )
12
+ } ) . as ( 'getEmployers' )
13
13
cy . visit ( '/' )
14
14
} )
15
15
@@ -133,6 +133,14 @@ it('requires employee selection', () => {
133
133
expect ( payload ) . to . have . property ( 'hearAboutCYF' , 'Employer' )
134
134
expect ( payload ) . to . have . property ( 'employer' , 'Capgemini' )
135
135
} )
136
+
137
+ cy . wait ( '@getEmployers' ) . then ( res => {
138
+ const employers = res . response . body . employers
139
+ expect ( res . response . statusCode ) . to . equal ( 200 )
140
+ expect ( employers ) . to . be . an ( 'array' )
141
+ expect ( employers ) . to . have . length . above ( 0 )
142
+ expect ( employers ) . to . deep . include ( { _id : '6569' , name : 'Capgemini' } )
143
+ } )
136
144
} )
137
145
138
146
it ( 'can create a new employer' , ( ) => {
You can’t perform that action at this time.
0 commit comments