According to my understanding of your requirement, an SLA rule is already defined in the sub-case with an escalation action to set status to resolved-cancelled. Hence, another wait shape is not required.
In the parent case, you'll need a wait shape with wait type as case dependency and select to reach status 'resolved-cancelled'.
So, when SLA is triggered in sub-case the case is resolved-canceled and the wait shape in parent case resolves the parent case.
One suggestion for your automation scenario I can think of is to trigger the subcase with an SLA deadline date already in the past, so the SLA rule will be triggered instantly (or within the default time of approx. 30 secs for the SLA agent to process it).
Which tools are you using for automating this scenario? I'm pretty sure this won't work in PegaUnit, due to the delays.