Configuring attachment exists assertions
For flows and case types, you can verify that the flow or case type has an attachment of type file or note (attached using the Attach Content shape) or email (attached using the Send Email shape) attached.
-
Complete one of the following actions:
- If the Pega unit test case is not already open, open the case and select the Definition tab.
- If the Pega unit test case is open and has not been saved, then click Done on the Definitions tab.
-
Complete one of the following actions:
- To add a new assertion, click Add expected result at the bottom of the page.
- Modify an existing assertion.
- From the Assertion type list, select Attachment exists.
-
From the Attachment type list, select one of the following
options, and then provide the value for each field:
- File: Select to specify that the attachment type is file,
and then enter the following values:
-
Description: Enter the text that was provided as the description in the Attach Content shape.
-
Name: Enter the name of the file that was provided in the Attach Content shape.
-
- Note: Select to specify that the attachment type is note, and then enter text that was entered as the note description in the Attach Content shape.
- Email: Select to specify that the attachment type is an email, and then enter the email subject that was provided in the Send Email shape.
- File: Select to specify that the attachment type is file,
and then enter the following values:
- Repeat steps 2 through 4 to add additional attachment assertions.
- Optional: To add a comment, click the Add comment icon, enter a comment, and click OK.
- Click Save in the rule form.