<commit_before>*** Settings ***

Resource        tests/NPSP.robot
Suite Setup     Open Test Browser
Suite Teardown  Delete Records and Close Browser

*** Test Cases ***

Merge Contacts
    # Manually creating contact records, sosl doesn't always return api generated contacts
    Go To Object Home  Contact
    Click Object Button  New
    Populate Form
    ...                       First Name=Robot
    ...                       Last Name=One
    Click Modal Button        Save
    ${losing_id} =  Get Current Record Id
    Store Session Record  Contact  ${losing_id}
    Go To Object Home  Contact
    Click Object Button  New
    Populate Form
    ...                       First Name=Robot
    ...                       Last Name=Two
    Click Modal Button        Save
    ${winning_id} =  Get Current Record Id
    Store Session Record  Contact  ${winning_id}
    Go To Object Home  Contact
    Page Should Contain  Robot One
    Page Should Contain  Robot Two
    Select App Launcher Tab  Contact Merge
    Select Frame with Name  vfFrameId
    Wait Until Page Contains Element  //input[@placeholder='Search Contacts']
    Populate Address  Search Contacts  Robot
    Click Button  Search
    Click Element  //tr[./td/a[contains(@href,'${losing_id}')]]/td//span[@id='fauxCBSelect']
    Click Element  //tr[./td/a[contains(@href,'${winning_id}')]]/td//span[@id='fauxCBSelect']
    Click Button  Next
    Click Button  (//button[text()='Merge'])[1]
    Click Element  //input[@value='Merge']
    Unselect Frame
    # Validate Results
    Reload Page
    Location Should Contain  ${winning_id}
    Go To Object Home  Contact
    Page Should Not Contain  Robot One
    Page Should Contain  Robot Two<commit_msg>Update robot keyword<commit_after>*** Settings ***

Resource        tests/NPSP.robot
Suite Setup     Open Test Browser
Suite Teardown  Delete Records and Close Browser

*** Test Cases ***

Merge Contacts
    # Manually creating contact records, sosl doesn't always return api generated contacts
    Go To Object Home  Contact
    Click Object Button  New
    Populate Form
    ...                       First Name=Robot
    ...                       Last Name=One
    Click Modal Button        Save
    ${losing_id} =  Get Current Record Id
    Store Session Record  Contact  ${losing_id}
    Go To Object Home  Contact
    Click Object Button  New
    Populate Form
    ...                       First Name=Robot
    ...                       Last Name=Two
    Click Modal Button        Save
    ${winning_id} =  Get Current Record Id
    Store Session Record  Contact  ${winning_id}
    Go To Object Home  Contact
    Page Should Contain  Robot One
    Page Should Contain  Robot Two
    Select App Launcher Tab  Contact Merge
    Select Frame with Name  vfFrameId
    Wait Until Page Contains Element  //input[@placeholder='Search Contacts']
    Populate Field By Placeholder  Search Contacts  Robot
    Click Button  Search
    Click Element  //tr[./td/a[contains(@href,'${losing_id}')]]/td//span[@id='fauxCBSelect']
    Click Element  //tr[./td/a[contains(@href,'${winning_id}')]]/td//span[@id='fauxCBSelect']
    Click Button  Next
    Click Button  (//button[text()='Merge'])[1]
    Click Element  //input[@value='Merge']
    Unselect Frame
    # Validate Results
    Reload Page
    Location Should Contain  ${winning_id}
    Go To Object Home  Contact
    Page Should Not Contain  Robot One
    Page Should Contain  Robot Two
{'fraction_non_alphanumeric': 0.07946635730858469, 'fraction_numerical': 0.000580046403712297, 'mean_word_length': 2.3648780487804877, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3309791', 'n_tokens_mistral': 952, 'n_tokens_neox': 935, 'n_words': 345}