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

Fix a few locators for Q3 robot tests #7171

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions robot/Cumulus/resources/CustomizableRollupsPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
class CustomRollupSettingsPage(BaseNPSPPage, BasePage):

def navigate_to_crlpsettings(self, filter_name=None):
""" Click on the Navigate CRLP Button and wait for the page to load
"""
""" Click on the Navigate CRLP Button and wait for the page to load """
locator = npsp_lex_locators["id"].format("navigateCRLPs")
self.selenium.click_element(locator)
self.selenium.wait_until_location_contains(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def click_and_wait_for_task(self, taskname):

def enter_task_id_and_subject(self, id, value):
"""Enter values into corresponding task subject fields based on last 2 digits of id"""
locator = npsp_lex_locators['engagement_plan']['input_box'].format(id)
self.selenium.wait_until_element_is_visible(locator,60)
locator = npsp_lex_locators['engagement_plan']['input_box'].format(id, "Subject")
self.selenium.wait_until_element_is_visible(locator, 60)
self.salesforce.scroll_element_into_view(locator)
self.selenium.get_webelement(locator).send_keys(value)

Expand Down
13 changes: 5 additions & 8 deletions robot/Cumulus/resources/NPSP.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,10 @@ def verify_occurence(self,title,value):
def check_record_related_item(self,title,value):
"""Verifies that the given value is displayed under the related list identified by title on a record view page"""
self.salesforce.load_related_list(title)
locator=npsp_lex_locators['record']['related']['item'].format(title,value)
locator = npsp_lex_locators['record']['related']['item'].format(title)
self.selenium.wait_until_page_contains_element(locator)
actual_value=self.selenium.get_webelement(locator).text
assert value == actual_value, "Expected value to be {} but found {}".format(
value, actual_value
)
actual_value = self.selenium.get_webelement(locator).text
assert value == actual_value, "Expected value to be {} but found {}".format(value, actual_value)


def select_related_dropdown(self,title):
Expand Down Expand Up @@ -571,7 +569,6 @@ def click_special_object_button(self, title):
self.selenium.wait_until_element_is_visible(locator,error="Button "+ title +" not found on the page")
self.selenium.get_webelement(locator).click()


def check_related_list_values(self,list_name,*args):
"""Verifies the value of custom related list"""
self.salesforce.load_related_list(list_name)
Expand Down Expand Up @@ -803,9 +800,9 @@ def get_npsp_locator(self, path, *args, **kwargs):
return main_loc

def wait_for_locator(self, path, *args, **kwargs):
"""Waits for 60 sec for the specified locator"""
"""Waits for 180 sec for the specified locator"""
main_loc = self.get_npsp_locator(path,*args, **kwargs)
self.selenium.wait_until_element_is_visible(main_loc, timeout=60)
self.selenium.wait_until_element_is_visible(main_loc, timeout=180)

def wait_for_locator_is_not_visible(self, path, *args, **kwargs):
"""Waits for 60 sec for the specified locator"""
Expand Down
9 changes: 5 additions & 4 deletions robot/Cumulus/resources/locators_55.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'drop-down':'//div[contains(@class, "slds-card")]/header[.//span[@title="{}"]]/parent::*/div/div/div/a[contains(@class, "slds-button")]',
'title':'//div/h2//a[./span[text()="{}"]]',
'viewall':'//article[contains(@class, "slds-card slds-card_boundary")][.//span[@title="{}"]]//a[.//span[@class="view-all-label"]]',
'item':"//article[contains(@class, 'slds-card_boundary')][.//img][.//span[@title='{}']]//h3//a",
'item':"//article[contains(@class, 'slds-card_boundary')][.//img][.//span[@title='{}']]//h3//a//span",
'field_value': '//a[text()="{}"]/ancestor::li//div[contains(@class, "slds-item--detail")]//*[text()="{}"]',
'link':"//article[contains(@class, 'slds-card slds-card_boundary')][.//span[@title='{}']]//table/tbody/tr[.//td//*[text()='{}']]/th//a",
'dd-link':'//a[@name="{}"]',
Expand Down Expand Up @@ -116,7 +116,7 @@
'related_list_items':'//article[contains(@class,"slds-card_boundary")][.//a[contains(@class, "slds-card")]/span[text() = "{}"]]//div[contains(@class, "listDisplays")]//*[text()="{}"]',
'span_button':'//span[text()="{}"]',
'modalspan_button':'//div[contains(@class,"modal-body")]//span[text()="{}"]',
'related_drop_down':'//div/a[contains(@class,"slds-button")]/ancestor::li/div/a',
'related_drop_down':"//li[contains(@class, 'forceRecordLayout')]//a[contains(text(), '{}')]/ancestor::h3[contains(@class, 'primaryField')]/following-sibling::div//a[@role='button']",
'span':"//span[@title='{}']",
'header_field_value':'//*[contains(@class, "slds-page-header__detail")][.//*[@title="{}"]]//*[text()="{}"]',
'header_datepicker':'//li[contains(@class, "slds-page-header__detail")][.//p[contains(@class, "slds-text-heading--label")][@title="{}"]]//*[@class="uiOutputDate"]',
Expand All @@ -126,14 +126,15 @@
'field_lookup_value': "//a[@role='option'][.//div[@title='{}']]",
'field-value':"//div[contains(@class,'slds-form-element')][./label[text()='{}']]/div/span",
'header':'//h1//child::div/span[text()="{}"]',
'check_related_list_item':'//article[.//span[text() = "{}"]]/descendant::tbody//th/*/*/*/*/*/*/*/*/a/span[text()="{}"]',
'check_related_list_item': '//article[.//span[text() = "{}"]]/descendant::tbody//th//a//span[text()="{}"]',
'detail_page': {
'section_header':'//h3//span[text()="{}"]',
'address':'//h3[contains(@class, "slds-section__title")][.//span[contains(text(),"Address")]]/../..//div[contains(@class, "test-id")]/span[text()= "{}"]/../following-sibling::div//a//div[contains(@class, "slds")]',
'field':'//h3[contains(@class, "slds-section__title")][.//span[text()="{}"]]/../..//div[contains(@class, "test-id")]/span[text()= "{}"]/../following-sibling::div//span[text()="{}"]',
'field-value':{
'verify_field_value1':'//div[contains(@class, "forcePageBlockItem")]/div/div//span[text()="{}"]/../../div[2]/span/span[text() = "{}"]',
'verify_field_value2':'//force-record-layout-item//div[./span[text()="{}"]]/following-sibling::div//lightning-formatted-text[text() = "{}"]',
'verify_field_value3':'//records-record-layout-item//div[./span[text()="{}"]]/following-sibling::div//lightning-formatted-text[text() = "{}"]'
},
'edit_mode':{
'section_header':'//div[contains(@class,"forcePageBlockSectionEdit")]/h3//span[text()="{}"]',
Expand All @@ -160,7 +161,7 @@
'field-value':'//tbody/tr[./th//a[text()="{}"]]/td[.//span[text()="{}"]]',
},
'engagement_plan':{
'input_box':'//fieldset[./legend[text()="{}"]]//div[@class="requiredInput"]/input',
'input_box':'//fieldset[./legend[text()="{}"]]//input[@aria-label="{}"]',
'dropdown':'//div[contains(@class,"slds-p-top_small")]/label[text()="{}"]/following-sibling::div/select',
'checkbox':'//div[contains(@class,"slds-p-top_small")]/label[@class="slds-checkbox"][./span/following-sibling::{}[text()="{}"]/]',
'button':'//div[contains(@class,"slds-button-group")][.//span[text()="toTask {}"]]/button[contains(text(),"{}")]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ Setup Test Data
... Name=${data}[account][Name] $50 donation Amount=50 ${ns}Primary_Contact__c=${data}[contact][Id]
Set suite variable &{opportunity}


*** Variables ***

&{contact_fields} [email protected]
&{account_fields} Type=Organization

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
Setup Test Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
Setup Test Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ Total Current Year Payments on Prior Year Pledges
[Documentation] Calculates Total Current Year Payments on Prior Year opportunity Pledges
... Enables CRLP settings, creates the custom fields on account and payment objects required for rollup
... Creates a filter and crlp setting to rollup the amount of current year payments on a previous year opportunity

[Tags] feature:CRLP unstable api quadrant:q3

# Create a Filter group and CRLP setting after checking prior records do not check if element exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
# Sets test data contact and an opportunity for the contact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
# Sets test data contact and an opportunity for the contact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
# Sets test data contact and an opportunity for the contact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resource robot/Cumulus/resources/NPSP.robot
Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/DataImportPageObject.py
Suite Setup Open Test Browser
#Suite Teardown Delete Records and Close Browser
#Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Test Cases ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/LeadsPageObject.py

Suite Setup Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Test Cases ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/NPSP.py
Suite Setup Run keywords
... Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser


*** Variables ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
# Setup a contact with parameters specified
Expand Down
2 changes: 1 addition & 1 deletion robot/Cumulus/tests/browser/gaus/create_gau.robot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resource robot/Cumulus/resources/NPSP.robot
Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/GAUPageObject.py
Suite Setup Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Test Cases ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/LevelsPageObject.py
... robot/Cumulus/resources/NPSPSettingsPageObject.py
Suite Setup Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser


*** Variables ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
Setup Test Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser


*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resource robot/Cumulus/resources/NPSP.robot
Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/NPSPSettingsPageObject.py
Suite Setup Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Test Cases ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Resource robot/Cumulus/resources/NPSP.robot
Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/CustomSettingsPageObject.py
Suite Setup Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Test Cases ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Library cumulusci.robotframework.PageObjects
... robot/Cumulus/resources/ContactPageObject.py
... robot/Cumulus/resources/RecurringDonationsPageObject.py
Suite Setup Open Test Browser
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
API Modify Trigger Handler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run Keywords
... Open Test Browser
... Setup Variables
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
Setup Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Suite Setup Run Keywords
... Open Test Browser
... Setup Variables
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
Setup Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Suite Setup Run Keywords
... Open Test Browser
... Setup Variables
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
Setup Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Suite Setup Run Keywords
... Open Test Browser
... Setup Variables
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
Setup Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Library cumulusci.robotframework.PageObjects
Suite Setup Run keywords
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
# Setup a contact with parameters specified
Expand Down Expand Up @@ -41,7 +41,12 @@ Create Open Recurring Donation With Monthly Installment
Reload Page
Select Tab Related
Current Page Should Be Details Contact
Check Related List Values Recurring Donations Robot Recurring Donation
##### KNOWN BUG!!! #####
# 3/10/23: The Recurring Donation name is being overwritten with the default format name
# Since NPSP does not have a future roadmap, the bug won't be fixed.
# The test here is reflecting the current behavior in the product
${Default_RD_Name} = Set Variable ${data}[contact][FirstName] ${data}[contact][LastName] $100 - Recurring
Check Related List Values Recurring Donations ${Default_RD_Name}
Load Related List Opportunities
Click ViewAll Related List Opportunities
Verify Payment Details 12
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Suite Setup Run keywords
... Enable RD2
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

***Keywords***
# Setup a contact with parameters specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Suite Setup Run keywords
... Open Test Browser
... Setup Test Data

Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser


***Keywords***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Suite Setup Run keywords
... Enable RD2
... Open Test Browser
... Setup Test Data
Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser


***Keywords***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Suite Setup Run keywords
... Enable RD2
... Open Test Browser
... Setup Test Data
#Suite Teardown Delete Records and Close Browser
#Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Suite Setup Run keywords
... Open Test Browser
... Setup Test Data

Suite Teardown Delete Records and Close Browser
Suite Teardown Capture Screenshot and Delete Records and Close Browser

*** Keywords ***
Setup Test Data
Expand Down
Loading