You need to sign in to do that
Don't have an account?
Akshay Mhetre
Test class......not getting coverd ..help please
Hello Everyone....Here I am sharing some methods from class which are not getting covered. Need help
@AuraEnabled(cacheable = true)
public static string getProfile(Id RecordId){
Id profileId = UserInfo.getProfileId();
String profileName =[Select Id, Name from Profile where Id=:profileId].Name;
system.debug('Profile Name'+profileName);
if('RCU Agent Community' == profileName){
List<Case> caselist= [Select Id, RecordTypeId, OwnerId, Agent_Decision__c, Allocated_By__C, RCU_Sampling_Status__c
From Case Where ParentId=:RecordId and RCU_Agency_Action__c <>'Accepted'];
if(caseList != null && caseList.size()>0){
return 'show';
}else{
return 'hide';
}
}
return 'hide';
}
@AuraEnabled(cacheable = true)
public static string getProfile(Id RecordId){
Id profileId = UserInfo.getProfileId();
String profileName =[Select Id, Name from Profile where Id=:profileId].Name;
system.debug('Profile Name'+profileName);
if('RCU Agent Community' == profileName){
List<Case> caselist= [Select Id, RecordTypeId, OwnerId, Agent_Decision__c, Allocated_By__C, RCU_Sampling_Status__c
From Case Where ParentId=:RecordId and RCU_Agency_Action__c <>'Accepted'];
if(caseList != null && caseList.size()>0){
return 'show';
}else{
return 'hide';
}
}
return 'hide';
}
Try Below Test Class Please Mark It As Best Answer If It Helps
Thank You!