Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Authflow to Master #478

Merged
merged 11 commits into from
Jan 29, 2020
4 changes: 2 additions & 2 deletions src/classes/VOL_CTRL_PersonalSiteContactLookup.cls
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ global with sharing class VOL_CTRL_PersonalSiteContactLookup {

list<Contact> listCon = VOL_SharedCode.LookupContact(contact, null);
if (listCon == null || listCon.size() == 0) {
strResult = System.Label.labelContactLookupNotFound;
strResult = System.Label.labelContactLookupAmbiguous;
} else {
SendEmailToContact(listCon[0]);
}
Expand Down Expand Up @@ -127,7 +127,7 @@ global with sharing class VOL_CTRL_PersonalSiteContactLookup {
list<Messaging.SendEmailResult> listSER;
listSER = Messaging.sendEmail(new Messaging.Email[] { mail }, false);
if (listSER[0].isSuccess()) {
strResult = System.Label.labelContactLookupSuccess;
strResult = System.Label.labelContactLookupAmbiguous;
Task taskRecord = toTask(mail);
access.insertRecords(new List<SObject>{ taskRecord });

Expand Down
8 changes: 4 additions & 4 deletions src/classes/VOL_CTRL_PersonalSiteContactLookup_TEST.cls
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ private with sharing class VOL_CTRL_PersonalSiteContactLookup_TEST {
ctrl.contact.Lastname = null;
ctrl.contact.Email = null;
system.assertEquals(null, ctrl.LookupContact());
system.assertEquals(System.Label.labelContactLookupNotFound, ctrl.strResult);
system.assertEquals(System.Label.labelContactLookupAmbiguous, ctrl.strResult);

// test bogus contact
ctrl.contact.Firstname = 'Not There';
ctrl.contact.Lastname = 'Not There';
ctrl.contact.Email = 'NotThere@NotThere.com';
system.assertEquals(null, ctrl.LookupContact());
system.assertEquals(System.Label.labelContactLookupNotFound, ctrl.strResult);
system.assertEquals(System.Label.labelContactLookupAmbiguous, ctrl.strResult);

// create a temp contact
Contact con = new Contact();
Expand All @@ -144,7 +144,7 @@ private with sharing class VOL_CTRL_PersonalSiteContactLookup_TEST {
ctrl.contact.LastName = 'LookupTestLastName';
ctrl.contact.Email = 'LookupTestEmail@email.com';
system.assertEquals(null, ctrl.LookupContact());
system.assertEquals(System.Label.labelContactLookupSuccess, ctrl.strResult);
system.assertEquals(System.Label.labelContactLookupAmbiguous, ctrl.strResult);

// test error email handling
con.Email = null;
Expand All @@ -155,7 +155,7 @@ private with sharing class VOL_CTRL_PersonalSiteContactLookup_TEST {
}
update con;
ctrl.SendEmailToContact(con);
system.assertNotEquals(System.Label.labelContactLookupSuccess, ctrl.strResult);
system.assertNotEquals(System.Label.labelContactLookupAmbiguous, ctrl.strResult);
}

}
2 changes: 2 additions & 0 deletions src/classes/VOL_SharedCode.cls
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ global with sharing class VOL_SharedCode {
str = Label.labelFindVolunteersCriteria;
str = Label.labelFindVolunteersHelpAssign;
str = Label.labelVolunteersWizardNewCampaignTitle;
str = Label.labelContactLookupSuccess;
str = Label.labelContactLookupNotFound;
}

}
8 changes: 8 additions & 0 deletions src/labels/CustomLabels.labels
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,14 @@ day: &apos;day&apos;</value>
<shortDescription>label displayed on PersonalSiteContactInfo if the lookup and email succeed</shortDescription>
<value>Message sent. Please check your email for a message that contains a link to your Volunteer information. Thank you.</value>
</labels>
<labels>
<fullName>labelContactLookupAmbiguous</fullName>
<categories>PersonalSiteContactInfo</categories>
<language>en_US</language>
<protected>false</protected>
<shortDescription>label displayed on PersonalSiteContactInfo after lookup is complete</shortDescription>
<value>If your contact information was found, we'll send a unique volunteer link to the email we have on file.</value>
</labels>
<labels>
<fullName>labelCopySchedule</fullName>
<categories>NewAndEditVRS</categories>
Expand Down