Use waitAndAssert to test node state changes Upstream-commit: 1685b605a83d6dcfd0dc97ce394a435711805de4 Component: engine