Make integration test use react life cycle method.