On case types and flows, you can test whether an attachment of type file or note, which were attached in the Attach Content shape, or email, which was attached using the Send Email shape, exists.
If you have multiple attachments on a flow or test case that match the expected value of the assertion, the assertion runs for every attachment that exists. If the system finds an attachment that matches the assertion value, the assertion passes and iterates over all the attachments on the flow or case type. If no attachment exists, the assertion fails
The system compares the expected output on attachments that are recorded on the pyWorkPage page. For example, if a case type has a parent case that spins off a child case, and you record just the child case, the pyWorkPage page records attachments for only the child case and not the parent case, which is recorded on the pyWorkCover page.
In addition, if you create a test case from a parent case that generates a child case that is returned to the parent case after the child case runs, the pyWorkPage page records the attachments only on the parent case.
For example, your case has an Attach Content shape that attaches a Process immediately
note in the first stage of the case type. In the third stage, your case has a Send Email shape that attaches an email with the subject Request approved
. The assertion passes if you searched for either the Process immediately
note or Request approved
email subject.