From 4bc04226152f0a1cae4eb8e6770cf975092e830c Mon Sep 17 00:00:00 2001 From: Rakesh Jeyaraman Date: Tue, 8 Dec 2020 11:31:43 -0500 Subject: [PATCH] Updated tests to make it work in both namespaced and non namespaced orgs --- robot/EDA/resources/EDA.robot | 6 +++++- robot/EDA/tests/browser/settings/hierarchy_settings.robot | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/robot/EDA/resources/EDA.robot b/robot/EDA/resources/EDA.robot index 8c27e534f9..a5b82986d0 100644 --- a/robot/EDA/resources/EDA.robot +++ b/robot/EDA/resources/EDA.robot @@ -5,6 +5,9 @@ Library cumulusci.robotframework.PageObjects Library robot/EDA/resources/EDA.py Library DateTime +*** Variables *** +${NS} + *** Keywords *** Capture Screenshot and Delete Records and Close Browser [Documentation] Captures screenshot if a test fails, deletes session records @@ -98,8 +101,9 @@ Create Organization Foundation Get Records Count [Documentation] Returns the no of record identified by the given field_name and ... field_value input for a specific object + ${NS} = Get EDA namespace prefix [Arguments] ${obj_name} ${field_name} ${field_value} ${result} = SOQL Query - ... SELECT COUNT(Name) FROM ${obj_name} where ${field_name}=${field_value} + ... SELECT COUNT(Name) FROM ${NS}${obj_name} where ${NS}${field_name}=${field_value} &{Id} = Get From List ${result['records']} 0 [return] ${Id}[expr0] \ No newline at end of file diff --git a/robot/EDA/tests/browser/settings/hierarchy_settings.robot b/robot/EDA/tests/browser/settings/hierarchy_settings.robot index 774590e116..8838be4613 100644 --- a/robot/EDA/tests/browser/settings/hierarchy_settings.robot +++ b/robot/EDA/tests/browser/settings/hierarchy_settings.robot @@ -22,13 +22,13 @@ Validate hierarchy settings under custom settings Click action button on EDA settings page Save Load Page Object Home Setup Go to custom settings setup - Select hierarchy settings Custom Settings ~ Salesforce - Developer Edition + Select hierarchy settings Custom Settings ... Hierarchy Settings Wait until loading is complete - Go to hierarchy settings view Custom Setting Definition ~ Salesforce - Developer Edition + Go to hierarchy settings view Custom Setting Definition ... Manage Wait until loading is complete - Verify setup owner section Custom Setting Hierarchy Settings ~ Salesforce - Developer Edition + Verify setup owner section Custom Setting Hierarchy ... No records to display.