Links may not function; however, this content may be relevant to outdated versions of the product.
Attachment exists assertions
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
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
approved. The assertion passes if you searched for either the
immediately note or
Request approved email subject.
ArticleAttaching content to a case
Previous topic Configuring attachment exists assertions Next topic Configuring case instance count assertions