@@ -303,7 +303,7 @@ describe('type: asset', () => {
303
303
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
304
304
: 0 ,
305
305
1 ,
306
- '1 assets to be deployed'
306
+ 'Unexpected number of assets deployed'
307
307
) ;
308
308
const upsertCallout = testUtils . getRestCallout ( 'post' , '/asset/v1/content/assets/' ) ;
309
309
assert . equal (
@@ -344,7 +344,7 @@ describe('type: asset', () => {
344
344
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
345
345
: 0 ,
346
346
1 ,
347
- '1 assets to be deployed'
347
+ 'Unexpected number of assets deployed'
348
348
) ;
349
349
const currentCache = cache . getCache ( ) ;
350
350
@@ -388,7 +388,7 @@ describe('type: asset', () => {
388
388
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
389
389
: 0 ,
390
390
0 ,
391
- '0 assets to be deployed'
391
+ 'Unexpected number of assets deployed'
392
392
) ;
393
393
394
394
const upsertCallout = testUtils . getRestCallout ( 'patch' , '/asset/v1/content/assets/%' ) ;
@@ -419,7 +419,7 @@ describe('type: asset', () => {
419
419
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
420
420
: 0 ,
421
421
1 ,
422
- '1 assets to be deployed'
422
+ 'Unexpected number of assets deployed'
423
423
) ;
424
424
425
425
const upsertCallout = testUtils . getRestCallout ( 'post' , '/asset/v1/content/assets/' ) ;
@@ -459,7 +459,7 @@ describe('type: asset', () => {
459
459
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
460
460
: 0 ,
461
461
1 ,
462
- '1 assets to be deployed'
462
+ 'Unexpected number of assets deployed'
463
463
) ;
464
464
const upsertCallout = testUtils . getRestCallout ( 'post' , '/asset/v1/content/assets/' ) ;
465
465
assert . equal (
@@ -492,7 +492,7 @@ describe('type: asset', () => {
492
492
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
493
493
: 0 ,
494
494
1 ,
495
- '1 assets to be deployed'
495
+ 'Unexpected number of assets deployed'
496
496
) ;
497
497
const upsertCallout = testUtils . getRestCallout ( 'post' , '/asset/v1/content/assets/' ) ;
498
498
assert . equal (
@@ -523,7 +523,7 @@ describe('type: asset', () => {
523
523
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
524
524
: 0 ,
525
525
1 ,
526
- '1 assets to be deployed'
526
+ 'Unexpected number of assets deployed'
527
527
) ;
528
528
const upsertCallout = testUtils . getRestCallout ( 'post' , '/asset/v1/content/assets/' ) ;
529
529
assert . equal (
@@ -554,7 +554,7 @@ describe('type: asset', () => {
554
554
? Object . keys ( deployResult [ 'testInstance/testBU' ] ?. asset ) . length
555
555
: 0 ,
556
556
0 ,
557
- '0 assets deployed'
557
+ 'Unexpected number of assets deployed'
558
558
) ;
559
559
560
560
assert . equal (
@@ -568,7 +568,7 @@ describe('type: asset', () => {
568
568
it ( 'Should create an asset that loads a content block via CBBK that is also created in the same package' , async ( ) => {
569
569
// WHEN
570
570
const deployResult = await handler . deploy ( 'testInstance/testBU' , {
571
- asset : [ 'testNew_asset_htmlblock ' , 'testNew_asset_withCBBK_notexisting ' ] ,
571
+ asset : [ 'testNew_asset_withCBBK_notexisting ' , 'testNew_asset_htmlblock ' ] ,
572
572
} ) ;
573
573
// THEN
574
574
assert . equal ( process . exitCode , 0 , 'deploy should not have thrown an error' ) ;
@@ -582,26 +582,21 @@ describe('type: asset', () => {
582
582
'unexpected assets deployed'
583
583
) ;
584
584
585
+ // check if we really issued callouts for those 2 blocks AND if they were run in the right order despite the key list for deploy() getting it in the wrong order
585
586
const upsertCallouts = testUtils . getRestCallout (
586
587
'post' ,
587
588
'/asset/v1/content/assets/' ,
588
589
true
589
590
) ;
590
- const upsertCallout1 = upsertCallouts . find (
591
- ( item ) => item . customerKey === 'testNew_asset_htmlblock'
592
- ) ;
593
- const upsertCallout2 = upsertCallouts . find (
594
- ( item ) => item . customerKey === 'testNew_asset_withCBBK_notexisting'
595
- ) ;
596
591
assert . equal (
597
- upsertCallout1 ?. customerKey ,
592
+ upsertCallouts [ 0 ] ?. customerKey ,
598
593
'testNew_asset_htmlblock' ,
599
- 'create callout not found '
594
+ 'first create callout not for expected asset '
600
595
) ;
601
596
assert . equal (
602
- upsertCallout2 ?. customerKey ,
597
+ upsertCallouts [ 1 ] ?. customerKey ,
603
598
'testNew_asset_withCBBK_notexisting' ,
604
- 'create callout not found '
599
+ 'second create callout not for expected asset '
605
600
) ;
606
601
607
602
assert . equal (
0 commit comments