@@ -29,9 +29,9 @@ describe("Reality conversion unit tests", () => {
29
29
this . timeout ( 30000 ) ;
30
30
dotenv . config ( { path : path . resolve ( __dirname , "../../../../../.env" ) } ) ;
31
31
32
- iTwinId = "c3739cf2-9da3-487b-b03d-f58c8eb97e5b ";
33
- const clientId = "service-KhTIVb9k3NhIfvGf5DyBG6Lyu ";
34
- const secret = "DErmHlAYXae0np1KQCtVzvCFZBoQGTjliGYqvt0zpWs6k9kqsCdigoPw1Ek3/WLi3RipJ9/M9674pMxEfc8TDw== ";
32
+ iTwinId = process . env . IMJS_UNIT_TESTS_PROJECT_ID ?? " ";
33
+ const clientId = process . env . IMJS_UNIT_TESTS_CLIENT_ID ?? " ";
34
+ const secret = process . env . IMJS_UNIT_TESTS_SECRET ?? " ";
35
35
authorizationClient = new ServiceAuthorizationClient ( {
36
36
clientId : clientId ,
37
37
clientSecret : secret ,
@@ -61,8 +61,9 @@ describe("Reality conversion unit tests", () => {
61
61
"inputs" : [ { "id" : "lasId" } , { "id" : "lazId" } , { "id" : "plyId" } , { "id" : "e57Id" } ] ,
62
62
"outputs" : [ "OPC" ] ,
63
63
"options" : {
64
- "processingEngines" : 8 ,
65
- } ,
64
+ "processingEngines" : 8 ,
65
+ "merge" : false
66
+ }
66
67
} ) . reply ( 201 ,
67
68
{
68
69
"job" : {
@@ -77,7 +78,8 @@ describe("Reality conversion unit tests", () => {
77
78
"inputs" : [ { "type" : "LAS" , "id" : "lasId" } , { "type" : "LAZ" , "id" : "lazId" } , { "type" : "PLY" , "id" : "plyId" } , { "type" : "E57" , "id" : "e57Id" } ] ,
78
79
"outputs" : [ { "type" : "OPC" , "id" : "OPCId" } ] ,
79
80
"options" : {
80
- "processingEngines" : 8
81
+ "processingEngines" : 8 ,
82
+ "merge" : false
81
83
} ,
82
84
}
83
85
} ) ;
@@ -89,17 +91,16 @@ describe("Reality conversion unit tests", () => {
89
91
rcSettings . inputs . ply = [ "plyId" ] ;
90
92
rcSettings . outputs . opc = true ;
91
93
rcSettings . options . engines = 8 ;
94
+ rcSettings . options . merge = false ;
92
95
const jobName = "Reality Conversion unit test" ;
93
-
96
+
94
97
const id = realityConversionService . createJob ( rcSettings , jobName , iTwinId ) ;
95
98
await sleep ( 2000 ) ;
96
99
97
100
if ( axiosMock . history . post . length === 0 )
98
101
return expect ( axiosMock . history . post . length ) . equal ( 1 , "Mock adapter has not been called as expected." ) ;
99
102
100
103
const body = JSON . parse ( axiosMock . history . post [ 0 ] . data ) ;
101
- console . log ( body ) ;
102
- console . log ( rcSettings ) ;
103
104
return Promise . all ( [
104
105
expect ( body ) . to . have . property ( "type" , "Conversion" ) ,
105
106
expect ( body ) . to . have . property ( "name" , "Reality Conversion unit test" ) ,
@@ -114,6 +115,7 @@ describe("Reality conversion unit tests", () => {
114
115
expect ( body . outputs ) . to . deep . include ( "OPC" ) ,
115
116
expect ( body ) . to . have . property ( "options" ) ,
116
117
expect ( body . options ) . to . have . property ( "processingEngines" , 8 ) ,
118
+ expect ( body . options ) . to . have . property ( "merge" , false ) ,
117
119
expect ( id ) . to . eventually . deep . equal ( "cc3d35cc-416a-4262-9714-b359da70b419" ) ,
118
120
] ) ;
119
121
} ) ;
0 commit comments