add tests to call the onAfterRender method