lovinghouston / lwcgoogleplacesbutton

Adds a Lightning Web Component to create Google Place Listings (currently hardcoded to type "church") as a Salesforce object (currently hardcoded to a custom object named Church_School_Partnership__c).
3 stars 1 forks source link

When GooglePlaces.searchPlace is run CSP and Account Records are Created #18

Closed Julian88Tex closed 4 years ago

Julian88Tex commented 4 years ago

As a developer, when I run GooglePlaces.searchPlace with various location parameters (different long & lat, radius, etc.) then CSP records and Account records are created for results.

Example Run Script:

ACs

Given I'm in Debug Logs When I run GooglePlaces.searchPlace in Anonymous Apex And Longitude Parameter = -33.8670522 And Latitude Parameter = 151.1957362, And Radius Parameter = 1500 And Type Parameter = church And Key Parameter is valid Then 5 Account Records are created And Name of Account is Filled in with result "name" And Account BillingStreet is filled in with the street And Account BillingCity is filled in with the city And Account BillingState is filled in with the state And Account BillingZip is filled in with the zip And Account Type is Church And Account RecordType is Church And 5 CSP Records are created And CSP Status is filled in with "Potential" And CSP Church lookup is filled in with the Account ID

Given I'm in Debug Logs When I run GooglePlaces.searchPlace in Anonymous Apex And Longitude Parameter = -33.8670522 And Latitude Parameter = 151.1957362, And Radius Parameter = 1500 And Type Parameter = school And Key Parameter is valid Then 0 Account Records are created And 0 CSP Records are created And Debug Logs shows an error "Type needs to be church."

Given I'm in Debug Logs When I run GooglePlaces.searchPlace in Anonymous Apex And Longitude Parameter = -33.8670522 And Latitude Parameter = 151.1957362, And Radius Parameter = 1500 And Type Parameter = church And Key Parameter is invalid Then 0 Account Records are created And 0 CSP Records are created And Debug Logs shows error about invalid token [excisting functionality]

Julian88Tex commented 4 years ago

@sungysang mind creating a PR and linking it to this issue even if you're not done okay to have it open but not ready yet

Also, just a reminder that we'll also need test coverage for and code written. I didn't have any in mine.

sungysang commented 4 years ago

https://github.com/Loving-Houston/lovinghouston/pull/24 Thanks for test coverage reminder, gotta add those next

sungysang commented 4 years ago

@sungysang will provide modified script for @Rodney-Zhu to test

sungysang commented 4 years ago

@Julian88Tex mind refreshing the Sandbox? I need the Potential picklist value to be added to CSP Status field Insert failed. First exception on row 0; first error: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST, Status: bad value for restricted picklist field: Potential: [Status__c]

Julian88Tex commented 4 years ago

@sungysang sure started a refresh of partial; also refreshing their dev pro sandbox which you can use for dev moving forward... partial will mainly be used for rodney to QA

once you finsih anything in your dev, you can just copy and paste it to partial sandbox and let @Rodney-Zhu know to begin QA on it

Julian88Tex commented 4 years ago

should wait to do though AFTER it has been PRed and merged to master

Julian88Tex commented 4 years ago

@Rodney-Zhu @sungysang FYI since I refreshed the Sandboxes, once it's done refreshing I'll have to recreate users for both of you. Expect to get new setup emails and you'll need to add passwords again.

rodney-zhu commented 4 years ago

note to self:

GooglePlaces.searchPlace('0011N00001qzT41QAE',32.750010,-117.101700,1500,'church','key');

Julian88Tex commented 4 years ago

@sungysang @Rodney-Zhu I've completed testing on this ticket and validated that ACs have been met. I will do another small round of testing after updates and/or responses are made to PR based on recommendations.

Julian88Tex commented 4 years ago

@Rodney-Zhu FYI this is your username: rodney@lovinghouston.net.partial

rodney-zhu commented 4 years ago

testing #18

Julian88Tex commented 4 years ago

@Rodney-Zhu sorry for the confusion, I noticed the "Chruch Status" field was still in AC but it appears LH deleted this field from their production so I've updated the AC

rodney-zhu commented 4 years ago

I have completed testing and validated that ACs have been met.

Julian88Tex commented 4 years ago

@Rodney-Zhu Great, next go through any tests that you can think of changing different variables, maxing out values, null values, looking for duplicates, etc. Just think of different ways you think someone might break this and then look at the data and see if anything is missing or messed up in a way that would bother someone.

rodney-zhu commented 4 years ago

@sungysang @Julian88Tex I'm satisfied with the extra testing. Sung, I tagged you on two items on the test document

Julian88Tex commented 4 years ago

@Rodney-Zhu Great job! I didn't see anything that gave me enough concern to block this Issue from being closed. Normally this would be done by QA but since we don't have the full release structure setup, I'll take care of closing Issues.