@@ -15,7 +15,7 @@ describe('To Validate & get list of signatures of ClaGroups via API call', funct
1515 const environment = Cypress . env ( 'CYPRESS_ENV' ) ;
1616
1717 // Import the appropriate configuration based on the environment
18- let appConfig ;
18+ let appConfig : any = { } ;
1919 if ( environment === 'dev' ) {
2020 appConfig = require ( '../../appConfig/config.dev.ts' ) . appConfig ;
2121 } else if ( environment === 'production' ) {
@@ -50,7 +50,58 @@ describe('To Validate & get list of signatures of ClaGroups via API call', funct
5050 let bearerToken : string = null ;
5151 const timeout = 180000 ;
5252
53- before ( ( ) => {
53+ it ( 'POST /request-individual-signature - Request GitHub individual signature (Go v4 path)' , function ( ) {
54+
55+ const requestData = {
56+ project_id : appConfig . projectID ,
57+ user_id : appConfig . user_id ,
58+ return_url_type : 'Github' ,
59+ return_url : 'https://github.com/test/repo/pull/1' ,
60+ } ;
61+
62+ cy . request ( {
63+ method : 'POST' ,
64+ url : `${ claEndpoint } request-individual-signature` ,
65+ timeout : timeout ,
66+ failOnStatusCode : allowFail ,
67+ body : requestData ,
68+ } ) . then ( ( response ) => {
69+ return cy . logJson ( 'POST /request-individual-signature (GitHub, v4) response' , response ) . then ( ( ) => {
70+ validate_200_Status ( response ) ;
71+ expect ( response . body ) . to . be . an ( 'object' ) ;
72+ } ) ;
73+ } ) ;
74+ } ) ;
75+
76+ it ( 'POST /request-individual-signature - Request GitLab individual signature (Go v4 path)' , function ( ) {
77+
78+ const requestData = {
79+ project_id : appConfig . projectID ,
80+ user_id : appConfig . user_id ,
81+ return_url_type : 'Gitlab' ,
82+ return_url : 'https://gitlab.com/test/repo/-/merge_requests/1' ,
83+ } ;
84+
85+ cy . request ( {
86+ method : 'POST' ,
87+ url : `${ claEndpoint } request-individual-signature` ,
88+ timeout : timeout ,
89+ failOnStatusCode : allowFail ,
90+ body : requestData ,
91+ } ) . then ( ( response ) => {
92+ return cy . logJson ( 'POST /request-individual-signature (GitLab, v4) response' , response ) . then ( ( ) => {
93+ validate_200_Status ( response ) ;
94+ expect ( response . body ) . to . be . an ( 'object' ) ;
95+ } ) ;
96+ } ) ;
97+ } ) ;
98+
99+ before ( function ( ) {
100+ if ( ! appConfig . projectID || ! appConfig . user_id ) {
101+ this . skip ( ) ;
102+ return ;
103+ }
104+
54105 if ( bearerToken == null ) {
55106 getTokenKey ( bearerToken ) ;
56107 cy . window ( ) . then ( ( win ) => {
0 commit comments