Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ab868f7
Fix quadrant:q3 robot tests. Mostly locator changes
Safiyab Mar 10, 2023
604779b
Debug vframe error in jenkins
Safiyab Mar 11, 2023
c27e436
Debug jenkins runs for iframe issue
Safiyab Mar 11, 2023
ac39567
Robot: Adding new locators file, fixing warnings
lparrott Sep 4, 2025
7f7a7b1
WIP Robot fixes
lparrott Sep 4, 2025
b5bcabf
Fixing manage household tests
lparrott Sep 5, 2025
60d2997
Merge remote-tracking branch 'origin/feature/260' into feature/260__r…
lparrott Sep 10, 2025
21c1a5e
Merge 8f777e596c42e297ae58c95508d5ffcd88bde977 into feature/260__robo…
salesforce-org-metaci[bot] Sep 16, 2025
cb185fc
Merge aec97d43fcfc7c7514a85e3a9ffc5f42d0556610 into feature/260__robo…
salesforce-org-metaci[bot] Sep 17, 2025
24c38d9
Robot fixes
lparrott Oct 2, 2025
b7cd410
Fixing failing robot tests
lparrott Oct 3, 2025
9619e61
Merge 370f73b0082f5124e5838269ad252d51a9baadb7 into feature/260__robo…
salesforce-org-metaci[bot] Oct 7, 2025
a6e21db
Merge 83dad17edc1f6765247b8db524e86e11a1f399d3 into feature/260__robo…
salesforce-org-metaci[bot] Oct 8, 2025
1e319a4
Merge 2b4515ecda280d8a5020a18950ad64170d91f9e3 into feature/260__robo…
salesforce-org-metaci[bot] Oct 8, 2025
84c7d7e
Additional robot fixes
lparrott Oct 8, 2025
c8e9354
Merge branch 'feature/260__robot-fixes' of https://github.com/Salesfo…
lparrott Oct 8, 2025
547ec5a
Adding new robot test for Contact Merge
lparrott Oct 10, 2025
290e198
Update merge test name
lparrott Oct 10, 2025
d6dfbc4
Trying to fix contact merge robot failure in metaci
lparrott Oct 10, 2025
d14ba77
Trying to fix flapping robot tests
lparrott Oct 13, 2025
b119fcc
Fixing new robot failures
lparrott Oct 22, 2025
941666f
Robot: Trying to fix iframe select error
lparrott Oct 22, 2025
0d52070
More robot fixes
lparrott Oct 23, 2025
89a6298
Attempt to fix RD2 robot tests in prerelease
lparrott Oct 28, 2025
d7bd466
Fixing some previously unstable robot tests
lparrott Oct 28, 2025
873b2cb
Reverting unstable tag for Engagement Plan test
lparrott Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion orgs/prerelease.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"orgName": "NPSP - Prerelease Workspace",
"edition": "Developer",
"instance": "CS46",
"instance": "CS340",
"hasSampleData": "false",
"settings": {
"userManagementSettings": {
Expand Down
12 changes: 6 additions & 6 deletions robot/Cumulus/perftests/Insert_Tests.robot
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Insert 200 Contacts
@{objects}= run keyword if ${IncludeAddress} Get 200 Contacts With Address
... ELSE Get 200 Contacts Without Address
Salesforce Collection Insert ${objects}
[return] ${objects}
RETURN ${objects}

Insert 200 Opportunities
[Arguments] ${IncludePayment}
Expand All @@ -39,7 +39,7 @@ Insert 200 Opportunities
Set Suite Variable ${COUNTER} ${COUNTER + 1}
@{objects}= Get 200 Opportunities ${accounts} ${IncludePayment}
Salesforce Collection Insert ${objects}
[return] ${objects}
RETURN ${objects}

Insert 200 Non-NPSP Contacts
[Documentation] Generate and Insert 200 Accounts and Contacts with all NPSP triggers disabled.
Expand Down Expand Up @@ -70,7 +70,7 @@ Insert 200 Non-NPSP Contacts
END
Salesforce Collection Insert ${contacts}

[return] ${contacts}
RETURN ${contacts}

## =============================================================================================
## Data Creation Keywords:
Expand All @@ -97,7 +97,7 @@ Get 200 Opportunities
${account_id}= Set Variable ${account}[Id]
set to dictionary ${object} AccountId ${account_id}
END
[return] ${objects}
RETURN ${objects}

Get 200 Contacts With Address
[Documentation] Generate 200 Contact records with a Mailing Address
Expand All @@ -114,7 +114,7 @@ Get 200 Contacts With Address
... Phone={{fake.phone_number}}
... Title=${random}
... Email=${timestamp}+{{number}}@${random}-{{number}}.com
[return] ${objects}
RETURN ${objects}

Get 200 Contacts Without Address
[Documentation] Generate 200 Contact records without a Mailing Address
Expand All @@ -127,7 +127,7 @@ Get 200 Contacts Without Address
... Phone={{fake.phone_number}}
... Title=${random}
... Email=${timestamp}+{{number}}@${random}-{{number}}.com
[return] ${objects}
RETURN ${objects}

## =============================================================================================
## Helper Keywords
Expand Down
67 changes: 63 additions & 4 deletions robot/Cumulus/resources/ContactPageObject.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import time
from cumulusci.robotframework.pageobjects import ListingPage
from cumulusci.robotframework.pageobjects import DetailPage
from cumulusci.robotframework.pageobjects import BasePage
from cumulusci.robotframework.pageobjects import pageobject
from BaseObjects import BaseNPSPPage
from NPSP import npsp_lex_locators
Expand All @@ -14,6 +16,62 @@ def click_delete_account_button(self):
self.selenium.wait_until_location_contains("/delete", message="Account delete page did not load in 30 seconds")
self.npsp.select_frame_and_click_element("vfFrameId","button","Delete Account")

@pageobject("Custom", "ContactMerge")
class ContactMergePage(BaseNPSPPage, BasePage):
object_name = "Contact_Merge"

def navigate_to_contact_merge_page(self, filter_name=None):
"""To go to Contact Merge page"""
url_template = "{root}/lightning/n/{object}"
url = url_template.format(root=self.cumulusci.org.lightning_base_url, object=self.object_name)
self.selenium.go_to(url)
self.selenium.wait_until_location_contains(
self.object_name,
timeout=60,
message="Contact Merge page did not load in 1 min",
)
self.selenium.reload_page()
self.salesforce.wait_until_loading_is_complete()
self.selenium.unselect_frame()
self.selenium.wait_until_page_contains_element("//iframe", timeout=120)
self.selenium.select_frame("//iframe")

def click_search_contacts_button(self,search_value):
"""Clicks on Search Contacts button"""
locator=npsp_lex_locators['id'].format("contactMergePage:pgHeader:srchByConBtn")
self.selenium.click_element(locator)
self.selenium.wait_until_page_contains("Enter search text to find duplicate Contacts")
search_locator=npsp_lex_locators['placeholder'].format("Search Contacts")
self.salesforce._populate_field(search_locator, search_value)
self.npsp.click_button_with_value("Search")

def select_contact_checkbox(self,contact_number):
"""Clicks on Contact Row Selection Checkbox"""
locator=npsp_lex_locators['contact_merge']['select_contact_checkbox'].format(contact_number)
self.selenium.click_element(locator)
time.sleep(1)

def click_next_button(self):
"""Clicks on Next button"""
locator=npsp_lex_locators['button'].format("Next")
self.selenium.click_element(locator)
self.selenium.wait_until_page_contains("Selected Contacts")

def click_radio_button(self,field_value):
"""Clicks on Radio Button With Provided Field Value"""
locator=npsp_lex_locators['contact_merge']['merge_page_radio'].format(field_value)
self.selenium.click_element(locator)

def click_merge_button(self):
"""Clicks on Merge button"""
locator=npsp_lex_locators['button-text'].format("Merge")
self.selenium.click_element(locator)
time.sleep(1)
locator=npsp_lex_locators['contact_merge']['merge_modal_button']
self.selenium.click_element(locator)
time.sleep(5)
#self.selenium.wait_until_page_contains("Contact Details")

@pageobject("Details", "Contact")
class ContactDetailPage(BaseNPSPPage, DetailPage):
object_name = "Contact"
Expand All @@ -23,7 +81,7 @@ def _is_current_page(self):
by verifying that the url contains '/view'
"""
self.selenium.wait_until_location_contains("/view", timeout=60, message="Detail page did not load in 1 min")
self.selenium.location_should_contain("/lightning/r/Contact/",message="Current page is not a Contact record detail view")
self.selenium.location_should_contain("/lightning/r/Contact/", message="Current page is not a Contact record detail view")
self.selenium.wait_until_page_contains("Contact Details")

def update_field_value(self,field_name,old_value,new_value):
Expand All @@ -47,7 +105,7 @@ def perform_action_on_related_item(self,action):
""" Identifies the value and performs the specified action requested
Currently added logic for Delete. In the future can be extended for Edit
"""
drop_down = npsp_lex_locators['opportunities_dropdown'].format(1)
drop_down = npsp_lex_locators['locate_dropdown'].format(1)
self.selenium.set_focus_to_element(drop_down)
self.selenium.wait_until_element_is_visible(drop_down)
self.selenium.click_element(drop_down)
Expand Down Expand Up @@ -81,6 +139,7 @@ def validate_relation_status_message(self, contact1, contact2, relation):
def verify_rollup_field_value(self,field_name,value,section=None):
"""Verifies if the given rollup field contains given value
if it doesn't, then recalculates rollup and performs refresh"""
self.selenium.unselect_frame()
try :
self.npsp.navigate_to_and_validate_field_value(field_name,"contains",value,section)
self.builtin.log("Found rollup value on the page on initial try")
Expand All @@ -105,5 +164,5 @@ def open_relationships_viewer(self):
self.selenium.wait_until_element_is_visible(locator)
self.selenium.click_element(locator)
self.selenium.wait_until_page_contains("Relationships Viewer")
link_locator=npsp_lex_locators['custom_objects']['actions-link'].format("Relationships_Viewer","Relationships_Viewer")
self.selenium.click_link(link_locator)
link_locator=npsp_lex_locators['custom_objects']['option'].format("Relationships Viewer")
self.selenium.click_element(link_locator)
16 changes: 14 additions & 2 deletions robot/Cumulus/resources/CustomizableRollupsPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,20 @@ def navigate_to_crlpsettings(self, filter_name=None):
timeout=60,
message="custom rollup settings page did not load in 1 min",
)
self.npsp.wait_for_locator("frame_new", "vfFrameId", "vfFrameId")
self.npsp.choose_frame("vfFrameId")
self.selenium.reload_page()
self.salesforce.wait_until_loading_is_complete()
self.builtin.sleep(60)
self.builtin.log(self.selenium.get_source())
self.selenium.wait_until_page_contains("Account: Average Gift", timeout=60)
# self.selenium.wait_until_page_contains_element("//div[@class='oneAlohaPage']", timeout=120)
self.builtin.log(self.selenium.get_source())
self.selenium.unselect_frame()
self.selenium.wait_until_page_contains_element("//iframe", timeout=120)
self.selenium.select_frame("//iframe")

# self.npsp.wait_for_locator("frame_new", "vfFrameId", "vfFrameId")
# self.npsp.choose_frame("vfFrameId")

link = npsp_lex_locators["link-text"].format("Back to NPSP Settings")
self.selenium.wait_until_page_contains_element(
link, error="Current page is not a customizable rollups setting view"
Expand Down
1 change: 1 addition & 0 deletions robot/Cumulus/resources/DataImportPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def click(self,btn_name):

def begin_data_import_process_and_verify_status(self,batch,status):
"""On the DI page, clicks the Begin Data Import Process button and waits for specified status to display """
self.selenium.unselect_frame()
self.npsp.wait_for_locator("frame","accessibility title")
self.npsp.select_frame_and_click_element("accessibility title","button","Begin Data Import Process")
self.npsp.wait_for_batch_to_process(batch,status)
Expand Down
4 changes: 3 additions & 1 deletion robot/Cumulus/resources/GiftEntryPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def click_gift_entry_button(self,title):
locator=npsp_lex_locators["gift_entry"]["button"].format(title)
self.selenium.wait_until_page_contains_element(locator)
self.salesforce.scroll_element_into_view(locator)
self.selenium.click_element(locator)
# self.selenium.click_element(locator)
element = self.selenium.driver.find_element_by_xpath(locator)
self.selenium.driver.execute_script('arguments[0].click()', element)


def select_template_action(self,name,action):
Expand Down
6 changes: 4 additions & 2 deletions robot/Cumulus/resources/LevelsPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def _is_current_page(self):
self.selenium.wait_until_location_contains("/list",timeout=60, message="Records list view did not load in 1 min")
self.selenium.location_should_contain("Level__c",message="Current page is not Level List view")

@capture_screenshot_on_error
def navigate_to_level_page(self,mode):
"""
Navigate to create level or edit level mode from the list page based on the mode specified
Expand All @@ -39,12 +40,13 @@ def navigate_to_level_page(self,mode):
self.npsp.click_special_object_button("New")

if mode.lower() == "edit":
drop_down = npsp_lex_locators['opportunities_dropdown'].format(1)
drop_down = npsp_lex_locators['locate_dropdown'].format(1)
self.selenium.set_focus_to_element(drop_down)
self.selenium.wait_until_element_is_visible(drop_down)
self.selenium.click_element(drop_down)
self.selenium.wait_until_page_contains("Edit")
self.selenium.click_link("Edit")
edit_button = npsp_lex_locators['levels']['action_button'].format("Edit")
self.selenium.click_element(edit_button)

self.npsp.wait_for_locator('frame','accessibility title')
self.npsp.choose_frame('accessibility title')
Expand Down
21 changes: 13 additions & 8 deletions robot/Cumulus/resources/ManageHouseHoldPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def change_address_using(self, option, **kwargs):
Supported option is (Enter A new Address)
"""
if option.lower() == "enter a new address":
locator=npsp_lex_locators['button-title'].format("Enter a new address")
self.selenium.click_button(locator)
locator=npsp_lex_locators['button-text-span'].format("Enter a new address")
self.selenium.click_element(locator)
self.npsp.populate_modal_form(**kwargs)
self.selenium.click_button("Set Address")
self.selenium.click_button("Save")
Expand All @@ -55,13 +55,18 @@ def add_contact(self, option, value):
lookup_ele=npsp_lex_locators['household_lookup_dropdown_menu']
self.selenium.wait_until_element_is_visible(lookup_ele)

if option.lower() in ("new", "existing"):
new_contact_locator=npsp_lex_locators['manage_hh_page']['add_contact_option'].format("New Contact")
new_contact_btn=npsp_lex_locators['button-title'].format("New Contact")
self.selenium.wait_until_element_is_visible(new_contact_locator)
new_contact_locator=npsp_lex_locators['manage_hh_page']['add_contact_option'].format("New Contact")
new_contact_btn=npsp_lex_locators['button-text'].format("New Contact")
self.selenium.wait_until_element_is_visible(new_contact_locator)

if option.lower() in ("new"):
self.selenium.click_element(new_contact_locator)
self.selenium.wait_until_element_is_visible(new_contact_btn)
self.selenium.click_button(new_contact_btn)
elif option.lower() in ("existing"):
button_title = "Add {}".format(value)
add_contact_locator=npsp_lex_locators['button-title'].format(button_title)
self.selenium.click_element(add_contact_locator)
else:
print("Invalid option")

Expand All @@ -74,13 +79,13 @@ def validate_and_select_checkbox(self,contact,option):
Select the option for name display settings for each of the contact in the household
provided options (Household Name/ Formal Greeting/Informal Greeting)
"""
self.npsp.choose_frame("accessibility title")
self.npsp.choose_frame("Manage Household")
loc=self.npsp.validate_checkboxes(contact,option)
self.selenium.double_click_element(loc)
self.selenium.unselect_frame()

def save_changes_made_for_manage_household(self):
self.npsp.choose_frame("accessibility title")
self.npsp.choose_frame("Manage Household")
self.selenium.click_button("Save")
self.selenium.unselect_frame()

Expand Down
Loading
Loading