Move onWidgetRender method from tests to global Utils