@@ -6,18 +6,6 @@ import {BaseTest} from "./BaseTest";
66describe ( "ScanCreate cases" , ( ) => {
77 let params = new Map ( ) ;
88 const cxScanConfig = new BaseTest ( ) ;
9- it ( 'ScanCreate Successful case wait mode' , async ( ) => {
10- params . set ( CxParamType . PROJECT_NAME , "ast-cli-javascript-integration-success" ) ;
11- params . set ( CxParamType . S , "./src" ) ;
12- params . set ( CxParamType . FILTER , "*.ts,!**/node_modules/**/*" ) ;
13- params . set ( CxParamType . BRANCH , "master" ) ;
14- const auth = new CxWrapper ( cxScanConfig ) ;
15- const cxCommandOutput : CxCommandOutput = await auth . scanCreate ( params ) ;
16- const scanObject = cxCommandOutput . payload . pop ( ) ;
17- const scanShowObject = await auth . scanShow ( scanObject . ID ) ;
18- console . log ( " Json object from successful wait mode case: " + JSON . stringify ( scanShowObject ) ) ;
19- expect ( scanShowObject . payload . pop ( ) . Status ) . toEqual ( "Completed" ) ;
20- } )
219
2210 it ( 'ScanCreate Successful case with Branch' , async ( ) => {
2311 params . set ( CxParamType . PROJECT_NAME , "ast-cli-javascript-integration-success-branch" ) ;
@@ -60,6 +48,19 @@ describe("ScanCreate cases",() => {
6048 expect ( scanShowObject . payload . pop ( ) . Status ) . toEqual ( "Running" )
6149 } )
6250
51+ it ( 'ScanCreate Successful case wait mode' , async ( ) => {
52+ params . set ( CxParamType . PROJECT_NAME , "ast-cli-javascript-integration-success" ) ;
53+ params . set ( CxParamType . S , "./src" ) ;
54+ params . set ( CxParamType . FILTER , "*.ts,!**/node_modules/**/*" ) ;
55+ params . set ( CxParamType . BRANCH , "master" ) ;
56+ const auth = new CxWrapper ( cxScanConfig ) ;
57+ const cxCommandOutput : CxCommandOutput = await auth . scanCreate ( params ) ;
58+ const scanObject = cxCommandOutput . payload . pop ( ) ;
59+ const scanShowObject = await auth . scanShow ( scanObject . ID ) ;
60+ console . log ( " Json object from successful wait mode case: " + JSON . stringify ( scanShowObject ) ) ;
61+ expect ( scanShowObject . payload . pop ( ) . Status ) . toEqual ( "Completed" ) ;
62+ } )
63+
6364 it ( 'ScanList Successful case' , async ( ) => {
6465 const auth = new CxWrapper ( cxScanConfig ) ;
6566 const cxCommandOutput : CxCommandOutput = await auth . scanList ( "" ) ;
0 commit comments