Skip to content

Commit

Permalink
Merge pull request #36 from SalesforceFoundation/feature/robot_requir…
Browse files Browse the repository at this point in the history
…ement

[Robot] Add Requirement Test and namespace fixes for running tests in 2gp org
  • Loading branch information
gaganpsandhu authored Mar 12, 2021
2 parents 868b56f + 6534a01 commit 8c2bc0f
Show file tree
Hide file tree
Showing 11 changed files with 433 additions and 89 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"outboundfundsnpsp",
"jsclick",
"rtype",
"outfundsnpsp",
// Storytelling data
"Englewood",
"Takagawa",
Expand Down
202 changes: 183 additions & 19 deletions robot/OutboundFundsNPSP/doc/Keywords.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@
<!-- this is the header for the documentation as a whole -->
<div class="header">
<h1 class="title">Outbound Funds (npsp)</h1>
<div class="filter right">
filter: <input id="filter" type="filter/" />
<div class="filter" right>
filter: <input id="filter" type="filter" />
</div>
</div>

Expand Down Expand Up @@ -218,6 +218,40 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.py">
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.py.Click Related List Link With Text"
>
<td class="kwname">Click Related List Link With Text</td>
<td class="kwargs">
<i>text</i>
</td>
<td class="kwdoc">
<p>
Click on link with passed text in a related list
table
</p>
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.py.Click Related List Wrapper Button"
>
<td class="kwname">Click Related List Wrapper Button</td>
<td class="kwargs">
<i>heading</i>,

<i>button_title</i>
</td>
<td class="kwdoc">
<p>
loads the related list and clicks on the button on
the list
</p>
</td>
</tr>

<tr class="kwrow" id="OutboundFundsNPSP.py.Click Save">
<td class="kwname">Click Save</td>
<td class="kwargs"></td>
Expand Down Expand Up @@ -252,6 +286,35 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.py">
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.py.Get Namespace Prefix"
>
<td class="kwname">Get Namespace Prefix</td>
<td class="kwargs">
<i>name</i>
</td>
<td class="kwdoc"></td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.py.Get Npsp Namespace Prefix"
>
<td class="kwname">Get Npsp Namespace Prefix</td>
<td class="kwargs"></td>
<td class="kwdoc"></td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.py.Get Outfundsnpsp Namespace Prefix"
>
<td class="kwname">Get Outfundsnpsp Namespace Prefix</td>
<td class="kwargs"></td>
<td class="kwdoc"></td>
</tr>

<tr class="kwrow" id="OutboundFundsNPSP.py.New Random String">
<td class="kwname">New Random String</td>
<td class="kwargs">
Expand Down Expand Up @@ -458,6 +521,31 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</td>
</tr>

<tr class="kwrow" id="OutboundFundsNPSP.robot.API Create GAU">
<td class="kwname">API Create GAU</td>
<td class="kwargs">
<i>**fields</i>
</td>
<td class="kwdoc"><p>Create a GAU</p></td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.robot.API Create GAU Expenditure"
>
<td class="kwname">API Create GAU Expenditure</td>
<td class="kwargs">
<i>gau_id</i>,

<i>disbursement_id</i>,

<i>**fields</i>
</td>
<td class="kwdoc">
<p>Create a GAU Expenditure on Disbursement</p>
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.robot.API Create Requirement on a Funding Request"
Expand Down Expand Up @@ -498,6 +586,90 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</p>
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.robot.Change Field Permissions"
>
<td class="kwname">Change Field Permissions</td>
<td class="kwargs">
<i>action</i>,

<i>objectapiname</i>,

<i>fieldapiname</i>,

<i>permset</i>
</td>
<td class="kwdoc">
<p>
Adds or removes the Create, Read, Edit and Delete
permissions for the specified object field on the
specified permission set.
</p>
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.robot.Change Object Permissions"
>
<td class="kwname">Change Object Permissions</td>
<td class="kwargs">
<i>action</i>,

<i>objectapiname</i>,

<i>permset</i>
</td>
<td class="kwdoc">
<p>
Adds or removes the Create, Read, Edit and Delete
permissions for the specified object on the
specified permission set..
</p>
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.robot.Field Permissions Cleanup"
>
<td class="kwname">Field Permissions Cleanup</td>
<td class="kwargs">
<i>objectapiname</i>,

<i>fieldapiname</i>,

<i>permset</i>
</td>
<td class="kwdoc">
<p>
Resets all field permissions in case a test fails
before they are restored. Skips the reset if the
permissions have already been added back.
</p>
</td>
</tr>

<tr
class="kwrow"
id="OutboundFundsNPSP.robot.Object Permissions Cleanup"
>
<td class="kwname">Object Permissions Cleanup</td>
<td class="kwargs">
<i>objectapiname</i>,

<i>permset</i>
</td>
<td class="kwdoc">
<p>
Resets all object permissions in case a test fails
before they are restored. Skips the reset if the
permissions have already been added back.
</p>
</td>
</tr>
</tbody>
</table>
</div>
Expand All @@ -518,15 +690,13 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</div>
</div>

<div class="section" pageobject="Details-outfunds__Funding_Program__c">
<div class="section" pageobject="Details-Funding_Program__c">
<div class="pageobject-header">
<table class="pageobject-header">
<tbody>
<tr class="data">
<td title="Page Type">Details</td>
<td title="Object Name">
outfunds__Funding_Program__c
</td>
<td title="Object Name">Funding_Program__c</td>
</tr>
<tr class="labels">
<td>Page Type</td>
Expand Down Expand Up @@ -569,15 +739,13 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</table>
</div>

<div class="section" pageobject="Listing-outfunds__Funding_Program__c">
<div class="section" pageobject="Listing-Funding_Program__c">
<div class="pageobject-header">
<table class="pageobject-header">
<tbody>
<tr class="data">
<td title="Page Type">Listing</td>
<td title="Object Name">
outfunds__Funding_Program__c
</td>
<td title="Object Name">Funding_Program__c</td>
</tr>
<tr class="labels">
<td>Page Type</td>
Expand Down Expand Up @@ -636,15 +804,13 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</div>
</div>

<div class="section" pageobject="Details-outfunds__Funding_Request__c">
<div class="section" pageobject="Details-Funding_Request__c">
<div class="pageobject-header">
<table class="pageobject-header">
<tbody>
<tr class="data">
<td title="Page Type">Details</td>
<td title="Object Name">
outfunds__Funding_Request__c
</td>
<td title="Object Name">Funding_Request__c</td>
</tr>
<tr class="labels">
<td>Page Type</td>
Expand Down Expand Up @@ -687,15 +853,13 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</table>
</div>

<div class="section" pageobject="Listing-outfunds__Funding_Request__c">
<div class="section" pageobject="Listing-Funding_Request__c">
<div class="pageobject-header">
<table class="pageobject-header">
<tbody>
<tr class="data">
<td title="Page Type">Listing</td>
<td title="Object Name">
outfunds__Funding_Request__c
</td>
<td title="Object Name">Funding_Request__c</td>
</tr>
<tr class="labels">
<td>Page Type</td>
Expand Down Expand Up @@ -740,7 +904,7 @@ <h2 title="robot/OutboundFundsNPSP/resources/OutboundFundsNPSP.robot">
</div>
</div>
<div class="footer">
Generated on Friday February 05, 12:52 PM - cumulusci v3.28.0
Generated on Wednesday March 10, 03:47 PM - cumulusci v3.28.0
</div>
</body>
</html>
11 changes: 3 additions & 8 deletions robot/OutboundFundsNPSP/resources/FundingProgramPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@
from cumulusci.robotframework.utils import capture_screenshot_on_error


@pageobject("Listing", "outfunds__Funding_Program__c")
@pageobject("Listing", "Funding_Program__c")
class FundingProgramListingPage(BaseOutboundFundsNPSPPage, ListingPage):
object_name = "outfunds__Funding_Program__c"

@capture_screenshot_on_error
def _is_current_page(self):
"""Verify we are on the Funding Program Listing page
by verifying that the url contains '/view'
"""
self.selenium.location_should_contain(
"/lightning/o/outfunds__Funding_Program__c/list?",
message="Current page is not a Funding Program List view",
"/list?", message="Current page is not a Funding Program List view",
)


@pageobject("Details", "outfunds__Funding_Program__c")
@pageobject("Details", "Funding_Program__c")
class FundingProgramDetailPage(BaseOutboundFundsNPSPPage, DetailPage):
object_name = "outfunds__Funding_Program__c"

@capture_screenshot_on_error
def _is_current_page(self):
"""Verify we are on the Funding Program detail page
Expand Down
11 changes: 3 additions & 8 deletions robot/OutboundFundsNPSP/resources/FundingRequestPageObject.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@
from cumulusci.robotframework.utils import capture_screenshot_on_error


@pageobject("Listing", "outfunds__Funding_Request__c")
@pageobject("Listing", "Funding_Request__c")
class FundingRequestListingPage(BaseOutboundFundsNPSPPage, ListingPage):
object_name = "outfunds__Funding_Request__c"

@capture_screenshot_on_error
def _is_current_page(self):
"""Verify we are on the Funding Request Listing page
by verifying that the url contains '/view'
"""
self.selenium.location_should_contain(
"/lightning/o/outfunds__Funding_Request__c/list?",
message="Current page is not a Funding Request List view",
"/list?", message="Current page is not a Funding Request List view",
)


@pageobject("Details", "outfunds__Funding_Request__c")
@pageobject("Details", "Funding_Request__c")
class FundingRequestDetailPage(BaseOutboundFundsNPSPPage, DetailPage):
object_name = "outfunds__Funding_Request__c"

@capture_screenshot_on_error
def _is_current_page(self):
"""Verify we are on the Funding Request detail page
Expand Down
Loading

0 comments on commit 8c2bc0f

Please sign in to comment.