3.2 KiB
Sharing Rules — Edit Test Cases
Structured test scenarios for edit operations. Each test case defines an input, the expected behavior, and the expected output.
TC-05: Edit access level of an existing rule
Input:
- Object:
Property__c - Target rule:
ShareActivePropertiesWithRegionalManager - Change: access level from
ReadtoEdit
Expected behavior:
- Locates the rule by
<fullName>in the existing file - Presents confirmation showing current vs. proposed change:
Operation: Edit Object:
Property__cRule:ShareActivePropertiesWithRegionalManager(Share Active Properties With Regional Manager) Changes: accessLevel: Read → EditProceed? (yes / no / edit)
- Waits for user confirmation
- After confirmation, modifies only
<accessLevel>— all other elements unchanged
Expected output (changed portion):
<accessLevel>Edit</accessLevel>
All other elements (fullName, label, sharedTo, criteriaItems, includeRecordsOwnedByAll) remain identical.
TC-06: Edit shared-to target of an existing rule
Input:
- Object:
Property__c - Target rule:
ShareActivePropertiesWithRegionalManager - Change: shared-to from role
RegionalManagerto groupPropertyViewers
Expected behavior:
- Locates the rule in the file
- Presents confirmation showing:
Changes: sharedTo: role
RegionalManager→ groupPropertyViewers - Waits for confirmation
- Replaces
<sharedTo>content only
Expected output (changed portion):
<sharedTo>
<group>PropertyViewers</group>
</sharedTo>
TC-07: Edit criteria of an existing rule
Input:
- Object:
Property__c - Target rule:
ShareActivePropertiesWithRegionalManager - Change: update criteria from
Status__c equals ActivetoStatus__c equals ActiveANDRegion__c equals West
Expected behavior:
- Locates the rule in the file
- Presents confirmation showing current criteria vs. proposed criteria
- Waits for confirmation
- Replaces
<criteriaItems>elements
Expected output (changed portion):
<criteriaItems>
<field>Status__c</field>
<operation>equals</operation>
<value>Active</value>
</criteriaItems>
<criteriaItems>
<field>Region__c</field>
<operation>equals</operation>
<value>West</value>
</criteriaItems>
TC-08: Edit attempt on non-existent rule
Input:
- Object:
Property__c - Target rule:
NonExistentRule - Change: access level to
Edit
Expected behavior:
- Searches for the rule by
<fullName>in the file - Rule not found — reports error to user
- Suggests listing available rules in the file and asks user to clarify
Expected output: No file changes. Error message listing available rule names in the file.
TC-16: Edit that would change rule type
Input:
- Object:
Property__c - Target rule:
ShareActivePropertiesWithRegionalManager(criteria rule) - Change: convert to owner-based rule
Expected behavior:
- Detects that the change would alter the rule type
- Informs user this is not supported as an edit
- Suggests: delete the existing rule and create a new one with the desired type
Expected output: No file changes. Guidance to user about delete + create workflow.