File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ describe('new engagement', () => {
7
7
const id = uuid ( ) ;
8
8
const testEngagementName = `cypressio_${ id } ` ;
9
9
const customerName = 'Ldstr E2E' ;
10
- const reqUrl = ` engagements/customers/` + encodeURIComponent ( customerName ) + `/projects/ ${ testEngagementName } ` ;
10
+ const reqUrl = ' engagements/**' ;
11
11
12
12
beforeEach ( 'Login' , ( ) => {
13
13
cy . login ( ) ;
14
14
cy . fixture ( 'users.json' ) . as ( 'users' ) ;
15
+
15
16
cy . intercept ( 'PUT' , reqUrl ) . as ( 'saveEngagement' ) ;
16
17
} ) ;
17
18
@@ -37,7 +38,10 @@ describe('new engagement', () => {
37
38
cy . get ( '[data-cy=new_engagement_region]' ) . select ( 'DEV' ) . should ( 'have.value' , 'dev' ) ;
38
39
cy . get ( '[data-cy=createNewEngagement]' ) . click ( ) ;
39
40
40
- cy . wait ( '@createEngagement' ) . its ( 'response.statusCode' ) . should ( 'eq' , 201 ) ;
41
+ cy . wait ( '@createEngagement' ) . should ( ( xhr ) => {
42
+ expect ( xhr . response . statusCode , 'expecting successful POST' ) . to . equal ( 201 )
43
+ expect ( xhr . response . body . engagement_uuid , 'expecting engagement uuid to be set' ) . to . not . be . null
44
+ } )
41
45
42
46
cy . get ( 'li > .pf-c-alert' ) . contains (
43
47
'Your engagement has been successfully created'
You can’t perform that action at this time.
0 commit comments