@@ -2217,6 +2217,96 @@ describe('getActionUrls', () => {
2217
2217
expect ( result ) . toEqual ( expected )
2218
2218
} )
2219
2219
2220
+ test ( 'some non web actions, with ui, deploy-service prod environment apihost, no custom hostname' , ( ) => {
2221
+ const expected = {
2222
+ 'sample-app-1.0.0/action' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action' ,
2223
+ 'sample-app-1.0.0/action-sequence' : 'https://fake_ns.adobeioruntime.net/api/v1/sample-app-1.0.0/action-sequence' ,
2224
+ 'sample-app-1.0.0/action-zip' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action-zip' ,
2225
+ 'pkg2/thataction' : 'https://fake_ns.adobeioruntime.net/api/v1/pkg2/thataction' ,
2226
+ 'pkg2/thatsequence' : 'https://fake_ns.adobeio-static.net/api/v1/web/pkg2/thatsequence'
2227
+ }
2228
+ config . ow . apihost = 'deploy-service.app-builder.adp.adobe.io/runtime'
2229
+ config . manifest . full . packages . __APP_PACKAGE__ . sequences [ 'action-sequence' ] . web = 'no'
2230
+ config . manifest . full . packages . pkg2 . actions . thataction . web = 'no'
2231
+ const result = utils . getActionUrls ( config , false , false )
2232
+ expect ( result ) . toEqual ( expected )
2233
+ } )
2234
+
2235
+ test ( 'some non web actions, with ui, deploy-service-region prod environment apihost, no custom hostname' , ( ) => {
2236
+ const expected = {
2237
+ 'sample-app-1.0.0/action' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action' ,
2238
+ 'sample-app-1.0.0/action-sequence' : 'https://fake_ns.adobeioruntime.net/api/v1/sample-app-1.0.0/action-sequence' ,
2239
+ 'sample-app-1.0.0/action-zip' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action-zip' ,
2240
+ 'pkg2/thataction' : 'https://fake_ns.adobeioruntime.net/api/v1/pkg2/thataction' ,
2241
+ 'pkg2/thatsequence' : 'https://fake_ns.adobeio-static.net/api/v1/web/pkg2/thatsequence'
2242
+ }
2243
+ config . ow . apihost = 'deploy-service-va6.app-builder.adp.adobe.io/runtime'
2244
+ config . manifest . full . packages . __APP_PACKAGE__ . sequences [ 'action-sequence' ] . web = 'no'
2245
+ config . manifest . full . packages . pkg2 . actions . thataction . web = 'no'
2246
+ const result = utils . getActionUrls ( config , false , false )
2247
+ expect ( result ) . toEqual ( expected )
2248
+ } )
2249
+
2250
+ test ( 'some non web actions, with ui, deploy-service-region prod int environment apihost, no custom hostname' , ( ) => {
2251
+ const expected = {
2252
+ 'sample-app-1.0.0/action' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action' ,
2253
+ 'sample-app-1.0.0/action-sequence' : 'https://fake_ns.adobeioruntime.net/api/v1/sample-app-1.0.0/action-sequence' ,
2254
+ 'sample-app-1.0.0/action-zip' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action-zip' ,
2255
+ 'pkg2/thataction' : 'https://fake_ns.adobeioruntime.net/api/v1/pkg2/thataction' ,
2256
+ 'pkg2/thatsequence' : 'https://fake_ns.adobeio-static.net/api/v1/web/pkg2/thatsequence'
2257
+ }
2258
+ config . ow . apihost = 'deploy-service-va6.app-builder.int.adp.adobe.io/runtime'
2259
+ config . manifest . full . packages . __APP_PACKAGE__ . sequences [ 'action-sequence' ] . web = 'no'
2260
+ config . manifest . full . packages . pkg2 . actions . thataction . web = 'no'
2261
+ const result = utils . getActionUrls ( config , false , false )
2262
+ expect ( result ) . toEqual ( expected )
2263
+ } )
2264
+
2265
+ test ( 'some non web actions, with ui, deploy-service-region stg corp environment apihost, no custom hostname' , ( ) => {
2266
+ const expected = {
2267
+ 'sample-app-1.0.0/action' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action' ,
2268
+ 'sample-app-1.0.0/action-sequence' : 'https://fake_ns.adobeioruntime.net/api/v1/sample-app-1.0.0/action-sequence' ,
2269
+ 'sample-app-1.0.0/action-zip' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action-zip' ,
2270
+ 'pkg2/thataction' : 'https://fake_ns.adobeioruntime.net/api/v1/pkg2/thataction' ,
2271
+ 'pkg2/thatsequence' : 'https://fake_ns.adobeio-static.net/api/v1/web/pkg2/thatsequence'
2272
+ }
2273
+ config . ow . apihost = 'deploy-service-va6.stg.app-builder.corp.adp.adobe.io/runtime'
2274
+ config . manifest . full . packages . __APP_PACKAGE__ . sequences [ 'action-sequence' ] . web = 'no'
2275
+ config . manifest . full . packages . pkg2 . actions . thataction . web = 'no'
2276
+ const result = utils . getActionUrls ( config , false , false )
2277
+ expect ( result ) . toEqual ( expected )
2278
+ } )
2279
+
2280
+ test ( 'some non web actions, with ui, deploy-service-region stg int environment apihost, no custom hostname' , ( ) => {
2281
+ const expected = {
2282
+ 'sample-app-1.0.0/action' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action' ,
2283
+ 'sample-app-1.0.0/action-sequence' : 'https://fake_ns.adobeioruntime.net/api/v1/sample-app-1.0.0/action-sequence' ,
2284
+ 'sample-app-1.0.0/action-zip' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action-zip' ,
2285
+ 'pkg2/thataction' : 'https://fake_ns.adobeioruntime.net/api/v1/pkg2/thataction' ,
2286
+ 'pkg2/thatsequence' : 'https://fake_ns.adobeio-static.net/api/v1/web/pkg2/thatsequence'
2287
+ }
2288
+ config . ow . apihost = 'deploy-service-va6.stg.app-builder.int.adp.adobe.io/runtime'
2289
+ config . manifest . full . packages . __APP_PACKAGE__ . sequences [ 'action-sequence' ] . web = 'no'
2290
+ config . manifest . full . packages . pkg2 . actions . thataction . web = 'no'
2291
+ const result = utils . getActionUrls ( config , false , false )
2292
+ expect ( result ) . toEqual ( expected )
2293
+ } )
2294
+
2295
+ test ( 'some non web actions, with ui, deploy-service-region dev int environment apihost, no custom hostname' , ( ) => {
2296
+ const expected = {
2297
+ 'sample-app-1.0.0/action' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action' ,
2298
+ 'sample-app-1.0.0/action-sequence' : 'https://fake_ns.adobeioruntime.net/api/v1/sample-app-1.0.0/action-sequence' ,
2299
+ 'sample-app-1.0.0/action-zip' : 'https://fake_ns.adobeio-static.net/api/v1/web/sample-app-1.0.0/action-zip' ,
2300
+ 'pkg2/thataction' : 'https://fake_ns.adobeioruntime.net/api/v1/pkg2/thataction' ,
2301
+ 'pkg2/thatsequence' : 'https://fake_ns.adobeio-static.net/api/v1/web/pkg2/thatsequence'
2302
+ }
2303
+ config . ow . apihost = 'deploy-service-va6.dev.app-builder.int.adp.adobe.io/runtime'
2304
+ config . manifest . full . packages . __APP_PACKAGE__ . sequences [ 'action-sequence' ] . web = 'no'
2305
+ config . manifest . full . packages . pkg2 . actions . thataction . web = 'no'
2306
+ const result = utils . getActionUrls ( config , false , false )
2307
+ expect ( result ) . toEqual ( expected )
2308
+ } )
2309
+
2220
2310
test ( 'some non web actions, with ui, remote dev, no custom apihost, no custom hostname' , ( ) => {
2221
2311
const expected = {
2222
2312
'sample-app-1.0.0/action' : 'https://fake_ns.adobeioruntime.net/api/v1/web/sample-app-1.0.0/action' ,
0 commit comments