@@ -945,18 +945,6 @@ describe("Tasks", function () {
945
945
expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not completed yet" ) ;
946
946
} ) ;
947
947
948
- it ( "Should give 400 if percentCompleted is not 100 and new status is DONE under feature flag " , async function ( ) {
949
- taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
950
- const res = await chai
951
- . request ( app )
952
- . patch ( `/tasks/self/${ taskId } ?userStatusFlag=true` )
953
- . set ( "cookie" , `${ cookieName } =${ jwt } ` )
954
- . send ( { ...taskStatusData , status : "DONE" } ) ;
955
-
956
- expect ( res ) . to . have . status ( 400 ) ;
957
- expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not done yet" ) ;
958
- } ) ;
959
-
960
948
it ( "Should give 400 if percentCompleted is not 100 and new status is VERIFIED " , async function ( ) {
961
949
taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
962
950
const res = await chai
@@ -969,18 +957,6 @@ describe("Tasks", function () {
969
957
expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not completed yet" ) ;
970
958
} ) ;
971
959
972
- it ( "Should give 400 if percentCompleted is not 100 and new status is VERIFIED under feature flag" , async function ( ) {
973
- taskId = ( await tasks . updateTask ( { ...taskData , status : "REVIEW" , assignee : appOwner . username } ) ) . taskId ;
974
- const res = await chai
975
- . request ( app )
976
- . patch ( `/tasks/self/${ taskId } ?userStatusFlag=true` )
977
- . set ( "cookie" , `${ cookieName } =${ jwt } ` )
978
- . send ( { ...taskStatusData , status : "VERIFIED" } ) ;
979
-
980
- expect ( res ) . to . have . status ( 400 ) ;
981
- expect ( res . body . message ) . to . be . equal ( "Status cannot be updated. Task is not done yet" ) ;
982
- } ) ;
983
-
984
960
it ( "Should give 400 if status is COMPLETED and newpercent is less than 100" , async function ( ) {
985
961
const taskData = {
986
962
title : "Test task" ,
@@ -1005,31 +981,6 @@ describe("Tasks", function () {
1005
981
expect ( res ) . to . have . status ( 400 ) ;
1006
982
expect ( res . body . message ) . to . be . equal ( "Task percentCompleted can't updated as status is COMPLETED" ) ;
1007
983
} ) ;
1008
-
1009
- it ( "Should give 400 if status is COMPLETED and newpercent is less than 100 under feature flag" , async function ( ) {
1010
- const taskData = {
1011
- title : "Test task" ,
1012
- type : "feature" ,
1013
- endsOn : 1234 ,
1014
- startedOn : 4567 ,
1015
- status : "DONE" ,
1016
- percentCompleted : 100 ,
1017
- participants : [ ] ,
1018
- assignee : appOwner . username ,
1019
- completionAward : { [ DINERO ] : 3 , [ NEELAM ] : 300 } ,
1020
- lossRate : { [ DINERO ] : 1 } ,
1021
- isNoteworthy : true ,
1022
- } ;
1023
- taskId = ( await tasks . updateTask ( taskData ) ) . taskId ;
1024
- const res = await chai
1025
- . request ( app )
1026
- . patch ( `/tasks/self/${ taskId } ?userStatusFlag=true` )
1027
- . set ( "cookie" , `${ cookieName } =${ jwt } ` )
1028
- . send ( { percentCompleted : 80 } ) ;
1029
-
1030
- expect ( res ) . to . have . status ( 400 ) ;
1031
- expect ( res . body . message ) . to . be . equal ( "Task percentCompleted can't updated as status is DONE" ) ;
1032
- } ) ;
1033
984
} ) ;
1034
985
1035
986
describe ( "GET /tasks/overdue" , function ( ) {
0 commit comments