@@ -13,8 +13,10 @@ describe('To Validate & test Documentation APIs via API call (V3)', function ()
1313 timeout : timeout ,
1414 failOnStatusCode : allowFail ,
1515 } ) . then ( ( response ) => {
16- validate_200_Status ( response ) ;
17- expect ( response . body ) . to . not . be . null ;
16+ return cy . logJson ( 'response' , response ) . then ( ( ) => {
17+ validate_200_Status ( response ) ;
18+ expect ( response . body ) . to . not . be . null ;
19+ } ) ;
1820 } ) ;
1921 } ) ;
2022
@@ -25,11 +27,13 @@ describe('To Validate & test Documentation APIs via API call (V3)', function ()
2527 timeout : timeout ,
2628 failOnStatusCode : allowFail ,
2729 } ) . then ( ( response ) => {
28- validate_200_Status ( response ) ;
29- expect ( response . body ) . to . be . an ( 'object' ) ;
30- expect ( response . body ) . to . have . property ( 'swagger' ) ;
31- expect ( response . body ) . to . have . property ( 'info' ) ;
32- expect ( response . body ) . to . have . property ( 'paths' ) ;
30+ return cy . logJson ( 'response' , response ) . then ( ( ) => {
31+ validate_200_Status ( response ) ;
32+ expect ( response . body ) . to . be . an ( 'object' ) ;
33+ expect ( response . body ) . to . have . property ( 'swagger' ) ;
34+ expect ( response . body ) . to . have . property ( 'info' ) ;
35+ expect ( response . body ) . to . have . property ( 'paths' ) ;
36+ } ) ;
3337 } ) ;
3438 } ) ;
3539
@@ -77,14 +81,16 @@ describe('To Validate & test Documentation APIs via API call (V3)', function ()
7781 timeout,
7882 } )
7983 . then ( ( response ) => {
80- cy . task ( 'log' , `Testing: ${ c . title } ` ) ;
81- validate_expected_status (
82- response ,
83- c . expectedStatus ,
84- c . expectedCode ,
85- c . expectedMessage ,
86- c . expectedMessageContains ,
87- ) ;
84+ return cy . logJson ( 'response' , response ) . then ( ( ) => {
85+ cy . task ( 'log' , `Testing: ${ c . title } ` ) ;
86+ validate_expected_status (
87+ response ,
88+ c . expectedStatus ,
89+ c . expectedCode ,
90+ c . expectedMessage ,
91+ c . expectedMessageContains ,
92+ ) ;
93+ } ) ;
8894 } ) ;
8995 } ) ;
9096 } ) ;
0 commit comments