Skip to content

Commit

Permalink
Merge ba214cc into feature/cancel-schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
salesforce-org-metaci[bot] authored Mar 23, 2021
2 parents 59a3b1c + ba214cc commit 6e1bbd6
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 49 deletions.
7 changes: 7 additions & 0 deletions robot/EDA/resources/EDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ def go_to_custom_settings_setup(self):
self.selenium.go_to(url)
self.salesforce.wait_until_loading_is_complete()

def go_to_settings_health_check(self):
""" Navigates to the Home view of Settings Health Check app"""
url = self.cumulusci.org.lightning_base_url
url = "{}/lightning/n/Settings_Health_Check".format(url)
self.selenium.go_to(url)
self.salesforce.wait_until_loading_is_complete()

def click_edit_on_eda_settings_page(self):
locator = eda_lex_locators["eda_settings"]["edit"]
self.selenium.wait_until_page_contains_element(locator, error="Edit button is not available on the page")
Expand Down
10 changes: 9 additions & 1 deletion robot/EDA/resources/EDA.robot
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,12 @@ Get Records Count
${result} = SOQL Query
... SELECT COUNT(Name) FROM ${NS}${obj_name} where ${NS}${field_name}=${field_value}
&{Id} = Get From List ${result['records']} 0
[return] ${Id}[expr0]
[return] ${Id}[expr0]

Run health check settings
[Documentation] Validates the health check settings row by row
[Arguments] ${HealthCheckCard} ${Button} ${Results} &{fields}
Click health check button Run Health Check
${all_checks_status} = Return all checks status ${HealthCheckCard} All checks passed
Run Keyword If '${all_checks_status}' == 'True' Click expand button ${Button}
Verify status of a setting ${Results} &{fields}
2 changes: 1 addition & 1 deletion robot/EDA/resources/SettingsHealthCheckPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def return_all_checks_status(self,healthCheckCard,expected_value):
the expected text from robot. Returns true if all settings are passed and false if any
one of the setting is failed
"""
locator = eda_lex_locators["settings_health_check"]["all_checks_status"].format(healthCheckCard,expected_value)
locator = eda_lex_locators["settings_health_check"]["all_checks_status"].format(healthCheckCard)
self.selenium.wait_until_page_contains_element(locator, timeout=60, error=f'{locator} is not available')
self.selenium.wait_until_element_is_visible(locator,
error= "Element is not displayed for the user")
Expand Down
2 changes: 1 addition & 1 deletion robot/EDA/resources/locators_51.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
"health_check_header": "//h2[contains(@class, 'header')]/span[text()='{}']",
"last_run_date": "//button[@title='Run Health Check']/preceding::div[1]",
"expand_button": "//button[@title='Expand these results' and contains(@aria-controls, '{}')]",
"all_checks_status": "//div[text()='{}']/../descendant::div[text()='{}']",
"all_checks_status": "//div[text()='{}']/following-sibling::div/div[contains(@class, 'text')]",
"status_value": "//div[contains(@id, '{}')]/descendant::td/descendant::lightning-base-formatted-text[text()='{}']/ancestor::td/preceding-sibling::th[@data-label='Status']/descendant::lightning-base-formatted-text",
},
"term": {
Expand Down
22 changes: 22 additions & 0 deletions robot/EDA/tests/browser/health_check/account_model_check.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*** Settings ***
Documentation Validates account model health check card
Resource robot/EDA/resources/EDA.robot
Library cumulusci.robotframework.PageObjects
... robot/EDA/resources/SettingsHealthCheckPageObject.py

Suite Setup Open Test Browser
Suite Teardown Capture screenshot and delete records and close browser

*** Test Cases ***
Verify account model health check settings checks pass
[Documentation] Validates the account model health card is displayed with settings for
... Administrative, Household, Default Account Model and Unique account
... record type checks.Also verifies the status of each setting.
[tags] unstable rbt:high W-8880346
Go to settings health check
Current page should be Home Settings Health Check
Run health check settings Account Model AccountModel AccountModelResults
... Administrative Account Record Type=Passed
... Default Account Model=Passed
... Household Account Record Type=Passed
... Unique Administrative and Household Account Record Type Settings.=Passed
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
*** Settings ***
Documentation Validates affiliation mappings health check card
Resource robot/EDA/resources/EDA.robot
Library cumulusci.robotframework.PageObjects
... robot/EDA/resources/SettingsHealthCheckPageObject.py

Suite Setup Open Test Browser
Suite Teardown Capture screenshot and delete records and close browser

*** Test Cases ***
Verify affiliation mappings health check settings checks pass
[Documentation] Validates the affiliation mappings health card is displayed with
... settings for default account record types. Also verifies the status of
... each setting.
[tags] unstable rbt:high W-8925750
Go to settings health check
Current page should be Home Settings Health Check
Run health check settings Affiliation Mappings AffiliationMappings AffiliationMappingsResults
... Academic_Program Affiliation Mapping=Passed
... Business_Organization Affiliation Mapping=Passed
... Educational_Institution Affiliation Mapping=Passed
... HH_Account Affiliation Mapping=Passed
... Sports_Organization Affiliation Mapping=Passed
... University_Department Affiliation Mapping=Passed
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*** Settings ***
Documentation Validates course connections health check card
Resource robot/EDA/resources/EDA.robot
Library cumulusci.robotframework.PageObjects
... robot/EDA/resources/SettingsHealthCheckPageObject.py
... robot/EDA/resources/CourseConnectionsSettingsPageObject.py

Suite Setup Open Test Browser
Suite Teardown Capture screenshot and delete records and close browser

*** Test Cases ***
Verify course connections health check when course connections is disabled
[Documentation] Validates course connections health check card displays a warning
... message with a single setting when course connections in EDA Settings
... is disabled
[tags] unstable rbt:high W-8976999
Go to EDA settings tab Course Connections
Update enable cc to default
Go to settings health check
Current page should be Home Settings Health Check
Run health check settings Course Connections courseconnection courseconnectionsettingsResults
... Enable Course Connections=Warning
47 changes: 1 addition & 46 deletions robot/EDA/tests/browser/health_check/eda_health_check.robot
Original file line number Diff line number Diff line change
Expand Up @@ -29,49 +29,4 @@ Verify last run date is updated upon clicking run health check Button
... Go to custom settings setup AND
... Select App Launcher Tab Settings Health Check AND
... Verify last run date
... ELSE Fail

Verify account model health check settings checks pass
[Documentation] Validates the account model health card is displayed with settings for
... Administrative, Household, Default Account Model and Unique account
... record type checks.Also verifies the status of each setting.
[tags] unstable rbt:high W-8880346
Log To Console ${PREV TEST STATUS}
Run Keyword If '${PREV TEST STATUS}' == 'PASS' Run account model health check settings
... ELSE Fail

Verify affiliation mappings health check settings checks pass
[Documentation] Validates the affiliation mappings health card is displayed with
... settings for default account record types. Also verifies the status of
... each setting.
[tags] unstable rbt:high W-8925750
Log To Console ${PREV TEST STATUS}
Run Keyword If '${PREV TEST STATUS}' == 'PASS' Run affiliation mapping health check settings
... ELSE Fail


*** Keywords ***
Run account model health check settings
[Documentation] Validates the account model health check settings row by row
Click health check button Run Health Check
${all_checks_status} = Return all checks status Account Model All checks passed
Log To Console ${all_checks_status}
Run Keyword If '${all_checks_status}' == 'True' Click expand button AccountModel
Verify status of a setting AccountModelResults
... Administrative Account Record Type=Passed
... Default Account Model=Passed
... Household Account Record Type=Passed
... Unique Administrative and Household Account Record Type Settings.=Passed

Run affiliation mapping health check settings
[Documentation] Validates the affiliation mapping health check settings row by row
${all_checks_status} = Return all checks status Affiliation Mappings All checks passed
Log To Console ${all_checks_status}
Run Keyword If '${all_checks_status}' == 'True' Click expand button AffiliationMappings
Verify status of a setting AffiliationMappingsResults
... Academic_Program Affiliation Mapping=Passed
... Business_Organization Affiliation Mapping=Passed
... Educational_Institution Affiliation Mapping=Passed
... HH_Account Affiliation Mapping=Passed
... Sports_Organization Affiliation Mapping=Passed
... University_Department Affiliation Mapping=Passed
... ELSE Fail

0 comments on commit 6e1bbd6

Please sign in to comment.