@@ -959,19 +959,7 @@ describe("Tasks", function () {
959
959
expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Please contact admin." ) ;
960
960
} ) ;
961
961
962
- it ( "Should give 400 if percentCompleted is not 100 and new status is COMPLETED " , async function ( ) {
963
- taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
964
- const res = await chai
965
- . request ( app )
966
- . patch ( `/tasks/self/${ taskId } ` )
967
- . set ( "cookie" , `${ cookieName } =${ jwt } ` )
968
- . send ( { ...taskStatusData , status : "COMPLETED" } ) ;
969
-
970
- expect ( res ) . to . have . status ( 400 ) ;
971
- expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not completed yet" ) ;
972
- } ) ;
973
-
974
- it ( "Should give 400 if percentCompleted is not 100 and new status is DONE under feature flag " , async function ( ) {
962
+ it ( "Should give 400 if percentCompleted is not 100 and new status is DONE" , async function ( ) {
975
963
taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
976
964
const res = await chai
977
965
. request ( app )
@@ -983,19 +971,7 @@ describe("Tasks", function () {
983
971
expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not done yet" ) ;
984
972
} ) ;
985
973
986
- it ( "Should give 400 if percentCompleted is not 100 and new status is VERIFIED " , async function ( ) {
987
- taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
988
- const res = await chai
989
- . request ( app )
990
- . patch ( `/tasks/self/${ taskId } ` )
991
- . set ( "cookie" , `${ cookieName } =${ jwt } ` )
992
- . send ( { ...taskStatusData , status : "VERIFIED" } ) ;
993
-
994
- expect ( res ) . to . have . status ( 400 ) ;
995
- expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not completed yet" ) ;
996
- } ) ;
997
-
998
- it ( "Should give 400 if percentCompleted is not 100 and new status is VERIFIED under feature flag" , async function ( ) {
974
+ it ( "Should give 400 if percentCompleted is not 100 and new status is VERIFIED" , async function ( ) {
999
975
taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
1000
976
const res = await chai
1001
977
. request ( app )
@@ -1007,32 +983,7 @@ describe("Tasks", function () {
1007
983
expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not done yet" ) ;
1008
984
} ) ;
1009
985
1010
- it ( "Should give 400 if status is COMPLETED and newpercent is less than 100" , async function ( ) {
1011
- const taskData = {
1012
- title : "Test task" ,
1013
- type : "feature" ,
1014
- endsOn : 1234 ,
1015
- startedOn : 4567 ,
1016
- status : "completed" ,
1017
- percentCompleted : 100 ,
1018
- participants : [ ] ,
1019
- assignee : appOwner . username ,
1020
- completionAward : { [ DINERO ] : 3 , [ NEELAM ] : 300 } ,
1021
- lossRate : { [ DINERO ] : 1 } ,
1022
- isNoteworthy : true ,
1023
- } ;
1024
- taskId = ( await tasks . updateTask ( taskData ) ) . taskId ;
1025
- const res = await chai
1026
- . request ( app )
1027
- . patch ( `/tasks/self/${ taskId } ` )
1028
- . set ( "cookie" , `${ cookieName } =${ jwt } ` )
1029
- . send ( { percentCompleted : 80 } ) ;
1030
-
1031
- expect ( res ) . to . have . status ( 400 ) ;
1032
- expect ( res . body . message ) . to . be . equal ( "Task percentCompleted can't updated as status is COMPLETED" ) ;
1033
- } ) ;
1034
-
1035
- it ( "Should give 400 if status is DONE and newpercent is less than 100 under feature flag" , async function ( ) {
986
+ it ( "Should give 400 if status is DONE and newpercent is less than 100" , async function ( ) {
1036
987
taskId = ( await tasks . updateTask ( updateTaskStatus [ 0 ] ) ) . taskId ;
1037
988
const res = await chai
1038
989
. request ( app )
0 commit comments