@@ -432,6 +432,16 @@ describe('Challenge Service', function() {
432
432
userDetails : {
433
433
hasUserSubmittedForReview : true ,
434
434
roles : [ 'Submitter' ] ,
435
+ winningPlacements : [
436
+ {
437
+ "submissionId" : 12345 ,
438
+ "submitterId" : 123456 ,
439
+ "amount" : 500.0 ,
440
+ "placed" : 1 ,
441
+ "finalScore" : 98.0 ,
442
+ "challengeId" : 30041345
443
+ }
444
+ ] ,
435
445
submissions : [
436
446
{
437
447
challengeId : 30041345 ,
@@ -479,6 +489,16 @@ describe('Challenge Service', function() {
479
489
userDetails : {
480
490
hasUserSubmittedForReview : true ,
481
491
roles : [ 'Submitter' ] ,
492
+ winningPlacements : [
493
+ {
494
+ "submissionId" : 12345 ,
495
+ "submitterId" : 123456 ,
496
+ "amount" : 500.0 ,
497
+ "placed" : 1 ,
498
+ "finalScore" : 98.0 ,
499
+ "challengeId" : 30041345
500
+ }
501
+ ] ,
482
502
submissions : [
483
503
{
484
504
challengeId : 30041345 ,
@@ -504,8 +524,7 @@ describe('Challenge Service', function() {
504
524
status : 'Completed Without Win' ,
505
525
type : 'Checkpoint Submission'
506
526
}
507
- ] ,
508
- winningPlacements : [ 2 , 11 , 1 ]
527
+ ]
509
528
}
510
529
511
530
}
@@ -528,11 +547,12 @@ describe('Challenge Service', function() {
528
547
userDetails : {
529
548
hasUserSubmittedForReview : true ,
530
549
roles : [ 'Submitter' ] ,
550
+ winningPlacements : null ,
531
551
submissions : [
532
552
{
533
553
challengeId : 30041345 ,
534
554
id : 12345 ,
535
- placement : 1 ,
555
+ placement : 5 ,
536
556
score : 98.0 ,
537
557
status : 'Active' ,
538
558
type : 'Contest Submission'
@@ -553,8 +573,7 @@ describe('Challenge Service', function() {
553
573
status : 'Completed Without Win' ,
554
574
type : 'Checkpoint Submission'
555
575
}
556
- ] ,
557
- winningPlacements : [ 0 ]
576
+ ]
558
577
}
559
578
560
579
}
@@ -563,7 +582,7 @@ describe('Challenge Service', function() {
563
582
var challenge = challenges [ 0 ]
564
583
expect ( challenge . highestPlacement ) . not . to . exist
565
584
expect ( challenge . wonFirst ) . to . exist . to . false
566
- expect ( challenge . userStatus ) . to . exist . to . equal ( 'PASSED_SCREENING ' )
585
+ expect ( challenge . userStatus ) . to . exist . to . equal ( 'PASSED_REVIEW ' )
567
586
expect ( challenge . userHasSubmitterRole ) . to . exist . to . true
568
587
} )
569
588
@@ -577,6 +596,16 @@ describe('Challenge Service', function() {
577
596
userDetails : {
578
597
hasUserSubmittedForReview : true ,
579
598
roles : [ 'Submitter' ] ,
599
+ winningPlacements : [
600
+ {
601
+ "submissionId" : 12345 ,
602
+ "submitterId" : 123456 ,
603
+ "amount" : 500.0 ,
604
+ "placed" : 1 ,
605
+ "finalScore" : 98.0 ,
606
+ "challengeId" : 30041345
607
+ }
608
+ ] ,
580
609
submissions : [
581
610
{
582
611
challengeId : 30041345 ,
@@ -624,15 +653,8 @@ describe('Challenge Service', function() {
624
653
userDetails : {
625
654
hasUserSubmittedForReview : true ,
626
655
roles : [ 'Submitter' ] ,
656
+ winningPlacements : null ,
627
657
submissions : [
628
- {
629
- challengeId : 30041345 ,
630
- id : 12345 ,
631
- placement : null ,
632
- score : 34.0 ,
633
- status : 'Active' ,
634
- type : 'Contest Submission'
635
- } ,
636
658
{
637
659
challengeId : 30041345 ,
638
660
id : 12346 ,
@@ -671,6 +693,7 @@ describe('Challenge Service', function() {
671
693
userDetails : {
672
694
hasUserSubmittedForReview : true ,
673
695
roles : [ 'Submitter' ] ,
696
+ winningPlacements : null ,
674
697
submissions : [
675
698
{
676
699
challengeId : 30041345 ,
@@ -702,7 +725,7 @@ describe('Challenge Service', function() {
702
725
]
703
726
ChallengeService . processPastChallenges ( challenges )
704
727
var challenge = challenges [ 0 ]
705
- expect ( challenge . highestPlacement ) . to . exist . to . equal ( 5 )
728
+ expect ( challenge . highestPlacement ) . not . to . exist . to
706
729
expect ( challenge . wonFirst ) . to . exist . to . false
707
730
expect ( challenge . userStatus ) . to . exist . to . equal ( 'PASSED_REVIEW' )
708
731
expect ( challenge . userHasSubmitterRole ) . to . exist . to . true
@@ -718,6 +741,7 @@ describe('Challenge Service', function() {
718
741
userDetails : {
719
742
hasUserSubmittedForReview : false ,
720
743
roles : [ 'Submitter' ] ,
744
+ winningPlacements : null ,
721
745
submissions : [ ]
722
746
}
723
747
}
@@ -740,6 +764,7 @@ describe('Challenge Service', function() {
740
764
userDetails : {
741
765
hasUserSubmittedForReview : false ,
742
766
roles : [ 'Submitter' ] ,
767
+ winningPlacements : null ,
743
768
submissions : null
744
769
}
745
770
}
@@ -762,6 +787,7 @@ describe('Challenge Service', function() {
762
787
userDetails : {
763
788
hasUserSubmittedForReview : false ,
764
789
roles : [ 'Observer' ] ,
790
+ winningPlacements : null ,
765
791
submissions : [ ]
766
792
}
767
793
}
@@ -785,7 +811,7 @@ describe('Challenge Service', function() {
785
811
hasUserSubmittedForReview : false ,
786
812
roles : [ ] ,
787
813
submissions : [ ] ,
788
- winningPlacements : [ 0 ]
814
+ winningPlacements : null
789
815
}
790
816
}
791
817
]
0 commit comments